logotype-cert-extn -> logotypecertextn to make directory name consistent with filenames
[obnox/wireshark/wip.git] / asn1 / pkixcrmf / CRMF.asn
1 -- Extracted from RFC4211
2 -- by Martin Peylo <martin.peylo@nsn.com>
3 -- 
4 -- Changes to make it work with asn2wrs:
5 --   - none
6 --   
7 -- The copyright statement from the original description in RFC4211
8 -- follows below:
9 --
10 -- Full Copyright Statement
11 --
12 --   Copyright (C) The Internet Society (2005).
13 --
14 --   This document is subject to the rights, licenses and restrictions
15 --   contained in BCP 78, and except as set forth therein, the authors
16 --   retain all their rights.
17 --
18 --   This document and the information contained herein are provided on an
19 --   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
20 --   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
21 --   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
22 --   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
23 --   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
24 --   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
25
26
27 PKIXCRMF-2005 {iso(1) identified-organization(3) dod(6) internet(1)
28 security(5) mechanisms(5) pkix(7) id-mod(0) id-mod-crmf2005(36)}
29
30 DEFINITIONS IMPLICIT TAGS ::=
31 BEGIN
32
33 IMPORTS
34   -- Directory Authentication Framework (X.509)
35      Version, AlgorithmIdentifier, Name, Time,
36      SubjectPublicKeyInfo, Extensions, UniqueIdentifier, Attribute
37         FROM PKIX1Explicit88 {iso(1) identified-organization(3) dod(6)
38             internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
39             id-pkix1-explicit(18)} -- found in [PROFILE]
40
41   -- Certificate Extensions (X.509)
42      GeneralName
43         FROM PKIX1Implicit88 {iso(1) identified-organization(3) dod(6)
44                internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
45                id-pkix1-implicit(19)}  -- found in [PROFILE]
46
47   -- Cryptographic Message Syntax
48      EnvelopedData
49         FROM CryptographicMessageSyntax2004 { iso(1) member-body(2)
50              us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16)
51              modules(0) cms-2004(24) };  -- found in [CMS]
52
53 -- The following definition may be uncommented for use with
54 -- ASN.1 compilers that do not understand UTF8String.
55
56 -- UTF8String ::= [UNIVERSAL 12] IMPLICIT OCTET STRING
57        -- The contents of this type correspond to RFC 2279.
58
59 id-pkix  OBJECT IDENTIFIER  ::= { iso(1) identified-organization(3)
60 dod(6) internet(1) security(5) mechanisms(5) 7 }
61
62 -- arc for Internet X.509 PKI protocols and their components
63
64 id-pkip  OBJECT IDENTIFIER ::= { id-pkix 5 }
65
66 id-smime OBJECT IDENTIFIER ::= { iso(1) member-body(2)
67              us(840) rsadsi(113549) pkcs(1) pkcs9(9) 16 }
68
69 id-ct   OBJECT IDENTIFIER ::= { id-smime  1 }  -- content types
70
71 -- Core definitions for this module
72
73 CertReqMessages ::= SEQUENCE SIZE (1..MAX) OF CertReqMsg
74
75 CertReqMsg ::= SEQUENCE {
76  certReq   CertRequest,
77  popo       ProofOfPossession  OPTIONAL,
78  -- content depends upon key type
79  regInfo   SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue OPTIONAL }
80
81 CertRequest ::= SEQUENCE {
82  certReqId     INTEGER,          -- ID for matching request and reply
83  certTemplate  CertTemplate,  -- Selected fields of cert to be issued
84  controls      Controls OPTIONAL }   -- Attributes affecting issuance
85
86 CertTemplate ::= SEQUENCE {
87  version      [0] Version               OPTIONAL,
88  serialNumber [1] INTEGER               OPTIONAL,
89  signingAlg   [2] AlgorithmIdentifier   OPTIONAL,
90  issuer       [3] Name                  OPTIONAL,
91  validity     [4] OptionalValidity      OPTIONAL,
92  subject      [5] Name                  OPTIONAL,
93  publicKey    [6] SubjectPublicKeyInfo  OPTIONAL,
94  issuerUID    [7] UniqueIdentifier      OPTIONAL,
95  subjectUID   [8] UniqueIdentifier      OPTIONAL,
96  extensions   [9] Extensions            OPTIONAL }
97
98 OptionalValidity ::= SEQUENCE {
99  notBefore  [0] Time OPTIONAL,
100  notAfter   [1] Time OPTIONAL } -- at least one MUST be present
101
102 Controls  ::= SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue
103
104 AttributeTypeAndValue ::= SEQUENCE {
105  type         OBJECT IDENTIFIER,
106  value        ANY DEFINED BY type }
107
108 ProofOfPossession ::= CHOICE {
109  raVerified        [0] NULL,
110  -- used if the RA has already verified that the requester is in
111  -- possession of the private key
112  signature         [1] POPOSigningKey,
113  keyEncipherment   [2] POPOPrivKey,
114  keyAgreement      [3] POPOPrivKey }
115
116 POPOSigningKey ::= SEQUENCE {
117  poposkInput           [0] POPOSigningKeyInput OPTIONAL,
118  algorithmIdentifier   AlgorithmIdentifier,
119  signature             BIT STRING }
120
121  -- The signature (using "algorithmIdentifier") is on the
122  -- DER-encoded value of poposkInput.  NOTE: If the CertReqMsg
123  -- certReq CertTemplate contains the subject and publicKey values,
124  -- then poposkInput MUST be omitted and the signature MUST be
125  -- computed over the DER-encoded value of CertReqMsg certReq.  If
126  -- the CertReqMsg certReq CertTemplate does not contain both the
127  -- public key and subject values (i.e., if it contains only one
128  -- of these, or neither), then poposkInput MUST be present and
129  -- MUST be signed.
130
131 POPOSigningKeyInput ::= SEQUENCE {
132  authInfo            CHOICE {
133      sender              [0] GeneralName,
134      -- used only if an authenticated identity has been
135      -- established for the sender (e.g., a DN from a
136      -- previously-issued and currently-valid certificate)
137      publicKeyMAC        PKMACValue },
138      -- used if no authenticated GeneralName currently exists for
139      -- the sender; publicKeyMAC contains a password-based MAC
140      -- on the DER-encoded value of publicKey
141  publicKey           SubjectPublicKeyInfo }  -- from CertTemplate
142
143 PKMACValue ::= SEQUENCE {
144 algId  AlgorithmIdentifier,
145 -- algorithm value shall be PasswordBasedMac {1 2 840 113533 7 66 13}
146 -- parameter value is PBMParameter
147 value  BIT STRING }
148
149 PBMParameter ::= SEQUENCE {
150    salt                OCTET STRING,
151    owf                 AlgorithmIdentifier,
152    -- AlgId for a One-Way Function (SHA-1 recommended)
153    iterationCount      INTEGER,
154    -- number of times the OWF is applied
155    mac                 AlgorithmIdentifier
156    -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
157 }   -- or HMAC [HMAC, RFC2202])
158
159 POPOPrivKey ::= CHOICE {
160  thisMessage       [0] BIT STRING,         -- Deprecated
161  -- possession is proven in this message (which contains the private
162  -- key itself (encrypted for the CA))
163  subsequentMessage [1] SubsequentMessage,
164  -- possession will be proven in a subsequent message
165  dhMAC             [2] BIT STRING,         -- Deprecated
166  agreeMAC          [3] PKMACValue,
167  encryptedKey      [4] EnvelopedData }
168
169  -- for keyAgreement (only), possession is proven in this message
170  -- (which contains a MAC (over the DER-encoded value of the
171  -- certReq parameter in CertReqMsg, which MUST include both subject
172  -- and publicKey) based on a key derived from the end entity's
173  -- private DH key and the CA's public DH key);
174
175 SubsequentMessage ::= INTEGER {
176  encrCert (0),
177  -- requests that resulting certificate be encrypted for the
178  -- end entity (following which, POP will be proven in a
179  -- confirmation message)
180  challengeResp (1) }
181  -- requests that CA engage in challenge-response exchange with
182  -- end entity in order to prove private key possession
183
184 -- Object identifier assignments --
185
186 -- Registration Controls in CRMF
187 id-regCtrl OBJECT IDENTIFIER ::= { id-pkip 1 }
188
189
190 id-regCtrl-regToken OBJECT IDENTIFIER ::= { id-regCtrl 1 }
191 --with syntax:
192 RegToken ::= UTF8String
193
194 id-regCtrl-authenticator OBJECT IDENTIFIER ::= { id-regCtrl 2 }
195 --with syntax:
196 Authenticator ::= UTF8String
197
198 id-regCtrl-pkiPublicationInfo OBJECT IDENTIFIER ::= { id-regCtrl 3 }
199 --with syntax:
200
201 PKIPublicationInfo ::= SEQUENCE {
202 action     INTEGER {
203              dontPublish (0),
204              pleasePublish (1) },
205 pubInfos  SEQUENCE SIZE (1..MAX) OF SinglePubInfo OPTIONAL }
206   -- pubInfos MUST NOT be present if action is "dontPublish"
207   -- (if action is "pleasePublish" and pubInfos is omitted,
208   -- "dontCare" is assumed)
209
210 SinglePubInfo ::= SEQUENCE {
211  pubMethod    INTEGER {
212      dontCare    (0),
213      x500        (1),
214      web         (2),
215      ldap        (3) },
216  pubLocation  GeneralName OPTIONAL }
217
218 id-regCtrl-pkiArchiveOptions     OBJECT IDENTIFIER ::= { id-regCtrl 4 }
219 --with syntax:
220 PKIArchiveOptions ::= CHOICE {
221  encryptedPrivKey     [0] EncryptedKey,
222  -- the actual value of the private key
223  keyGenParameters     [1] KeyGenParameters,
224  -- parameters that allow the private key to be re-generated
225  archiveRemGenPrivKey [2] BOOLEAN }
226  -- set to TRUE if sender wishes receiver to archive the private
227  -- key of a key pair that the receiver generates in response to
228  -- this request; set to FALSE if no archival is desired.
229
230 EncryptedKey ::= CHOICE {
231  encryptedValue        EncryptedValue,   -- Deprecated
232  envelopedData     [0] EnvelopedData }
233  -- The encrypted private key MUST be placed in the envelopedData
234  -- encryptedContentInfo encryptedContent OCTET STRING.
235
236 EncryptedValue ::= SEQUENCE {
237  intendedAlg   [0] AlgorithmIdentifier  OPTIONAL,
238  -- the intended algorithm for which the value will be used
239  symmAlg       [1] AlgorithmIdentifier  OPTIONAL,
240  -- the symmetric algorithm used to encrypt the value
241  encSymmKey    [2] BIT STRING           OPTIONAL,
242  -- the (encrypted) symmetric key used to encrypt the value
243  keyAlg        [3] AlgorithmIdentifier  OPTIONAL,
244  -- algorithm used to encrypt the symmetric key
245  valueHint     [4] OCTET STRING         OPTIONAL,
246  -- a brief description or identifier of the encValue content
247  -- (may be meaningful only to the sending entity, and used only
248  -- if EncryptedValue might be re-examined by the sending entity
249  -- in the future)
250  encValue       BIT STRING }
251  -- the encrypted value itself
252 -- When EncryptedValue is used to carry a private key (as opposed to
253 -- a certificate), implementations MUST support the encValue field
254 -- containing an encrypted PrivateKeyInfo as defined in [PKCS11],
255 -- section 12.11.  If encValue contains some other format/encoding
256 -- for the private key, the first octet of valueHint MAY be used
257 -- to indicate the format/encoding (but note that the possible values
258 -- of this octet are not specified at this time).  In all cases, the
259 -- intendedAlg field MUST be used to indicate at least the OID of
260 -- the intended algorithm of the private key, unless this information
261 -- is known a priori to both sender and receiver by some other means.
262
263 KeyGenParameters ::= OCTET STRING
264
265 id-regCtrl-oldCertID          OBJECT IDENTIFIER ::= { id-regCtrl 5 }
266 --with syntax:
267 OldCertId ::= CertId
268
269 CertId ::= SEQUENCE {
270  issuer           GeneralName,
271  serialNumber     INTEGER }
272
273 id-regCtrl-protocolEncrKey    OBJECT IDENTIFIER ::= { id-regCtrl 6 }
274 --with syntax:
275 ProtocolEncrKey ::= SubjectPublicKeyInfo
276
277 -- Registration Info in CRMF
278 id-regInfo OBJECT IDENTIFIER ::= { id-pkip 2 }
279
280 id-regInfo-utf8Pairs    OBJECT IDENTIFIER ::= { id-regInfo 1 }
281 --with syntax
282 UTF8Pairs ::= UTF8String
283
284 id-regInfo-certReq       OBJECT IDENTIFIER ::= { id-regInfo 2 }
285 --with syntax
286 CertReq ::= CertRequest
287
288 -- id-ct-encKeyWithID is a new content type used for CMS objects.
289 -- it contains both a private key and an identifier for key escrow
290 -- agents to check against recovery requestors.
291
292 id-ct-encKeyWithID OBJECT IDENTIFIER ::= {id-ct 21}
293
294 EncKeyWithID ::= SEQUENCE {
295   privateKey           PrivateKeyInfo,
296   identifier CHOICE {
297     string             UTF8String,
298     generalName        GeneralName
299   } OPTIONAL
300 }
301
302 PrivateKeyInfo ::= SEQUENCE {
303    version                   INTEGER,
304    privateKeyAlgorithm       AlgorithmIdentifier,
305    privateKey                OCTET STRING,
306    attributes                [0] IMPLICIT Attributes OPTIONAL
307 }
308
309 Attributes ::= SET OF Attribute
310
311 END