public abstract class ECGKeyUtil
extends java.lang.Object
Constructor and Description |
---|
ECGKeyUtil() |
Modifier and Type | Method and Description |
---|---|
static ECPrivateKeyParameters |
decodeBase64PriKey(ECKeyParam keyParam,
byte[] encodedPriKey)
decodeBase64PriKey A function wrapper function for decodePriKey which takes
a base64 encoded ECC private key parameter object and returns an
ECPrivateKeyParameters object for the private key D BigInteger value.
|
static ECPublicKeyParameters |
decodeBase64PubKey(ECKeyParam keyParam,
byte[] encodedPubKey)
decodeBase64PubKey A wrapper function for decodePubKey which takes an
ASN.1 encoded ECC public key Q that was then encoded as base64
and returns an ECPublicKeyParameters object for the public key Q.
|
static ECPublicKeyParameters |
decodeBase64SignedPubKey(ECKeyParam keyParam,
Digest digest,
byte[] signedPubKey)
decodeBase64SignedPubKey A wrapper function for decodeSignedPubKey which
takes an ASN.1 encoded ECC public key Q that is signed using the Elliptic
Curve Gillett (ECG) Exchange key exchange and that was then encoded as base64
and returns an ECPublicKeyParameters object for the public key Q.
|
static ECPrivateKeyParameters |
decodePriKey(ECKeyParam keyParam,
byte[] encodedPriKey)
decodePriKey A function which takes an ECC private key parameter object and
returns an ECPrivateKeyParameters object for the private key D BigInteger
value.
|
static ECPublicKeyParameters |
decodePubKey(ECKeyParam keyParam,
byte[] encodedPubKey)
decodePubKey A function which takes an ASN.1 encoded ECC public key Q
and returns an ECPublicKeyParameters object for the public key Q.
|
static ECPublicKeyParameters |
decodeSignedPubKey(ECKeyParam keyParam,
Digest digest,
byte[] signedPubKey)
decodeSignedPubKey A function which takes an ASN.1 encoded ECC public key Q
that is signed using the Elliptic Curve Gillett (ECG) Exchange key exchange
and returns an ECPublicKeyParameters object for the public key Q.
|
static byte[] |
encodeBase64PriKey(ECKeyParam keyParam,
CipherParameters priKey)
encodeBase64PriKey A wrapper function which takes an ECC private key parameter
object and returns the private key D BigInteger value that is encoded as base64
for proper storage and transmission in textual form.
|
static byte[] |
encodeBase64PubKey(ECKeyParam keyParam,
CipherParameters pubKey)
encodeBase64PubKey A wrapper function for encodePubKey() which takes an ECC
public key parameter object and returns the ASN.1 encoded X and Y values
for the public key Q that is then encoded in base64 encoding for proper
storage and transmission in textual form.
|
static byte[] |
encodePriKey(ECKeyParam keyParam,
CipherParameters priKey)
encodePriKey A function which takes an ECC private key parameter object
and returns the private key D BigInteger value as a byte array
|
static byte[] |
encodePubKey(ECKeyParam keyParam,
CipherParameters pubKey)
encodePubKey A function which takes an ECC public key parameter object
and returns the ASN.1 encoded X and Y values for the public key Q.
|
public static byte[] encodePubKey(ECKeyParam keyParam, CipherParameters pubKey) throws java.security.InvalidParameterException
keyParam
- The Elliptic Curve key parameter which contains the curve
specifications and domain parameterspubKey
- an ECC public key parameter which implements CipherParametersjava.security.InvalidParameterException
public static byte[] encodeBase64PubKey(ECKeyParam keyParam, CipherParameters pubKey) throws java.security.InvalidParameterException
keyParam
- The Elliptic Curve key parameter which contains the curve
specifications and domain parameterspubKey
- an ECC public key parameter which implements CipherParametersjava.security.InvalidParameterException
public static byte[] encodePriKey(ECKeyParam keyParam, CipherParameters priKey) throws java.security.InvalidParameterException
keyParam
- The Elliptic Curve key parameter which contains the curve
specifications and domain parameterspriKey
- an ECC private key parameter object which implements CipherParametersjava.security.InvalidParameterException
public static byte[] encodeBase64PriKey(ECKeyParam keyParam, CipherParameters priKey) throws java.security.InvalidParameterException
keyParam
- The Elliptic Curve key parameter which contains the curve
specifications and domain parameterspriKey
- an ECC private key parameter object which implements CipherParametersjava.security.InvalidParameterException
public static ECPublicKeyParameters decodePubKey(ECKeyParam keyParam, byte[] encodedPubKey)
keyParam
- The Elliptic Curve key parameter which contains the curve
specifications and domain parametersencodedPubkey
- A byte array of the ASN.1 encoded public key Qpublic static ECPublicKeyParameters decodeBase64PubKey(ECKeyParam keyParam, byte[] encodedPubKey)
keyParam
- The Elliptic Curve key parameter which contains the curve
specifications and domain parametersencodedPubkey
- A byte array of the ASN.1 encoded public key Qpublic static ECPublicKeyParameters decodeSignedPubKey(ECKeyParam keyParam, Digest digest, byte[] signedPubKey)
keyParam
- The Elliptic Curve key parameter which contains the curve
specifications and domain parametersdigest
- The digest function used to originally sign the key such as SHA256signedPubkey
- A byte array of the ASN.1 encoded public key Q that is signedpublic static ECPublicKeyParameters decodeBase64SignedPubKey(ECKeyParam keyParam, Digest digest, byte[] signedPubKey)
keyParam
- The Elliptic Curve key parameter which contains the curve
specifications and domain parametersdigest
- The digest function used to originally sign the key such as SHA256signedPubkey
- A byte array of the ASN.1 encoded public key Q that is signedpublic static ECPrivateKeyParameters decodePriKey(ECKeyParam keyParam, byte[] encodedPriKey)
keyParam
- The Elliptic Curve key parameter which contains the curve
specifications and domain parameterspriKey
- a byte array of the private key D BigInteger valuepublic static ECPrivateKeyParameters decodeBase64PriKey(ECKeyParam keyParam, byte[] encodedPriKey)
keyParam
- The Elliptic Curve key parameter which contains the curve
specifications and domain parameterspriKey
- a base64 encoded byte array of the private key D BigInteger value