| ASN.1 Syntax for Private Keys |
|
|
| -- PKCS #8 (Private-Key Information Syntax Standard) definitions
| |
|
| PrivateKeyInfo | ::= |
SEQUENCE {
|
|
| version |
Version-pkcs8,
|
| privateKeyAlgorithm |
PrivateKeyAlgorithmIdentifier,
|
| privateKey |
PrivateKey,
|
| attributes |
[0] IMPLICIT Attributes OPTIONAL
|
| }
| |
|
|
|
|
|
| PrivateKey | ::= |
OCTET STRING
| |
|
| Attributes | ::= |
SET OF Attribute
| |
|
|
|
|
|
| -- PKCS #1 / RFC 3447 (RSA Cryptography Specifications Version 2.1) definitions
| |
|
| RSAPrivateKey | ::= |
SEQUENCE {
|
|
| version |
Version-pkcs1,
|
| modulus | INTEGER, -- n
|
| publicExponent | INTEGER, -- e
|
| privateExponent | INTEGER, -- d
|
| prime1 | INTEGER, -- p
|
| prime2 | INTEGER, -- q
|
| exponent1 | INTEGER, -- d mod (p-1)
|
| exponent2 | INTEGER, -- d mod (q-1)
|
| coefficient | INTEGER, -- (inverse of q) mod p
|
| otherPrimeInfos |
OtherPrimeInfos OPTIONAL
|
| }
| |
|
| Version-pkcs1 | ::= |
INTEGER { two-prime(0), multi(1) }
(CONSTRAINED BY
{-- version must be multi if otherPrimeInfos present --})
| |
|
| OtherPrimeInfos | ::= |
SEQUENCE SIZE(1..MAX) OF
OtherPrimeInfo
| |
|
| OtherPrimeInfo | ::= |
SEQUENCE {
|
|
| prime |
INTEGER, -- ri
|
| exponent |
INTEGER, -- di
|
| coefficient |
INTEGER -- ti
|
| }
| |
|
|
|