Bouncy Castle Cryptography Library 1.77.0

org.bouncycastle.jcajce.provider.asymmetric.util
Class ECUtil

java.lang.Object
  |
  +--org.bouncycastle.jcajce.provider.asymmetric.util.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.


Constructor Summary
ECUtil()
           
 
Method Summary
static java.lang.String generateKeyFingerprint(org.bouncycastle.math.ec.ECPoint publicPoint, ECParameterSpec spec)
           
static AsymmetricKeyParameter generatePrivateKeyParameter(java.security.PrivateKey key)
           
static AsymmetricKeyParameter generatePublicKeyParameter(java.security.PublicKey key)
           
static java.lang.String getCurveName(ASN1ObjectIdentifier oid)
           
static ECDomainParameters getDomainParameters(ProviderConfiguration configuration, ECParameterSpec params)
           
static ECDomainParameters getDomainParameters(ProviderConfiguration configuration, X962Parameters params)
           
static X9ECParameters getNamedCurveByName(java.lang.String curveName)
           
static X9ECParameters getNamedCurveByOid(ASN1ObjectIdentifier oid)
           
static ASN1ObjectIdentifier getNamedCurveOid(java.lang.String curveName)
           
static int getOrderBitLength(ProviderConfiguration configuration, java.math.BigInteger order, java.math.BigInteger privateValue)
           
static java.lang.String privateKeyToString(java.lang.String algorithm, java.math.BigInteger d, ECParameterSpec spec)
           
static java.lang.String publicKeyToString(java.lang.String algorithm, org.bouncycastle.math.ec.ECPoint q, ECParameterSpec spec)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECUtil

public ECUtil()
Method Detail

getDomainParameters

public static ECDomainParameters getDomainParameters(ProviderConfiguration configuration,
                                                     ECParameterSpec params)

getDomainParameters

public static ECDomainParameters getDomainParameters(ProviderConfiguration configuration,
                                                     X962Parameters params)

getOrderBitLength

public static int getOrderBitLength(ProviderConfiguration configuration,
                                    java.math.BigInteger order,
                                    java.math.BigInteger privateValue)

generatePublicKeyParameter

public static AsymmetricKeyParameter generatePublicKeyParameter(java.security.PublicKey key)
                                                         throws java.security.InvalidKeyException

generatePrivateKeyParameter

public static AsymmetricKeyParameter generatePrivateKeyParameter(java.security.PrivateKey key)
                                                          throws java.security.InvalidKeyException

getNamedCurveOid

public static ASN1ObjectIdentifier getNamedCurveOid(java.lang.String curveName)

getNamedCurveByOid

public static X9ECParameters getNamedCurveByOid(ASN1ObjectIdentifier oid)

getNamedCurveByName

public static X9ECParameters getNamedCurveByName(java.lang.String curveName)

getCurveName

public static java.lang.String getCurveName(ASN1ObjectIdentifier oid)

privateKeyToString

public static java.lang.String privateKeyToString(java.lang.String algorithm,
                                                  java.math.BigInteger d,
                                                  ECParameterSpec spec)

publicKeyToString

public static java.lang.String publicKeyToString(java.lang.String algorithm,
                                                 org.bouncycastle.math.ec.ECPoint q,
                                                 ECParameterSpec spec)

generateKeyFingerprint

public static java.lang.String generateKeyFingerprint(org.bouncycastle.math.ec.ECPoint publicPoint,
                                                      ECParameterSpec spec)

Bouncy Castle Cryptography Library 1.77.0