Skip to content

Commit 167deb9

Browse files
Review algorithm list, apply rules for patterns (#646)
The following rules apply for the patterns: {placeholder} -> required parameter with placeholder (option1|option2) -> required parameter with fixed alternatives [parameter] -> optional parameter [-{placeholder}] -> optional parameter with literal separator <!-- Thank you for taking the time to develop and contribute a core enhancement or fix for a defect! We kindly request that you create pull requests only for things that have been discussed in a ticket first; exceptions may be made for spelling or grammar fixes. Read more about the process here: https://cyclonedx.org/participate/standardization-process/#working-model Please have the related ticket/issue ID ready. If there is none, feel free to create a new ticket: https://github.com/CycloneDX/specification/issues/new/choose --> <!-- Please provide a brief description of what this pull request intends to do and which ticket it fixes/closes. Example: > As discussed in ticket #485, this PR adds Streebog to the hash algorithm enum. > > fixes #485 In case this is for a spelling or grammar improvement, please provide a brief description. Example: > Fixe typo: color(AE) -> colour(BE) -->
2 parents ab88132 + 193c4d8 commit 167deb9

1 file changed

Lines changed: 60 additions & 44 deletions

File tree

schema/cryptography-defs.json

Lines changed: 60 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"variant": [
1212
{
13-
"pattern": "RSA-PKCS1-1.5-{digestAlgorithm}-{keyLength}",
13+
"pattern": "RSA-PKCS1-1.5[-{digestAlgorithm}][-{keyLength}]",
1414
"primitive": "signature"
1515
}
1616
]
@@ -23,7 +23,7 @@
2323
],
2424
"variant": [
2525
{
26-
"pattern": "RSA-PSS-{digestAlgorithm}-{saltLength}-{keyLength}",
26+
"pattern": "RSA-PSS[-{digestAlgorithm}][-{saltLength}][-{keyLength}]",
2727
"primitive": "signature"
2828
}
2929
]
@@ -35,7 +35,7 @@
3535
],
3636
"variant": [
3737
{
38-
"pattern": "RSA-PKCS1-1.5-{keyLength}",
38+
"pattern": "RSA-PKCS1-1.5[-{keyLength}]",
3939
"primitive": "pke"
4040
}
4141
]
@@ -47,7 +47,7 @@
4747
],
4848
"variant": [
4949
{
50-
"pattern": "RSA-OAEP-{hashAlgorithm}-{maskGenAlgorithm}-{keyLength}",
50+
"pattern": "RSA-OAEP[-{hashAlgorithm}][-{maskGenAlgorithm}][-{keyLength}]",
5151
"primitive": "pke"
5252
}
5353
]
@@ -59,7 +59,7 @@
5959
],
6060
"variant": [
6161
{
62-
"pattern": "Ed{25519|448}{|ph|ctx}",
62+
"pattern": "Ed(25519|448)[-(ph|ctx)]",
6363
"primitive": "signature"
6464
}
6565
]
@@ -72,7 +72,7 @@
7272
],
7373
"variant": [
7474
{
75-
"pattern": "ECDSA-{curve}-{hash}",
75+
"pattern": "ECDSA[-{ellipticCurve}][-{hash}]",
7676
"primitive": "signature"
7777
}
7878
]
@@ -84,7 +84,7 @@
8484
],
8585
"variant": [
8686
{
87-
"pattern": "DSA-{length}-{hash}",
87+
"pattern": "DSA[-{length}][-{hash}]",
8888
"primitive": "signature"
8989
}
9090
]
@@ -98,7 +98,7 @@
9898
],
9999
"variant": [
100100
{
101-
"pattern": "ECDH{E}-{curve}",
101+
"pattern": "ECDH[E][-{ellipticCurve}]",
102102
"primitive": "key-agree"
103103
}
104104
]
@@ -111,7 +111,7 @@
111111
],
112112
"variant": [
113113
{
114-
"pattern": "FFDH{E}-{named_group}",
114+
"pattern": "FFDH(E)[-{namedGroup}]",
115115
"primitive": "key-agree"
116116
}
117117
]
@@ -135,7 +135,7 @@
135135
],
136136
"variant": [
137137
{
138-
"pattern": "SHA-{224|256|384|512|512/224|512/256}",
138+
"pattern": "SHA-(224|256|384|512|512/224|512/256)",
139139
"primitive": "hash"
140140
}
141141
]
@@ -194,30 +194,30 @@
194194
],
195195
"variant": [
196196
{
197-
"pattern": "AES-{128|192|256}-(ECB|CBC|CFB(1|8|64|128)|OFB|CTR|XTS|CTS)-(padding)-(ivlen)",
197+
"pattern": "AES[-(128|192|256)][-(ECB|CBC|CFB(1|8|64|128)|OFB|CTR|XTS|CTS)][-{padding}][-{ivlen}]",
198198
"primitive": "block-cipher"
199199
},
200200
{
201201
"standard": [
202202
{"name": "SP800-38D", "url": "https://doi.org/10.6028/NIST.SP.800-38D"},
203203
{"name": "RFC 3610", "url": "https://doi.org/10.17487/RFC5116"}
204204
],
205-
"pattern": "AES-{128|192|256}-(GCM|CCM)-(taglen)-(ivlen)",
205+
"pattern": "AES[-(128|192|256)][-(GCM|CCM)][-{tagLength}][-{ivLength}]",
206206
"primitive": "ae"
207207
},
208208
{
209209
"standard": [
210210
{"name": "RFC5649", "url": "https://doi.org/10.17487/RFC5649"}
211211
],
212-
"pattern": "AES-{128|192|256}-Wrap-(PAD|KWP|PKCS7)",
212+
"pattern": "AES[-(128|192|256)]-Wrap[-(PAD|KWP|PKCS7)]",
213213
"primitive": "key-wrap"
214214
},
215215
{
216-
"pattern": "AES-{128|192|256}-(GMAC|CMAC)",
216+
"pattern": "AES[-(128|192|256)][-(GMAC|CMAC)]",
217217
"primitive": "mac"
218218
},
219219
{
220-
"pattern": "AES-{128|192|256}-(XCBC_MAC(_96))",
220+
"pattern": "AES[-(128|192|256)][-(XCBC_MAC[_96])]",
221221
"primitive": "mac"
222222
}
223223
]
@@ -229,7 +229,7 @@
229229
],
230230
"variant": [
231231
{
232-
"pattern": "HKDF-{hash}",
232+
"pattern": "HKDF[-{hashFunction}]",
233233
"primitive": "kdf"
234234
}
235235
]
@@ -242,7 +242,7 @@
242242
],
243243
"variant": [
244244
{
245-
"pattern": "HMAC-{hash}-{length}",
245+
"pattern": "HMAC[-{hashFunction}][-{tagLength}]",
246246
"primitive": "mac"
247247
}
248248
]
@@ -254,7 +254,7 @@
254254
],
255255
"variant": [
256256
{
257-
"pattern": "CMAC-{cipher_algorithm}-{length}",
257+
"pattern": "CMAC[-{cipherAlgorithm}][-{length}]",
258258
"primitive": "mac"
259259
}
260260
]
@@ -266,7 +266,7 @@
266266
],
267267
"variant": [
268268
{
269-
"pattern": "KMAC-(128|256)",
269+
"pattern": "KMAC[-(128|256)]",
270270
"primitive": "mac"
271271
}
272272
]
@@ -278,7 +278,7 @@
278278
],
279279
"variant": [
280280
{
281-
"pattern": "ChaCha20-{AES|other}",
281+
"pattern": "ChaCha20[-(AES|{otherBlockCipher})]",
282282
"primitive": "stream-cipher"
283283
}
284284
]
@@ -354,7 +354,7 @@
354354
],
355355
"variant": [
356356
{
357-
"pattern": "RC4-{length}",
357+
"pattern": "RC4[-{keyLength}]",
358358
"primitive": "stream-cipher"
359359
}
360360
]
@@ -367,7 +367,7 @@
367367
],
368368
"variant": [
369369
{
370-
"pattern": "3DES-{length}-{mode}",
370+
"pattern": "3DES[-{keyLength}][-{mode}]",
371371
"primitive": "block-cipher"
372372
}
373373
]
@@ -380,7 +380,7 @@
380380
],
381381
"variant": [
382382
{
383-
"pattern": "DES-{length}-{mode}",
383+
"pattern": "DES[-{keyLength}][-{mode}]",
384384
"primitive": "block-cipher"
385385
}
386386
]
@@ -392,7 +392,7 @@
392392
],
393393
"variant": [
394394
{
395-
"pattern": "IDEA-{mode}",
395+
"pattern": "IDEA[-{mode}]",
396396
"primitive": "block-cipher"
397397
}
398398
]
@@ -404,7 +404,7 @@
404404
],
405405
"variant": [
406406
{
407-
"pattern": "RC2-{length}-{mode}",
407+
"pattern": "RC2[-{keyLength}][-{mode}]",
408408
"primitive": "block-cipher"
409409
}
410410
]
@@ -428,7 +428,7 @@
428428
],
429429
"variant": [
430430
{
431-
"pattern": "HashML-DSA-(44|65|87)-(hash)",
431+
"pattern": "HashML-DSA-(44|65|87)[-{hashFunction}]",
432432
"primitive": "signature"
433433
}
434434
]
@@ -440,7 +440,7 @@
440440
],
441441
"variant": [
442442
{
443-
"pattern": "HashSLH-DSA-(SHA2|SHAKE)-(128s|128f|192s|192f|256s|256f)-",
443+
"pattern": "HashSLH-DSA-(SHA2|SHAKE)-(128s|128f|192s|192f|256s|256f)",
444444
"primitive": "signature"
445445
}
446446
]
@@ -453,15 +453,15 @@
453453
],
454454
"variant": [
455455
{
456-
"pattern": "XMSS-(SHA2|SHAKE)_(h)_(nbits)",
456+
"pattern": "XMSS-(SHA2|SHAKE)[_{h}][_{nbits}]",
457457
"primitive": "signature"
458458
},
459459
{
460-
"pattern": "XMSSMT-(SHA2|SHAKE)_(h)/(d)_(nbits)",
460+
"pattern": "XMSSMT-(SHA2|SHAKE)[_{h}/{d}][_{nbits}]",
461461
"primitive": "signature"
462462
},
463463
{
464-
"pattern": "WOTSP-(SHA2|SHAKE)_(nbits)",
464+
"pattern": "WOTSP-(SHA2|SHAKE)[_{nbits}]",
465465
"primitive": "signature"
466466
}
467467
]
@@ -474,11 +474,11 @@
474474
],
475475
"variant": [
476476
{
477-
"pattern": "LMS_(hashfun)_M(bytespernode)_H(treeheight)",
477+
"pattern": "LMS[_{hashFunction}][_M{bytesPerNode}][_H{treeHeight}]",
478478
"primitive": "signature"
479479
},
480480
{
481-
"pattern": "LMOTS_(hashfun)_N(bytespernode)_H(treeheight)",
481+
"pattern": "LMOTS[_{hashfun}][_N{bytespernode}][_H{treeheight}]",
482482
"primitive": "signature"
483483
}
484484
]
@@ -544,7 +544,7 @@
544544
"standard": [
545545
{"name": "RFC4357", "url": "https://doi.org/10.17487/RFC4357"}
546546
],
547-
"pattern": "GOST38147-(mode)-(padding)",
547+
"pattern": "GOST38147[-{mode}][-{padding}]",
548548
"primitive": "block-cipher"
549549
},
550550
{
@@ -564,11 +564,11 @@
564564
],
565565
"variant": [
566566
{
567-
"pattern": "SEED-128-(mode)-(padding)",
567+
"pattern": "SEED-128[-{mode}][-{padding}]",
568568
"primitive": "block-cipher"
569569
},
570570
{
571-
"pattern": "SEED-128-(mode)-(padding)-HMAC-(hash)-length",
571+
"pattern": "SEED-128[-{mode}][-{padding}]-HMAC[-{hashFunction}][-{tagLength}]",
572572
"primitive": "ae"
573573
},
574574
{
@@ -584,11 +584,11 @@
584584
],
585585
"variant": [
586586
{
587-
"pattern": "ARIA-(128|192|256)-(mode)-(padding)",
587+
"pattern": "ARIA-(128|192|256)[-{mode}][-{padding}]",
588588
"primitive": "block-cipher"
589589
},
590590
{
591-
"pattern": "ARIA-(128|192|256)-(authmode)-(padding)",
591+
"pattern": "ARIA-(128|192|256)[-{authmode}][-{padding}]",
592592
"primitive": "ae"
593593
}
594594
]
@@ -600,11 +600,11 @@
600600
],
601601
"variant": [
602602
{
603-
"pattern": "CAMELLIA-(128|192|256)-(mode)-(padding)",
603+
"pattern": "CAMELLIA-(128|192|256)[-{mode}][-{padding}]",
604604
"primitive": "block-cipher"
605605
},
606606
{
607-
"pattern": "CAMELLIA-(128|192|256)-(authmode)-(padding)",
607+
"pattern": "CAMELLIA-(128|192|256)[-{authmode}][-{padding}]",
608608
"primitive": "ae"
609609
}
610610
]
@@ -616,7 +616,7 @@
616616
],
617617
"variant": [
618618
{
619-
"pattern": "Twofish-(128|192|256)-(mode)-(padding)",
619+
"pattern": "Twofish-(128|192|256)[-{mode}][-{padding}]",
620620
"primitive": "block-cipher"
621621
}
622622
]
@@ -628,7 +628,7 @@
628628
],
629629
"variant": [
630630
{
631-
"pattern": "Blowfish-(keylength)-(mode)-(padding)",
631+
"pattern": "Blowfish[-{keyLength}][-{mode}][-{padding}]",
632632
"primitive": "block-cipher"
633633
}
634634
]
@@ -640,7 +640,7 @@
640640
],
641641
"variant": [
642642
{
643-
"pattern": "SP800_108_(CounterKDF|FeedbackKDF|DoublePipelineKDF)-(prf-function)-(dkmlength)",
643+
"pattern": "SP800_108_(CounterKDF|FeedbackKDF|DoublePipelineKDF)[-{prfFunction}][-{dkmLength}]",
644644
"primitive": "key-derive"
645645
}
646646
]
@@ -670,7 +670,7 @@
670670
"primitive": "mac"
671671
},
672672
{
673-
"pattern": "(hash)-PBE-(block_cipher)",
673+
"pattern": "{hashFunction}-PBE-{blockCipher}",
674674
"primitive": "block-cipher"
675675
},
676676
{
@@ -702,10 +702,26 @@
702702
],
703703
"variant": [
704704
{
705-
"pattern": "X3DH-(hash)",
705+
"pattern": "X3DH[-{hashFunction}]",
706706
"primitive": "key-agree"
707707
}
708708
]
709+
},
710+
{
711+
"family": "BLS",
712+
"standard": [
713+
{"name": "Short Signatures from the Weil Pairing", "url": "https://dx.doi.org/10.1007/3-540-45682-1_30"}
714+
],
715+
"variant": [
716+
{
717+
"pattern": "BLS(13-381|13-377|BN254)",
718+
"primitive": "signature"
719+
},
720+
{
721+
"pattern": "BLS[-{ellipticCurve}]",
722+
"primitive": "signature"
723+
}
724+
]
709725
}
710726
]
711727
}

0 commit comments

Comments
 (0)