[][src]Struct picky_asn1_x509::private_key_info::PrivateKeyInfo

pub struct PrivateKeyInfo {
    pub version: u8,
    pub private_key_algorithm: AlgorithmIdentifier,
    pub private_key: PrivateKeyValue,
}

Public-Key Cryptography Standards (PKCS) #8

Section 5

Private-key information shall have ASN.1 type PrivateKeyInfo:

PrivateKeyInfo ::= SEQUENCE {
     version                   Version,
     privateKeyAlgorithm       PrivateKeyAlgorithmIdentifier,
     privateKey                PrivateKey,
     attributes           [0]  IMPLICIT Attributes OPTIONAL }

  Version ::= INTEGER

  PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier

  PrivateKey ::= OCTET STRING

  Attributes ::= SET OF Attribute

The fields of type PrivateKeyInfo have the following meanings:

version is the syntax version number, for compatibility with future revisions of this document. It shall be 0 for this version of the document.

privateKeyAlgorithm identifies the private-key algorithm. One example of a private-key algorithm is PKCS #1's rsaEncryption.

privateKey is an octet string whose contents are the value of the private key. The interpretation of the contents is defined in the registration of the private-key algorithm. For an RSA private key, for example, the contents are a BER encoding of a value of type RSAPrivateKey.

attributes is a set of attributes. These are the extended information that is encrypted along with the private-key information.

Fields

version: u8private_key_algorithm: AlgorithmIdentifierprivate_key: PrivateKeyValue

Implementations

impl PrivateKeyInfo[src]

pub fn new_rsa_encryption(
    modulus: IntegerAsn1,
    public_exponent: IntegerAsn1,
    private_exponent: IntegerAsn1,
    primes: (IntegerAsn1, IntegerAsn1),
    exponents: (IntegerAsn1, IntegerAsn1),
    coefficient: IntegerAsn1
) -> Self
[src]

Trait Implementations

impl Clone for PrivateKeyInfo[src]

impl Debug for PrivateKeyInfo[src]

impl<'de> Deserialize<'de> for PrivateKeyInfo[src]

impl PartialEq<PrivateKeyInfo> for PrivateKeyInfo[src]

impl Serialize for PrivateKeyInfo[src]

impl StructuralPartialEq for PrivateKeyInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.