-
Notifications
You must be signed in to change notification settings - Fork 2
/
Composite-Keys-2023.asn
413 lines (294 loc) · 13.7 KB
/
Composite-Keys-2023.asn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
-- command for easily copying it into a compiler (ubuntu with xclip)
-- cat ASN1ModuleIncludes.asn Composite-Keys-2023.asn | xclip -sel clip
Composite-Keys-2023
{iso(1) identified-organization(3) dod(6) internet(1) security(5)
mechanisms(5) pkix(7) id-mod(0) id-mod-composite-keys(TBD)}
DEFINITIONS IMPLICIT TAGS ::= BEGIN
EXPORTS ALL;
IMPORTS
PUBLIC-KEY, SIGNATURE-ALGORITHM, ParamOptions, AlgorithmIdentifier{}
FROM AlgorithmInformation-2009 -- RFC 5912 [X509ASN1]
{ iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-algorithmInformation-02(58) }
SubjectPublicKeyInfo
FROM PKIX1Explicit-2009
{ iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-pkix1-explicit-02(51) }
OneAsymmetricKey
FROM AsymmetricKeyPackageModuleV1
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
pkcs-9(9) smime(16) modules(0)
id-mod-asymmetricKeyPkgV1(50) }
NamedCurve
FROM PKIXAlgs-2009 { iso(1) identified-organization(3) dod(6)
internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-pkix1-algorithms2008-02(56) }
pk-Ed25519, pk-X25519, pk-X448
FROM Safecurves-pkix-18
{ iso(1) identified-organization(3) dod(6) internet(1)
security(5) mechanisms(5) pkix(7) id-mod(0)
id-mod-safecurves-pkix(93) } ;
--
-- Object Identifiers
--
der OBJECT IDENTIFIER ::=
{joint-iso-itu-t asn1(1) ber-derived(2) distinguished-encoding(1)}
-- COMPOSITE-KEY-ALGORITHM
--
-- Describes the basic properties of a composite key algorithm
--
-- &id - contains the OID identifying the composite algorithm
-- &Params - if present, contains the type for the algorithm
-- parameters; if absent, implies no parameters
-- ¶mPresence - parameter presence requirement
--
-- }
COMPOSITE-KEY-ALGORITHM ::= CLASS {
&id OBJECT IDENTIFIER UNIQUE,
&Params OPTIONAL,
¶mPresence ParamOptions DEFAULT absent
} WITH SYNTAX {
IDENTIFIER &id
[PARAMS [TYPE &Params] ARE ¶mPresence ]
}
--
-- Public Key
--
CompositePublicKey ::= SEQUENCE SIZE (2..MAX) OF SubjectPublicKeyInfo
CompositePublicKeyOs ::= OCTET STRING (CONTAINING CompositePublicKey ENCODED BY der)
CompositePublicKeyBs ::= BIT STRING (CONTAINING CompositePublicKey ENCODED BY der)
CompositePrivateKey ::= SEQUENCE SIZE (2..MAX) OF OneAsymmetricKey
--
-- Composite public key information objects
--
-- The following ASN.1 object class then automatically generates the
-- public key structure from the types defined in pk-explicitComposite.
-- ExplicitCompositePublicKey - The data structure for a composite
-- public key sec-composite-pub-keys and SecondPublicKeyType are needed
-- because PUBLIC-KEY contains a set of public key types, not a single
-- type.
-- TODO The parameters should be optional only if they are marked
-- optional in the PUBLIC-KEY
ExplicitCompositePublicKey{PUBLIC-KEY:firstPublicKey, FirstPublicKeyType,
PUBLIC-KEY:secondPublicKey, SecondPublicKeyType} ::= SEQUENCE {
firstPublicKey SEQUENCE {
params firstPublicKey.&Params OPTIONAL,
publicKey FirstPublicKeyType
},
secondPublicKey SEQUENCE {
params secondPublicKey.&Params OPTIONAL,
publicKey SecondPublicKeyType
}
}
pk-explicitCompositeSignature{OBJECT IDENTIFIER:id, PUBLIC-KEY:firstPublicKey,
FirstPublicKeyType, PUBLIC-KEY:secondPublicKey, SecondPublicKeyType}
PUBLIC-KEY ::= {
IDENTIFIER id
KEY ExplicitCompositePublicKey{firstPublicKey, FirstPublicKeyType,
secondPublicKey, SecondPublicKeyType}
PARAMS ARE absent
CERT-KEY-USAGE { digitalSignature, nonRepudiation, keyCertSign, cRLSign }
}
pk-explicitCompositeKEM{OBJECT IDENTIFIER:id, PUBLIC-KEY:firstPublicKey,
FirstPublicKeyType, PUBLIC-KEY:secondPublicKey, SecondPublicKeyType}
PUBLIC-KEY ::= {
IDENTIFIER id
KEY ExplicitCompositePublicKey{firstPublicKey, FirstPublicKeyType,
secondPublicKey, SecondPublicKeyType}
PARAMS ARE absent
CERT-KEY-USAGE { keyEncipherment }
}
-- TODO this is one possible way to reference specific named curves.
-- But I don't think this compiles.
--pk-ECDSA-P256 PUBLIC-KEY ::= {
-- IDENTIFIER id-ecPublicKey
-- KEY ECPoint
-- PARAMS TYPE NamedCurve.secp256r1 ARE required }
--
--pk-ECDSA-brainpoolP256r1 PUBLIC-KEY ::= {
-- IDENTIFIER id-ecPublicKey
-- KEY ECPoint
-- PARAMS NamedCurve{brainpoolP256r1} }
--
--pk-ECDSA-P384 PUBLIC-KEY ::= {
-- IDENTIFIER id-ecPublicKey
-- KEY ECPoint
-- PARAMS TYPE NamedCurve{secp384r1} }
--
--pk-ECDSA-brainpoolP384r1 PUBLIC-KEY ::= {
-- IDENTIFIER id-ecPublicKey
-- KEY ECPoint
-- PARAMS NamedCurve{brainpoolP384r1} }
-- Explicit Composite Signature Keys
-- TODO: To be replaced by IANA
id-Dilithium3-RSA-PSS OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) signature(1) dilithium3-rsa-pss(14) }
pk-Dilithium3-RSA-PSS PUBLIC-KEY ::=
pk-explicitCompositeSignature{id-Dilithium3-RSA-PSS, pk-Dilithium3TBD,
OCTET STRING, pk-rsaSSA-PSS, OCTET STRING}
-- TODO: To be replaced by IANA
id-Dilithium3-RSA-PKCS15-SHA256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) signature(1) dilithium3-rsa(1) }
pk-Dilithium3-RSA-PKCS15-SHA256 PUBLIC-KEY ::=
pk-explicitCompositeSignature{id-Dilithium3-RSA-PKCS15-SHA256,
pk-Dilithium3TBD, OCTET STRING, pk-rsa, RSAPublicKey}
-- TODO: To be replaced by IANA
id-Dilithium3-ECDSA-P256-SHA256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) signature(1) dilithium3-rsa(2) }
pk-Dilithium3-ECDSA-P256-SHA256 PUBLIC-KEY ::=
pk-explicitCompositeSignature{id-Dilithium3-ECDSA-P256-SHA256,
pk-Dilithium3TBD, OCTET STRING, pk-ECDSA-P256, ECPoint}
--TODO: this is missing `PARAMS secp256r1`
-- TODO: To be replaced by IANA
id-Dilithium3-ECDSA-brainpoolP256r1 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) signature(1)
dilithium3-ecdsa-brainpoolp256r1(3) }
pk-Dilithium3-ECDSA-brainpoolP256r1 PUBLIC-KEY ::=
pk-explicitCompositeSignature{id-Dilithium3-ECDSA-brainpoolP256r1,
pk-Dilithium3TBD, OCTET STRING, pk-ec, ECPoint}
--TODO: this is missing `PARAMS brainpoolP256r1`
-- TODO: To be replaced by IANA
id-Dilithium3-Ed25519 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) signature(1) dilithium3-ed25519(4) }
pk-Dilithium3-Ed25519 PUBLIC-KEY ::=
pk-explicitCompositeSignature{id-Dilithium3-Ed25519,
pk-Dilithium3TBD, OCTET STRING, pk-Ed25519, OCTET STRING}
-- TODO: To be replaced by IANA
id-Dilithium5-ECDSA-P384 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) signature(1) dilithium5-ecdsa-p384(5) }
pk-Dilithium5-ECDSA-P384 PUBLIC-KEY ::=
pk-explicitCompositeSignature{id-Dilithium5-ECDSA-P384,
pk-Dilithium5TBD, OCTET STRING, pk-ec, ECPoint}
--TODO: this is missing `PARAMS secp384r1`
-- TODO: To be replaced by IANA
id-Dilithium5-ECDSA-brainpoolP384r1 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) signature(1) dilithium5-ecdsa-brainpoolp384r1(6) }
pk-Dilithium5-ECDSA-brainpoolP384r1 PUBLIC-KEY ::=
pk-explicitCompositeSignature{id-Dilithium5-ECDSA-brainpoolP384r1,
pk-Dilithium5TBD, OCTET STRING, pk-ec, ECPoint}
--TODO: this is missing `PARAMS brainpoolP384r1`
-- TODO: To be replaced by IANA
id-Dilithium5-Ed448 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) signature dilithium5-ed448(7) }
pk-Dilithium5-Ed448 PUBLIC-KEY ::=
pk-explicitCompositeSignature{id-Dilithium5-Ed448,
pk-Dilithium5TBD, OCTET STRING, pk-Ed25519, OCTET STRING}
--TODO: I have a question out to LAMPS about why there is no pk-Ed448. See: https://mailarchive.ietf.org/arch/msg/spasm/bJHcxCA3bXoqKHqXnZ85Vrixu68/
-- TODO: To be replaced by IANA
id-Falcon512-ECDSA-P256-SHA256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) signature falcon512-ecdsa-p256-sha256(8) }
pk-Falcon512-ECDSA-P256-SHA256 PUBLIC-KEY ::=
pk-explicitCompositeSignature{id-Falcon512-ECDSA-P256-SHA256,
pk-falcon512TBD, OCTET STRING, pk-ec, ECPoint}
--TODO: this is missing `PARAMS secp256r1`
-- TODO: To be replaced by IANA
id-Falcon512-ECDSA-brainpoolP256r1-SHA256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) signature(1) falcon512-ecdsa-brainpoolp256r1-sha256(9) }
pk-Falcon512-ECDSA-brainpoolP256r1-SHA256 PUBLIC-KEY ::=
pk-explicitCompositeSignature{id-Falcon512-ECDSA-brainpoolP256r1-SHA256,
pk-falcon512TBD, OCTET STRING, pk-ec, ECPoint}
--TODO: this is missing `PARAMS brainpoolp256r1`
-- TODO: To be replaced by IANA
id-Falcon512-Ed25519 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) signatur(1) falcon512-ed25519(10) }
pk-Falcon512-Ed25519 PUBLIC-KEY ::=
pk-explicitCompositeSignature{id-Falcon512-Ed25519,
pk-falcon512TBD, OCTET STRING, pk-Ed25519, OCTET STRING}
-- Explicit Composite KEM Keys
-- TODO: To be replaced by IANA
id-Kyber512-ECDH-P256-KMAC128 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) explicitcomposite-kem(2) id-kyber512-ecdh-p256(1) }
pk-Kyber512-ECDH-P256-KMAC128 PUBLIC-KEY ::=
pk-explicitCompositeKEM{id-Kyber512-ECDH-P256-KMAC128,
pk-Kyber512TBD, OCTET STRING, pk-ec, ECPoint}
--TODO: this is missing `PARAMS secp256r1`
-- TODO: To be replaced by IANA
id-Kyber512-ECDH-brainpoolP256r1-KMAC128 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) explicitcomposite-kem(2) id-kyber512-ecdh-brainpoolp256r1(2) }
pk-Kyber512-ECDH-brainpoolP256r1-KMAC128 PUBLIC-KEY ::=
pk-explicitCompositeKEM{id-Kyber512-ECDH-brainpoolP256r1-KMAC128,
pk-Kyber512TBD, OCTET STRING, pk-ec, ECPoint}
--TODO: this is missing `PARAMS brainpoolp256r1`
-- TODO: To be replaced by IANA
id-Kyber512-X25519-KMAC128 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) kem(2)
id-kyber512-x25519(3) }
pk-Kyber512-X25519-KMAC128 PUBLIC-KEY ::=
pk-explicitCompositeKEM{id-Kyber512-X25519-KMAC128,
pk-Kyber512TBD, OCTET STRING, pk-X25519, OCTET STRING}
-- TODO: To be replaced by IANA
id-Kyber768-RSA-KMAC256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) kem(2)
id-kyber768-rsa(4) }
pk-Kyber768-RSA-KMAC256 PUBLIC-KEY ::=
pk-explicitCompositeKEM{id-Kyber768-RSA-KMAC256,
pk-Kyber768TBD, OCTET STRING, pk-rsa, RSAPublicKey}
-- TODO: To be replaced by IANA
id-Kyber768-ECDH-P256-KMAC256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) kem(2)
id-kyber768-ecdh-p256(5) }
pk-Kyber768-ECDH-P256-KMAC256 PUBLIC-KEY ::=
pk-explicitCompositeKEM{id-Kyber768-ECDH-P256-KMAC256,
pk-Kyber768TBD, OCTET STRING, pk-ec, ECPoint}
--TODO: this is missing `PARAMS secp256r1`
id-Kyber768-ECDH-brainpoolP256r1-KMAC256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) kem(2)
id-kyber768-ecdh-p256(6) }
pk-Kyber768-ECDH-brainpoolP256r1-KMAC256 PUBLIC-KEY ::=
pk-explicitCompositeKEM{id-Kyber768-ECDH-brainpoolP256r1-KMAC256,
pk-Kyber768TBD, OCTET STRING, pk-ec, ECPoint}
--TODO: this is missing `PARAMS brainpoolp256r1`
-- TODO: To be replaced by IANA
id-Kyber768-X25519-KMAC256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) kem(2)
id-kyber768-x25519(7) }
pk-Kyber768-X25519-KMAC256 PUBLIC-KEY ::=
pk-explicitCompositeKEM{id-Kyber768-X25519-KMAC256,
pk-Kyber768TBD, OCTET STRING, pk-X25519, OCTET STRING}
-- TODO: To be replaced by IANA
id-Kyber1024-ECDH-P384-KMAC256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) kem(2)
id-kyber1024-ecdh-p384(8) }
pk-Kyber1024-ECDH-P384-KMAC256 PUBLIC-KEY ::=
pk-explicitCompositeKEM{id-Kyber1024-ECDH-P384-KMAC256,
pk-Kyber1024TBD, OCTET STRING, pk-ec, ECPoint}
--TODO: this is missing `PARAMS secp384r1`
-- TODO: To be replaced by IANA
id-Kyber1024-ECDH-brainpoolP384r1-KMAC256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) kem(2)
id-kyber1024-ecdh-brainpoolp384r1(9) }
pk-Kyber1024-ECDH-brainpoolP384r1-KMAC256 PUBLIC-KEY ::=
pk-explicitCompositeKEM{id-Kyber1024-ECDH-brainpoolP384r1-KMAC256,
pk-Kyber1024TBD, OCTET STRING, pk-ec, ECPoint}
--TODO: this is missing `PARAMS brainpoolp384r1`
-- TODO: To be replaced by IANA
id-Kyber1024-X448-KMAC256 OBJECT IDENTIFIER ::= {
joint-iso-itu-t(2) country(16) us(840) organization(1) entrust(114027)
algorithm(80) explicitcomposite(5) kem(2)
id-kyber1024-x448(10) }
pk-Kyber1024-X448-KMAC256 PUBLIC-KEY ::=
pk-explicitCompositeKEM{id-Kyber1024-X448-KMAC256,
pk-Kyber1024TBD, OCTET STRING, pk-X448, OCTET STRING}
END