diff options
author | David Hook <dgh@cryptoworkshop.com> | 2013-06-20 01:33:29 +0400 |
---|---|---|
committer | David Hook <dgh@cryptoworkshop.com> | 2013-06-20 01:33:29 +0400 |
commit | 15e5dfa6fe9ceddd74c6d77e3a660f8e882ac31b (patch) | |
tree | dc906ea44c2d71bbccdcb967ff1bbdc5265845e3 /core/src/main/java/org/bouncycastle/crypto/util | |
parent | d77bc271b93313338b8fec502f8011726324d82a (diff) |
cleanup of old EC table structure, removal of unnecessary code.
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/util')
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/util/PrivateKeyFactory.java | 22 | ||||
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/util/PublicKeyFactory.java | 22 |
2 files changed, 4 insertions, 40 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/util/PrivateKeyFactory.java b/core/src/main/java/org/bouncycastle/crypto/util/PrivateKeyFactory.java index bfa304b2..6bf3399b 100644 --- a/core/src/main/java/org/bouncycastle/crypto/util/PrivateKeyFactory.java +++ b/core/src/main/java/org/bouncycastle/crypto/util/PrivateKeyFactory.java @@ -10,7 +10,6 @@ import org.bouncycastle.asn1.ASN1Integer; import org.bouncycastle.asn1.ASN1ObjectIdentifier; import org.bouncycastle.asn1.ASN1Primitive; import org.bouncycastle.asn1.ASN1Sequence; -import org.bouncycastle.asn1.nist.NISTNamedCurves; import org.bouncycastle.asn1.oiw.ElGamalParameter; import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers; import org.bouncycastle.asn1.pkcs.DHParameter; @@ -18,11 +17,9 @@ import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; import org.bouncycastle.asn1.pkcs.RSAPrivateKey; import org.bouncycastle.asn1.sec.ECPrivateKey; -import org.bouncycastle.asn1.sec.SECNamedCurves; -import org.bouncycastle.asn1.teletrust.TeleTrusTNamedCurves; import org.bouncycastle.asn1.x509.AlgorithmIdentifier; import org.bouncycastle.asn1.x509.DSAParameter; -import org.bouncycastle.asn1.x9.X962NamedCurves; +import org.bouncycastle.asn1.x9.ECNamedCurveTable; import org.bouncycastle.asn1.x9.X962Parameters; import org.bouncycastle.asn1.x9.X9ECParameters; import org.bouncycastle.asn1.x9.X9ObjectIdentifiers; @@ -130,22 +127,7 @@ public class PrivateKeyFactory if (params.isNamedCurve()) { ASN1ObjectIdentifier oid = ASN1ObjectIdentifier.getInstance(params.getParameters()); - x9 = X962NamedCurves.getByOID(oid); - - if (x9 == null) - { - x9 = SECNamedCurves.getByOID(oid); - - if (x9 == null) - { - x9 = NISTNamedCurves.getByOID(oid); - - if (x9 == null) - { - x9 = TeleTrusTNamedCurves.getByOID(oid); - } - } - } + x9 = ECNamedCurveTable.getByOID(oid); } else { diff --git a/core/src/main/java/org/bouncycastle/crypto/util/PublicKeyFactory.java b/core/src/main/java/org/bouncycastle/crypto/util/PublicKeyFactory.java index ab23e11c..2d2927b9 100644 --- a/core/src/main/java/org/bouncycastle/crypto/util/PublicKeyFactory.java +++ b/core/src/main/java/org/bouncycastle/crypto/util/PublicKeyFactory.java @@ -12,14 +12,11 @@ import org.bouncycastle.asn1.ASN1OctetString; import org.bouncycastle.asn1.ASN1Primitive; import org.bouncycastle.asn1.ASN1Sequence; import org.bouncycastle.asn1.DEROctetString; -import org.bouncycastle.asn1.nist.NISTNamedCurves; import org.bouncycastle.asn1.oiw.ElGamalParameter; import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers; import org.bouncycastle.asn1.pkcs.DHParameter; import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; import org.bouncycastle.asn1.pkcs.RSAPublicKey; -import org.bouncycastle.asn1.sec.SECNamedCurves; -import org.bouncycastle.asn1.teletrust.TeleTrusTNamedCurves; import org.bouncycastle.asn1.x509.AlgorithmIdentifier; import org.bouncycastle.asn1.x509.DSAParameter; import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo; @@ -27,7 +24,7 @@ import org.bouncycastle.asn1.x509.X509ObjectIdentifiers; import org.bouncycastle.asn1.x9.DHDomainParameters; import org.bouncycastle.asn1.x9.DHPublicKey; import org.bouncycastle.asn1.x9.DHValidationParms; -import org.bouncycastle.asn1.x9.X962NamedCurves; +import org.bouncycastle.asn1.x9.ECNamedCurveTable; import org.bouncycastle.asn1.x9.X962Parameters; import org.bouncycastle.asn1.x9.X9ECParameters; import org.bouncycastle.asn1.x9.X9ECPoint; @@ -166,22 +163,7 @@ public class PublicKeyFactory if (params.isNamedCurve()) { ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)params.getParameters(); - x9 = X962NamedCurves.getByOID(oid); - - if (x9 == null) - { - x9 = SECNamedCurves.getByOID(oid); - - if (x9 == null) - { - x9 = NISTNamedCurves.getByOID(oid); - - if (x9 == null) - { - x9 = TeleTrusTNamedCurves.getByOID(oid); - } - } - } + x9 = ECNamedCurveTable.getByOID(oid); } else { |