Add ShangMi (SM2/SM3/SM4/SM9) algorithm families#812
Add ShangMi (SM2/SM3/SM4/SM9) algorithm families#812Mehrn0ush wants to merge 1 commit intoCycloneDX:masterfrom
Conversation
Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
|
Hi @bhess — if you have time, would you mind taking a look at this one as well? This adds ShangMi (SM2/SM3/SM4/SM9) families and updates the schema enum. Thanks a lot — always appreciate your feedback. |
|
cc: @bhess |
bhess
left a comment
There was a problem hiding this comment.
Thanks @Mehrn0ush for the additions! See the comments inline.
| "variant": [ | ||
| { | ||
| "pattern": "SM4[-(ECB|CBC|CFB|OFB|CTR|XTS)][-{padding}][-{ivlen}]", | ||
| "primitive": "block-cipher" |
There was a problem hiding this comment.
the "ae" modes seem to be missing (e.g., CCM, GCM..)
| "family": "SM9", | ||
| "standard": [ | ||
| { | ||
| "name": "RFC8998", |
There was a problem hiding this comment.
SM9 seems to be not specified in RFC8998. See https://en.wikipedia.org/wiki/SM9_(cryptography_standard) for the references.
| ], | ||
| "variant": [ | ||
| { | ||
| "pattern": "SM9", |
There was a problem hiding this comment.
rather than a single "other" primitive, it might be worth splitting this up to different variants.
I didn't look at the standard in the detail, but see https://en.wikipedia.org/wiki/SM9_(cryptography_standard), there are different primitives:
- signature
- keyagree/wrap
- kem
Fixes #811
Adds SM2/SM3/SM4/SM9 algorithm families to the CycloneDX cryptography registry and updates algorithmFamiliesEnum accordingly.
Note: some official ShangMi specification mirrors appear region-blocked or unreliable from multiple locations.
To avoid fragile links in the registry, this PR relies on globally accessible references (RFC Editor + ISO)