Zum Hauptinhalt springen

Appendix C. ASN.1-Modul (ASN.1 Module)

Dieser Anhang enthält das vollständige ASN.1-Modul dieses Dokuments. Dieses Modul verwendet eine Kombination aus der ASN.1-Syntax von 1988 und 1993, einschließlich der Informationsobjektklassen-Funktionen, die im Nachtrag von 1993 eingeführt wurden.

PKCS-1 {
iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-1(1)
modules(0) pkcs-1(1)
}

DEFINITIONS EXPLICIT TAGS ::= BEGIN

-- Alle Symbole exportieren
EXPORTS ALL;

-- Importe
IMPORTS

AlgorithmIdentifier, ALGORITHM-IDENTIFIER
FROM AlgorithmInformation
{ joint-iso-itu-t(2) etsi(0) specification(0) mhss(1)
pkcs(7) revision(0) module(7) id-mod-algorithmInformation(0) } ;

-- Basis-Objektidentifikator
pkcs-1 OBJECT IDENTIFIER ::= {
iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1
}

-- RSA-Schlüsseltypen
rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 }

RSAPublicKey ::= SEQUENCE {
modulus INTEGER, -- n
publicExponent INTEGER -- e
}

RSAPrivateKey ::= SEQUENCE {
version Version,
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 ::= INTEGER { two-prime(0), multi(1) }

OtherPrimeInfos ::= SEQUENCE SIZE(1..MAX) OF OtherPrimeInfo

OtherPrimeInfo ::= SEQUENCE {
prime INTEGER, -- r_i
exponent INTEGER, -- d_i
coefficient INTEGER -- t_i
}

-- Objektidentifikatoren der Verschlüsselungsschemata
id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 }
id-RSAES-PKCS1-v1_5 OBJECT IDENTIFIER ::= { pkcs-1 1 }

-- Objektidentifikatoren der Signaturschemata
id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 }

sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 }
sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 }
sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 }

-- RSAES-OAEP-Parameter
RSAES-OAEP-params ::= SEQUENCE {
hashFunc [0] AlgorithmIdentifier DEFAULT sha1,
maskGenFunc [1] AlgorithmIdentifier DEFAULT mgf1SHA1,
pSourceFunc [2] AlgorithmIdentifier DEFAULT pSpecifiedEmpty
}

-- RSASSA-PSS-Parameter
RSASSA-PSS-params ::= SEQUENCE {
hashAlgorithm [0] AlgorithmIdentifier DEFAULT sha1,
maskGenAlgorithm [1] AlgorithmIdentifier DEFAULT mgf1SHA1,
saltLength [2] INTEGER DEFAULT 20,
trailerField [3] INTEGER DEFAULT 1
}

-- Maskengenerierungsfunktion
id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 }

-- Hash-Funktions-Objektidentifikatoren
id-sha256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1)
gov(101) csor(3) nistalgorithm(4) hashalgs(2) 1
}

id-sha384 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1)
gov(101) csor(3) nistalgorithm(4) hashalgs(2) 2
}

id-sha512 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1)
gov(101) csor(3) nistalgorithm(4) hashalgs(2) 3
}

-- DigestInfo für RSASSA-PKCS1-v1_5
DigestInfo ::= SEQUENCE {
digestAlgorithm AlgorithmIdentifier,
digest OCTET STRING
}

END

Dieses ASN.1-Modul definiert alle Datentypen und Objektidentifikatoren, die für alle Schemata und Schlüsseltypen in diesem Dokument erforderlich sind.