diff options
Diffstat (limited to 'crypto/src/security/PublicKeyFactory.cs')
-rw-r--r-- | crypto/src/security/PublicKeyFactory.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/src/security/PublicKeyFactory.cs b/crypto/src/security/PublicKeyFactory.cs index e0c7ce950..8c3e9db99 100644 --- a/crypto/src/security/PublicKeyFactory.cs +++ b/crypto/src/security/PublicKeyFactory.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; @@ -211,7 +213,8 @@ namespace Org.BouncyCastle.Security return new Gost3410PublicKeyParameters(y, algParams.PublicKeyParamSet); } - else if (algOid.Equals(EdECObjectIdentifiers.id_X25519)) + else if (algOid.Equals(EdECObjectIdentifiers.id_X25519) + || algOid.Equals(CryptlibObjectIdentifiers.curvey25519)) { return new X25519PublicKeyParameters(GetRawKey(keyInfo)); } @@ -219,7 +222,8 @@ namespace Org.BouncyCastle.Security { return new X448PublicKeyParameters(GetRawKey(keyInfo)); } - else if (algOid.Equals(EdECObjectIdentifiers.id_Ed25519)) + else if (algOid.Equals(EdECObjectIdentifiers.id_Ed25519) + || algOid.Equals(GnuObjectIdentifiers.Ed25519)) { return new Ed25519PublicKeyParameters(GetRawKey(keyInfo)); } |