Skip to content

Commit a62420d

Browse files
committed
Add ShangMi (SM2/SM3/SM4/SM9) algorithm families (CycloneDX#811)
Signed-off-by: Mehrn0ush <mehrnoush.vaseghi@gmail.com>
1 parent 8c16b5c commit a62420d

2 files changed

Lines changed: 73 additions & 1 deletion

File tree

schema/cryptography-defs.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,74 @@
827827
}
828828
]
829829
},
830+
{
831+
"family": "SM2",
832+
"standard": [
833+
{
834+
"name": "RFC8998",
835+
"url": "https://www.rfc-editor.org/rfc/rfc8998.html"
836+
}
837+
],
838+
"variant": [
839+
{
840+
"pattern": "SM2[-{keyLength}]",
841+
"primitive": "signature"
842+
},
843+
{
844+
"pattern": "SM2-ENC[-{keyLength}]",
845+
"primitive": "pke"
846+
},
847+
{
848+
"pattern": "SM2-KEYEXCHANGE[-{keyLength}]",
849+
"primitive": "key-agree"
850+
}
851+
]
852+
},
853+
{
854+
"family": "SM3",
855+
"standard": [
856+
{
857+
"name": "RFC8998",
858+
"url": "https://www.rfc-editor.org/rfc/rfc8998.html"
859+
}
860+
],
861+
"variant": [
862+
{
863+
"pattern": "SM3",
864+
"primitive": "hash"
865+
}
866+
]
867+
},
868+
{
869+
"family": "SM4",
870+
"standard": [
871+
{
872+
"name": "ISO/IEC18033-3:2010/Amd1:2021",
873+
"url": "https://www.iso.org/standard/81564.html"
874+
}
875+
],
876+
"variant": [
877+
{
878+
"pattern": "SM4[-(ECB|CBC|CFB|OFB|CTR|XTS)][-{padding}][-{ivlen}]",
879+
"primitive": "block-cipher"
880+
}
881+
]
882+
},
883+
{
884+
"family": "SM9",
885+
"standard": [
886+
{
887+
"name": "RFC8998",
888+
"url": "https://www.rfc-editor.org/rfc/rfc8998.html"
889+
}
890+
],
891+
"variant": [
892+
{
893+
"pattern": "SM9",
894+
"primitive": "other"
895+
}
896+
]
897+
},
830898
{
831899
"family": "SEED",
832900
"standard": [

schema/cryptography-defs.schema.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,10 @@
305305
"SHA-2",
306306
"SHA-3",
307307
"SLH-DSA",
308+
"SM2",
309+
"SM3",
310+
"SM4",
311+
"SM9",
308312
"SNOW3G",
309313
"SP800-108",
310314
"Salsa20",
@@ -573,4 +577,4 @@
573577
]
574578
}
575579
}
576-
}
580+
}

0 commit comments

Comments
 (0)