Added missing OID
import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
import org.bouncycastle.asn1.pkcs.PrivateKeyInfo;
import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
-import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util;
import org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi;
+import org.bouncycastle.jcajce.provider.asymmetric.util.EC5Util;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.bouncycastle.jce.spec.ECParameterSpec;
import org.bouncycastle.jce.spec.ECPrivateKeySpec;
@@ -143,6 +143,10 @@ public PrivateKey generatePrivate(PrivateKeyInfo keyInfo)
{
return new BCECGOST3410PrivateKey(keyInfo);
}
+ else if (algOid.equals(CryptoProObjectIdentifiers.gostR3410_2001DH))
+ {
+ return new BCECGOST3410PrivateKey(keyInfo);
+ }
else
{
throw new IOException("algorithm identifier " + algOid + " in key not recognised");
@@ -158,6 +162,10 @@ public PublicKey generatePublic(SubjectPublicKeyInfo keyInfo)
{
return new BCECGOST3410PublicKey(keyInfo);
}
+ else if (algOid.equals(CryptoProObjectIdentifiers.gostR3410_2001DH))
+ {
+ return new BCECGOST3410PublicKey(keyInfo);
+ }
else
{
throw new IOException("algorithm identifier " + algOid + " in key not recognised");
