Debian Codegraph @

ietf-cms/protocol/cms.asn1

raw
1 CryptographicMessageSyntax2004
2 { iso(1) member-body(2) us(840) rsadsi(113549)
3 pkcs(1) pkcs-9(9) smime(16) modules(0) cms-2004(24) }
4
5 DEFINITIONS IMPLICIT TAGS ::=
6 BEGIN
7
8 -- EXPORTS All
9 -- The types and values defined in this module are exported for use
10 -- in the other ASN.1 modules. Other applications may use them for
11 -- their own purposes.
12
13 IMPORTS
14
15 -- Imports from RFC 5280 [PROFILE], Appendix A.1
16 AlgorithmIdentifier, Certificate, CertificateList,
17 CertificateSerialNumber, Name
18 FROM PKIX1Explicit88
19 { iso(1) identified-organization(3) dod(6)
20 internet(1) security(5) mechanisms(5) pkix(7)
21 mod(0) pkix1-explicit(18) }
22
23 -- Imports from RFC 3281 [ACPROFILE], Appendix B
24 AttributeCertificate
25 FROM PKIXAttributeCertificate
26 { iso(1) identified-organization(3) dod(6)
27 internet(1) security(5) mechanisms(5) pkix(7)
28 mod(0) attribute-cert(12) }
29
30 -- Imports from Appendix B of this document
31 AttributeCertificateV1
32 FROM AttributeCertificateVersion1
33 { iso(1) member-body(2) us(840) rsadsi(113549)
34 pkcs(1) pkcs-9(9) smime(16) modules(0)
35 v1AttrCert(15) } ;
36
37 -- Cryptographic Message Syntax
38
39 ContentInfo ::= SEQUENCE {
40 contentType ContentType,
41 content [0] EXPLICIT ANY DEFINED BY contentType }
42
43 ContentType ::= OBJECT IDENTIFIER
44
45 SignedData ::= SEQUENCE {
46 version CMSVersion,
47 digestAlgorithms DigestAlgorithmIdentifiers,
48 encapContentInfo EncapsulatedContentInfo,
49 certificates [0] IMPLICIT CertificateSet OPTIONAL,
50 crls [1] IMPLICIT RevocationInfoChoices OPTIONAL,
51 signerInfos SignerInfos }
52
53 DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier
54
55 SignerInfos ::= SET OF SignerInfo
56
57 EncapsulatedContentInfo ::= SEQUENCE {
58 eContentType ContentType,
59 eContent [0] EXPLICIT OCTET STRING OPTIONAL }
60
61 SignerInfo ::= SEQUENCE {
62 version CMSVersion,
63 sid SignerIdentifier,
64 digestAlgorithm DigestAlgorithmIdentifier,
65 signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL,
66 signatureAlgorithm SignatureAlgorithmIdentifier,
67 signature SignatureValue,
68 unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL }
69
70 SignerIdentifier ::= CHOICE {
71 issuerAndSerialNumber IssuerAndSerialNumber,
72 subjectKeyIdentifier [0] SubjectKeyIdentifier }
73
74 SignedAttributes ::= SET SIZE (1..MAX) OF Attribute
75
76 UnsignedAttributes ::= SET SIZE (1..MAX) OF Attribute
77
78 Attribute ::= SEQUENCE {
79 attrType OBJECT IDENTIFIER,
80 attrValues SET OF AttributeValue }
81
82 AttributeValue ::= ANY
83
84 SignatureValue ::= OCTET STRING
85
86 EnvelopedData ::= SEQUENCE {
87 version CMSVersion,
88 originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
89 recipientInfos RecipientInfos,
90 encryptedContentInfo EncryptedContentInfo,
91 unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
92
93 OriginatorInfo ::= SEQUENCE {
94 certs [0] IMPLICIT CertificateSet OPTIONAL,
95 crls [1] IMPLICIT RevocationInfoChoices OPTIONAL }
96
97 RecipientInfos ::= SET SIZE (1..MAX) OF RecipientInfo
98
99 EncryptedContentInfo ::= SEQUENCE {
100 contentType ContentType,
101 contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
102 encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL }
103
104 EncryptedContent ::= OCTET STRING
105
106 UnprotectedAttributes ::= SET SIZE (1..MAX) OF Attribute
107
108 RecipientInfo ::= CHOICE {
109 ktri KeyTransRecipientInfo,
110 kari [1] KeyAgreeRecipientInfo,
111 kekri [2] KEKRecipientInfo,
112 pwri [3] PasswordRecipientInfo,
113 ori [4] OtherRecipientInfo }
114
115 EncryptedKey ::= OCTET STRING
116
117 KeyTransRecipientInfo ::= SEQUENCE {
118 version CMSVersion, -- always set to 0 or 2
119 rid RecipientIdentifier,
120 keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
121 encryptedKey EncryptedKey }
122
123 RecipientIdentifier ::= CHOICE {
124 issuerAndSerialNumber IssuerAndSerialNumber,
125 subjectKeyIdentifier [0] SubjectKeyIdentifier }
126
127 KeyAgreeRecipientInfo ::= SEQUENCE {
128 version CMSVersion, -- always set to 3
129 originator [0] EXPLICIT OriginatorIdentifierOrKey,
130 ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
131 keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
132 recipientEncryptedKeys RecipientEncryptedKeys }
133
134 OriginatorIdentifierOrKey ::= CHOICE {
135 issuerAndSerialNumber IssuerAndSerialNumber,
136 subjectKeyIdentifier [0] SubjectKeyIdentifier,
137 originatorKey [1] OriginatorPublicKey }
138
139 OriginatorPublicKey ::= SEQUENCE {
140 algorithm AlgorithmIdentifier,
141 publicKey BIT STRING }
142
143 RecipientEncryptedKeys ::= SEQUENCE OF RecipientEncryptedKey
144
145 RecipientEncryptedKey ::= SEQUENCE {
146 rid KeyAgreeRecipientIdentifier,
147 encryptedKey EncryptedKey }
148
149 KeyAgreeRecipientIdentifier ::= CHOICE {
150 issuerAndSerialNumber IssuerAndSerialNumber,
151 rKeyId [0] IMPLICIT RecipientKeyIdentifier }
152
153 RecipientKeyIdentifier ::= SEQUENCE {
154 subjectKeyIdentifier SubjectKeyIdentifier,
155 date GeneralizedTime OPTIONAL,
156 other OtherKeyAttribute OPTIONAL }
157
158 SubjectKeyIdentifier ::= OCTET STRING
159
160 KEKRecipientInfo ::= SEQUENCE {
161 version CMSVersion, -- always set to 4
162 kekid KEKIdentifier,
163 keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
164 encryptedKey EncryptedKey }
165
166 KEKIdentifier ::= SEQUENCE {
167 keyIdentifier OCTET STRING,
168 date GeneralizedTime OPTIONAL,
169 other OtherKeyAttribute OPTIONAL }
170
171 PasswordRecipientInfo ::= SEQUENCE {
172 version CMSVersion, -- always set to 0
173 keyDerivationAlgorithm [0] KeyDerivationAlgorithmIdentifier
174 OPTIONAL,
175 keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
176 encryptedKey EncryptedKey }
177
178 OtherRecipientInfo ::= SEQUENCE {
179 oriType OBJECT IDENTIFIER,
180 oriValue ANY DEFINED BY oriType }
181
182 DigestedData ::= SEQUENCE {
183 version CMSVersion,
184 digestAlgorithm DigestAlgorithmIdentifier,
185 encapContentInfo EncapsulatedContentInfo,
186 digest Digest }
187
188 Digest ::= OCTET STRING
189
190 EncryptedData ::= SEQUENCE {
191 version CMSVersion,
192 encryptedContentInfo EncryptedContentInfo,
193 unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
194
195 AuthenticatedData ::= SEQUENCE {
196 version CMSVersion,
197 originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
198 recipientInfos RecipientInfos,
199 macAlgorithm MessageAuthenticationCodeAlgorithm,
200 digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
201 encapContentInfo EncapsulatedContentInfo,
202 authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
203 mac MessageAuthenticationCode,
204 unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
205
206 AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
207
208 UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
209
210 MessageAuthenticationCode ::= OCTET STRING
211
212 DigestAlgorithmIdentifier ::= AlgorithmIdentifier
213
214 SignatureAlgorithmIdentifier ::= AlgorithmIdentifier
215
216 KeyEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
217
218 ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
219
220 MessageAuthenticationCodeAlgorithm ::= AlgorithmIdentifier
221
222 KeyDerivationAlgorithmIdentifier ::= AlgorithmIdentifier
223
224 RevocationInfoChoices ::= SET OF RevocationInfoChoice
225
226 RevocationInfoChoice ::= CHOICE {
227 crl CertificateList,
228 other [1] IMPLICIT OtherRevocationInfoFormat }
229
230 OtherRevocationInfoFormat ::= SEQUENCE {
231 otherRevInfoFormat OBJECT IDENTIFIER,
232 otherRevInfo ANY DEFINED BY otherRevInfoFormat }
233
234 CertificateChoices ::= CHOICE {
235 certificate Certificate,
236 extendedCertificate [0] IMPLICIT ExtendedCertificate, -- Obsolete
237 v1AttrCert [1] IMPLICIT AttributeCertificateV1, -- Obsolete
238 v2AttrCert [2] IMPLICIT AttributeCertificateV2,
239 other [3] IMPLICIT OtherCertificateFormat }
240
241 AttributeCertificateV2 ::= AttributeCertificate
242
243 OtherCertificateFormat ::= SEQUENCE {
244 otherCertFormat OBJECT IDENTIFIER,
245 otherCert ANY DEFINED BY otherCertFormat }
246
247 CertificateSet ::= SET OF CertificateChoices
248
249 IssuerAndSerialNumber ::= SEQUENCE {
250 issuer Name,
251 serialNumber CertificateSerialNumber }
252
253 CMSVersion ::= INTEGER { v0(0), v1(1), v2(2), v3(3), v4(4), v5(5) }
254
255 UserKeyingMaterial ::= OCTET STRING
256
257 OtherKeyAttribute ::= SEQUENCE {
258 keyAttrId OBJECT IDENTIFIER,
259 keyAttr ANY DEFINED BY keyAttrId OPTIONAL }
260
261 -- Content Type Object Identifiers
262
263 id-ct-contentInfo OBJECT IDENTIFIER ::= { iso(1) member-body(2)
264 us(840) rsadsi(113549) pkcs(1) pkcs9(9) smime(16) ct(1) 6 }
265
266 id-data OBJECT IDENTIFIER ::= { iso(1) member-body(2)
267 us(840) rsadsi(113549) pkcs(1) pkcs7(7) 1 }
268
269 id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
270 us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }
271
272 id-envelopedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
273 us(840) rsadsi(113549) pkcs(1) pkcs7(7) 3 }
274
275 id-digestedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
276 us(840) rsadsi(113549) pkcs(1) pkcs7(7) 5 }
277
278 id-encryptedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
279 us(840) rsadsi(113549) pkcs(1) pkcs7(7) 6 }
280
281 id-ct-authData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
282 us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1) 2 }
283
284 -- The CMS Attributes
285
286 MessageDigest ::= OCTET STRING
287
288 SigningTime ::= Time
289
290 Time ::= CHOICE {
291 utcTime UTCTime,
292 generalTime GeneralizedTime }
293
294 Countersignature ::= SignerInfo
295
296 -- Attribute Object Identifiers
297
298 id-contentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
299 us(840) rsadsi(113549) pkcs(1) pkcs9(9) 3 }
300
301 id-messageDigest OBJECT IDENTIFIER ::= { iso(1) member-body(2)
302 us(840) rsadsi(113549) pkcs(1) pkcs9(9) 4 }
303
304 id-signingTime OBJECT IDENTIFIER ::= { iso(1) member-body(2)
305 us(840) rsadsi(113549) pkcs(1) pkcs9(9) 5 }
306
307 id-countersignature OBJECT IDENTIFIER ::= { iso(1) member-body(2)
308 us(840) rsadsi(113549) pkcs(1) pkcs9(9) 6 }
309
310 -- Obsolete Extended Certificate syntax from PKCS #6
311
312 ExtendedCertificateOrCertificate ::= CHOICE {
313 certificate Certificate,
314 extendedCertificate [0] IMPLICIT ExtendedCertificate }
315
316 ExtendedCertificate ::= SEQUENCE {
317 extendedCertificateInfo ExtendedCertificateInfo,
318 signatureAlgorithm SignatureAlgorithmIdentifier,
319 signature Signature }
320
321 ExtendedCertificateInfo ::= SEQUENCE {
322 version CMSVersion,
323 certificate Certificate,
324 attributes UnauthAttributes }
325
326 Signature ::= BIT STRING
327
328 END -- of CryptographicMessageSyntax2004