aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/ec_group/ec_named.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-06-21 14:43:52 -0400
committerJack Lloyd <[email protected]>2017-06-29 12:38:37 -0400
commit6ac870e6d81d98420a102661a27ad9b521da86f5 (patch)
tree0341a30bbf1003614e81e54f98b0a08105b6d9d1 /src/lib/pubkey/ec_group/ec_named.cpp
parent8b0986310ae9fdf7fa93e28e2820d818cc954cdd (diff)
Add SM2 signature scheme
From https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02 This is a contribution from Ribose Inc (@riboseinc).
Diffstat (limited to 'src/lib/pubkey/ec_group/ec_named.cpp')
-rw-r--r--src/lib/pubkey/ec_group/ec_named.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/pubkey/ec_group/ec_named.cpp b/src/lib/pubkey/ec_group/ec_named.cpp
index 2aef0ad31..fc4a67fc6 100644
--- a/src/lib/pubkey/ec_group/ec_named.cpp
+++ b/src/lib/pubkey/ec_group/ec_named.cpp
@@ -266,6 +266,16 @@ std::string EC_Group::PEM_for_named_group(const std::string& name)
"8f0XjAs61Y8QEm3ozkJDW1PcZ+FA0r+UH/3UWcbWVeECAQE="
"-----END EC PARAMETERS-----";
+ if(name == "sm2p256v1")
+ return
+ "-----BEGIN EC PARAMETERS-----"
+ "MIHgAgEBMCwGByqGSM49AQECIQD////+/////////////////////wAAAAD/////"
+ "/////zBEBCD////+/////////////////////wAAAAD//////////AQgKOn6np2f"
+ "XjRNWp5Lz2UJp/OXifUVq4+S3by9QU2UDpMEQQQyxK4sHxmBGV+ZBEZqOcmUj+ML"
+ "v/JmC+FxWkWJM0x0x7w3NqL09necWb3O42tpIVPQqYd8xipHQALfMuUhOfCgAiEA"
+ "/////v///////////////3ID32shxgUrU7v0CTnVQSMCAQE="
+ "-----END EC PARAMETERS-----";
+
#if defined(BOTAN_HOUSE_ECC_CURVE_NAME)
if(name == BOTAN_HOUSE_ECC_CURVE_NAME)
return BOTAN_HOUSE_ECC_CURVE_PEM;