Skip to content

Commit fd763e5

Browse files
committed
Add ShangMi AEAD modes and refine SM9 variants
Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
1 parent a62420d commit fd763e5

1 file changed

Lines changed: 23 additions & 7 deletions

File tree

schema/cryptography-defs.json

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -837,15 +837,15 @@
837837
],
838838
"variant": [
839839
{
840-
"pattern": "SM2[-{keyLength}]",
840+
"pattern": "SM2-256",
841841
"primitive": "signature"
842842
},
843843
{
844-
"pattern": "SM2-ENC[-{keyLength}]",
844+
"pattern": "SM2-(ENC|ENCRYPTION)-256",
845845
"primitive": "pke"
846846
},
847847
{
848-
"pattern": "SM2-KEYEXCHANGE[-{keyLength}]",
848+
"pattern": "SM2-(KEX|KEYEXCHANGE|KEY-EXCHANGE)-256",
849849
"primitive": "key-agree"
850850
}
851851
]
@@ -877,21 +877,37 @@
877877
{
878878
"pattern": "SM4[-(ECB|CBC|CFB|OFB|CTR|XTS)][-{padding}][-{ivlen}]",
879879
"primitive": "block-cipher"
880+
},
881+
{
882+
"pattern": "SM4-(GCM|CCM)[-{tagLength}][-{ivLength}]",
883+
"primitive": "ae"
880884
}
881885
]
882886
},
883887
{
884888
"family": "SM9",
885889
"standard": [
886890
{
887-
"name": "RFC8998",
888-
"url": "https://www.rfc-editor.org/rfc/rfc8998.html"
891+
"name": "GM/T0044.1-2016",
892+
"url": "https://www.gmbz.org.cn/upload/2025-01-23/1737625691994053970.pdf"
889893
}
890894
],
891895
"variant": [
892896
{
893-
"pattern": "SM9",
894-
"primitive": "other"
897+
"pattern": "SM9-(SIG|SIGNATURE)",
898+
"primitive": "signature"
899+
},
900+
{
901+
"pattern": "SM9-(KEX|KEYEXCHANGE|KEY-EXCHANGE|KEYAGREE|KEYAGREEMENT|KEY-AGREE|KEY-AGREEMENT)",
902+
"primitive": "key-agree"
903+
},
904+
{
905+
"pattern": "SM9-(KEM|KEYENCAPSULATION|KEY-ENCAPSULATION)",
906+
"primitive": "kem"
907+
},
908+
{
909+
"pattern": "SM9-(ENC|ENCRYPTION|PKE|PUBLICKEY-ENCRYPTION|PUBLIC-KEY-ENCRYPTION)",
910+
"primitive": "pke"
895911
}
896912
]
897913
},

0 commit comments

Comments
 (0)