diff options
Diffstat (limited to 'crypto/src/security/PrivateKeyFactory.cs')
-rw-r--r-- | crypto/src/security/PrivateKeyFactory.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/src/security/PrivateKeyFactory.cs b/crypto/src/security/PrivateKeyFactory.cs index d9d855c45..c4fabae2d 100644 --- a/crypto/src/security/PrivateKeyFactory.cs +++ b/crypto/src/security/PrivateKeyFactory.cs @@ -2,8 +2,10 @@ using System; using System.IO; using Org.BouncyCastle.Asn1; +using Org.BouncyCastle.Asn1.Cryptlib; using Org.BouncyCastle.Asn1.CryptoPro; using Org.BouncyCastle.Asn1.EdEC; +using Org.BouncyCastle.Asn1.Gnu; using Org.BouncyCastle.Asn1.Oiw; using Org.BouncyCastle.Asn1.Pkcs; using Org.BouncyCastle.Asn1.Rosstandart; @@ -170,7 +172,8 @@ namespace Org.BouncyCastle.Security return new Gost3410PrivateKeyParameters(x, gostParams.PublicKeyParamSet); } - else if (algOid.Equals(EdECObjectIdentifiers.id_X25519)) + else if (algOid.Equals(EdECObjectIdentifiers.id_X25519) + || algOid.Equals(CryptlibObjectIdentifiers.curvey25519)) { return new X25519PrivateKeyParameters(GetRawKey(keyInfo)); } @@ -178,7 +181,8 @@ namespace Org.BouncyCastle.Security { return new X448PrivateKeyParameters(GetRawKey(keyInfo)); } - else if (algOid.Equals(EdECObjectIdentifiers.id_Ed25519)) + else if (algOid.Equals(EdECObjectIdentifiers.id_Ed25519) + || algOid.Equals(GnuObjectIdentifiers.Ed25519)) { return new Ed25519PrivateKeyParameters(GetRawKey(keyInfo)); } |