Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions schema/cryptography-defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,90 @@
}
]
},
{
"family": "SM2",
"standard": [
{
"name": "RFC8998",
"url": "https://www.rfc-editor.org/rfc/rfc8998.html"
}
],
"variant": [
{
"pattern": "SM2[-256]",
"primitive": "signature"
},
{
"pattern": "SM2-(ENC|ENCRYPTION)[-256]",
"primitive": "pke"
},
{
"pattern": "SM2-(KEX|KEYEXCHANGE|KEY-EXCHANGE|KEYAGREE|KEY-AGREE|KEYAGREEMENT|KEY-AGREEMENT)[-256]",
"primitive": "key-agree"
}
]
},
{
"family": "SM3",
"standard": [
{
"name": "RFC8998",
"url": "https://www.rfc-editor.org/rfc/rfc8998.html"
}
],
"variant": [
{
"pattern": "SM3",
"primitive": "hash"
}
]
},
{
"family": "SM4",
"standard": [
{
"name": "ISO/IEC18033-3:2010/Amd1:2021",
"url": "https://www.iso.org/standard/81564.html"
}
],
"variant": [
{
"pattern": "SM4[-(ECB|CBC|CFB|OFB|CTR|XTS)][-{padding}][-{ivlen}]",
"primitive": "block-cipher"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the "ae" modes seem to be missing (e.g., CCM, GCM..)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the note — you’re absolutely right. I’ve added an explicit ae variant for SM4 covering GCM and CCM (pattern: SM4-(GCM|CCM)[-{tagLength}][-{ivLength}]), and kept the existing block-mode variant (ECB/CBC/CFB/OFB/CTR/XTS) under block-cipher. This mirrors the registry’s existing separation of block modes vs authenticated-encryption modes.

},
{
"pattern": "SM4-(GCM|CCM)[-{tagLength}][-{ivLength}]",
"primitive": "ae"
}
]
},
{
"family": "SM9",
"standard": [
{
"name": "GM/T0044.1-2016",
"url": "https://www.gmbz.org.cn/upload/2025-01-23/1737625691994053970.pdf"
}
],
"variant": [
{
"pattern": "SM9-(SIG|SIGNATURE)",
"primitive": "signature"
},
{
"pattern": "SM9-(KEX|KEYEXCHANGE|KEY-EXCHANGE|KEYAGREE|KEYAGREEMENT|KEY-AGREE|KEY-AGREEMENT)",
"primitive": "key-agree"
},
{
"pattern": "SM9-(KEM|KEYENCAPSULATION|KEY-ENCAPSULATION)",
"primitive": "kem"
},
{
"pattern": "SM9-(ENC|ENCRYPTION|PKE|PUBLICKEY-ENCRYPTION|PUBLIC-KEY-ENCRYPTION)",
"primitive": "pke"
}
]
},
{
"family": "SEED",
"standard": [
Expand Down
6 changes: 5 additions & 1 deletion schema/cryptography-defs.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@
"SHA-2",
"SHA-3",
"SLH-DSA",
"SM2",
"SM3",
"SM4",
"SM9",
"SNOW3G",
"SP800-108",
"Salsa20",
Expand Down Expand Up @@ -573,4 +577,4 @@
]
}
}
}
}