summary refs log tree commit diff
path: root/crypto/src/security/SignerUtilities.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/security/SignerUtilities.cs')
-rw-r--r--crypto/src/security/SignerUtilities.cs30
1 files changed, 29 insertions, 1 deletions
diff --git a/crypto/src/security/SignerUtilities.cs b/crypto/src/security/SignerUtilities.cs
index e42e217cc..e6210dad7 100644
--- a/crypto/src/security/SignerUtilities.cs
+++ b/crypto/src/security/SignerUtilities.cs
@@ -19,6 +19,7 @@ using Org.BouncyCastle.Crypto.Engines;
 using Org.BouncyCastle.Crypto.Signers;
 using Org.BouncyCastle.Utilities;
 using Org.BouncyCastle.Utilities.Collections;
+using Org.BouncyCastle.Asn1.Rosstandart;
 
 namespace Org.BouncyCastle.Security
 {
@@ -367,13 +368,29 @@ namespace Org.BouncyCastle.Security
             AlgorithmMap["GOST-3410"] = "GOST3410";
             AlgorithmMap["GOST-3410-94"] = "GOST3410";
             AlgorithmMap["GOST3411WITHGOST3410"] = "GOST3410";
+            AlgorithmMap["GOST3411/GOST3410"] = "GOST3410";
             AlgorithmMap[CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94.Id] = "GOST3410";
 
             AlgorithmMap["ECGOST-3410"] = "ECGOST3410";
-            AlgorithmMap["ECGOST-3410-2001"] = "ECGOST3410";
+            AlgorithmMap["GOST-3410-2001"] = "ECGOST3410";
             AlgorithmMap["GOST3411WITHECGOST3410"] = "ECGOST3410";
+            AlgorithmMap["GOST3411/ECGOST3410"] = "ECGOST3410";
             AlgorithmMap[CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001.Id] = "ECGOST3410";
 
+            AlgorithmMap["GOST-3410-2012-256"] = "ECGOST3410-2012-256";
+            AlgorithmMap["GOST3411WITHECGOST3410-2012-256"] = "ECGOST3410-2012-256";
+            AlgorithmMap["GOST3411-2012-256WITHECGOST3410-2012-256"] = "ECGOST3410-2012-256";
+            AlgorithmMap["GOST3411-2012-256/ECGOST3410-2012-256"] = "ECGOST3410-2012-256";
+            AlgorithmMap[RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_256.Id] =
+                "ECGOST3410-2012-256";
+
+            AlgorithmMap["GOST-3410-2012-512"] = "ECGOST3410-2012-512";
+            AlgorithmMap["GOST3411WITHECGOST3410-2012-512"] = "ECGOST3410-2012-512";
+            AlgorithmMap["GOST3411-2012-512WITHECGOST3410-2012-512"] = "ECGOST3410-2012-512";
+            AlgorithmMap["GOST3411-2012-512/ECGOST3410-2012-512"] = "ECGOST3410-2012-512";
+            AlgorithmMap[RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_512.Id] =
+                "ECGOST3410-2012-512";
+
             AlgorithmMap["ED25519"] = "Ed25519";
             AlgorithmMap[EdECObjectIdentifiers.id_Ed25519.Id] = "Ed25519";
             AlgorithmMap["ED25519CTX"] = "Ed25519ctx";
@@ -439,6 +456,9 @@ namespace Org.BouncyCastle.Security
             Oids["GOST3410"] = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x94;
             Oids["ECGOST3410"] = CryptoProObjectIdentifiers.GostR3411x94WithGostR3410x2001;
 
+            Oids["ECGOST3410-2012-256"] = RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_256;
+            Oids["ECGOST3410-2012-512"] = RosstandartObjectIdentifiers.id_tc26_signwithdigest_gost_3410_12_512;
+
             Oids["Ed25519"] = EdECObjectIdentifiers.id_Ed25519;
             Oids["Ed448"] = EdECObjectIdentifiers.id_Ed448;
 
@@ -618,6 +638,14 @@ namespace Org.BouncyCastle.Security
             {
                 return new Gost3410DigestSigner(new ECGost3410Signer(), new Gost3411Digest());
             }
+            if (mechanism.Equals("ECGOST3410-2012-256"))
+            {
+                return new Gost3410DigestSigner(new ECGost3410Signer(), new Gost3411_2012_256Digest());
+            }
+            if (mechanism.Equals("ECGOST3410-2012-512"))
+            {
+                return new Gost3410DigestSigner(new ECGost3410Signer(), new Gost3411_2012_512Digest());
+            }
 
             if (mechanism.Equals("SHA1WITHRSA/ISO9796-2"))
             {