org.bouncycastle.jce.provider
Class ECUtil
java.lang.Object
org.bouncycastle.jce.provider.ECUtil
public class ECUtil
- extends java.lang.Object
utility class for converting jce/jca ECDSA, ECDH, and ECDHC
objects into their org.bouncycastle.crypto counterparts.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ECUtil
public ECUtil()
convertMidTerms
static int[] convertMidTerms(int[] k)
- Returns a sorted array of middle terms of the reduction polynomial.
- Parameters:
k
- The unsorted array of middle terms of the reduction polynomial
of length 1 or 3.
- Returns:
- the sorted array of middle terms of the reduction polynomial.
This array always has length 3.
generatePublicKeyParameter
static AsymmetricKeyParameter generatePublicKeyParameter(java.security.PublicKey key)
throws java.security.InvalidKeyException
- Throws:
java.security.InvalidKeyException
generatePrivateKeyParameter
static AsymmetricKeyParameter generatePrivateKeyParameter(java.security.PrivateKey key)
throws java.security.InvalidKeyException
- Throws:
java.security.InvalidKeyException
getNamedCurveOid
public static DERObjectIdentifier getNamedCurveOid(java.lang.String name)
getNamedCurveByOid
public static X9ECParameters getNamedCurveByOid(DERObjectIdentifier oid)
getCurveName
public static java.lang.String getCurveName(DERObjectIdentifier oid)