aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/ec_dompar/ec_dompar.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-19 21:33:33 +0000
committerlloyd <[email protected]>2009-11-19 21:33:33 +0000
commiteacba105e221c84885b4bbb0409d7e7755d32ffb (patch)
treea0f3e5d132ea931874dfeca4f1a62298fb40e14f /src/pubkey/ec_dompar/ec_dompar.cpp
parent390d8e682689ab2587aecb7987632f5b0eab7e3e (diff)
Add an implementation of GOST 34.10-2001 as described in
draft-dolmatov-cryptocom-gost34102001-06 Known problem: GOST's X.509 (and PKCS #8?) formats are different from ECDSA. ECDSA uses compressed points, GOST uses a completely raw pair of points (with, OF COURSE, no leading uncompressed pair identifier, because using something that already exists would just be too much).
Diffstat (limited to 'src/pubkey/ec_dompar/ec_dompar.cpp')
-rw-r--r--src/pubkey/ec_dompar/ec_dompar.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pubkey/ec_dompar/ec_dompar.cpp b/src/pubkey/ec_dompar/ec_dompar.cpp
index 0b5a6e681..a23e31cf1 100644
--- a/src/pubkey/ec_dompar/ec_dompar.cpp
+++ b/src/pubkey/ec_dompar/ec_dompar.cpp
@@ -409,6 +409,18 @@ std::vector<std::string> get_standard_domain_parameter(const std::string& oid)
return dom_par;
}
+ if(oid == "1.2.643.2.2.35.1") // GostR3410-2001-CryptoPro-A-ParamSet
+ {
+ std::vector<std::string> dom_par;
+ dom_par.push_back("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD97");
+ dom_par.push_back("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD94");
+ dom_par.push_back("166");
+ dom_par.push_back("0400000000000000000000000000000000000000000000000000000000000000018D91E471E0989CDA27DF505A453F2B7635294F2DDF23E3B122ACC99C9E9F1E14");
+ dom_par.push_back("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6C611070995AD10045841B09B761B893");
+ dom_par.push_back("1");
+ return dom_par;
+ }
+
throw Invalid_Argument("No such ECC curve " + oid);
}