Top Constructors Methods
sun.security.util

public final Class ECUtil

extends Object
Class Inheritance
Imports
jdk.internal.access.SharedSecrets, java.io.IOException, java.math.BigInteger, java.security.*, java.security.interfaces.*, java.security.spec.*, java.util.Arrays, .Objects

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ECPrivateKey

Returns:

the private key that was evaluated.
checkPrivateKey
(ECPrivateKey
the private key to be checked.
prv
)

Check an ECPrivateKey to make sure the scalar value is within the range of the order [1, n-1].

public static ECPrivateKey
decodePKCS8ECPrivateKey(byte[] encoded)

public static ECPoint
decodePoint(byte[] data, EllipticCurve curve)

public static byte[]
decodeSignature(byte[] sig)

public static ECPublicKey
decodeX509ECPublicKey(byte[] encoded)

public static byte[]
public static byte[]
public static byte[]
encodeSignature(byte[] signature)

public static boolean
public static ECPrivateKey
public static String
public static AlgorithmParameters
public static ECParameterSpec
public static ECParameterSpec
getECParameterSpec(Provider p, byte[] params)

public static ECParameterSpec
public static ECParameterSpec
getECParameterSpec(Provider p, int keySize)

private static KeyFactory
public static byte[]
public static byte[]
trimZeroes(byte[] b)

public static void
public static byte[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ECUtilback to summary
private ECUtil()

Method Detail

checkPrivateKeyback to summary
public static ECPrivateKey checkPrivateKey(ECPrivateKey prv) throws InvalidKeyException

Check an ECPrivateKey to make sure the scalar value is within the range of the order [1, n-1].

Parameters
prv:ECPrivateKey

the private key to be checked.

Returns:ECPrivateKey

the private key that was evaluated.

Exceptions
InvalidKeyException:
if the key's scalar value is not within the range 1 <= x < n where n is the order of the generator.
decodePKCS8ECPrivateKeyback to summary
public static ECPrivateKey decodePKCS8ECPrivateKey(byte[] encoded) throws InvalidKeySpecException
decodePointback to summary
public static ECPoint decodePoint(byte[] data, EllipticCurve curve) throws IOException
decodeSignatureback to summary
public static byte[] decodeSignature(byte[] sig) throws SignatureException
decodeX509ECPublicKeyback to summary
public static ECPublicKey decodeX509ECPublicKey(byte[] encoded) throws InvalidKeySpecException
encodeECParameterSpecback to summary
public static byte[] encodeECParameterSpec(Provider p, ECParameterSpec spec)
encodePointback to summary
public static byte[] encodePoint(ECPoint point, EllipticCurve curve)
encodeSignatureback to summary
public static byte[] encodeSignature(byte[] signature) throws SignatureException
equalsback to summary
public static boolean equals(ECParameterSpec spec1, ECParameterSpec spec2)
generateECPrivateKeyback to summary
public static ECPrivateKey generateECPrivateKey(BigInteger s, ECParameterSpec params) throws InvalidKeySpecException
getCurveNameback to summary
public static String getCurveName(Provider p, ECParameterSpec spec)
getECParametersback to summary
public static AlgorithmParameters getECParameters(Provider p)
getECParameterSpecback to summary
public static ECParameterSpec getECParameterSpec(Provider p, ECParameterSpec spec)
getECParameterSpecback to summary
public static ECParameterSpec getECParameterSpec(Provider p, byte[] params) throws IOException
getECParameterSpecback to summary
public static ECParameterSpec getECParameterSpec(Provider p, String name)
getECParameterSpecback to summary
public static ECParameterSpec getECParameterSpec(Provider p, int keySize)
getKeyFactoryback to summary
private static KeyFactory getKeyFactory()
sArrayback to summary
public static byte[] sArray(BigInteger s, ECParameterSpec params)
trimZeroesback to summary
public static byte[] trimZeroes(byte[] b)
validatePublicKeyback to summary
public static void validatePublicKey(ECPoint point, ECParameterSpec spec) throws InvalidKeyException
x509EncodeECPublicKeyback to summary
public static byte[] x509EncodeECPublicKey(ECPoint w, ECParameterSpec params) throws InvalidKeySpecException