APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.security.ec

public Class ECDSAOperations

extends Object
Class Inheritance
Imports
sun.security.ec.point.*, sun.security.util.ArrayUtil, sun.security.util.math.*, java.math.BigInteger, java.security.MessageDigest, .ProviderException, java.security.spec.*, java.util.Arrays, .Optional

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Field Summary

Modifier and TypeField and Description
private final AffinePoint
private final ECOperations

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ImmutableIntegerModuloP
b2a(IntegerModuloP b, IntegerFieldModuloP orderField, byte[] temp1)

public AffinePoint
basePointMultiply(byte[] scalar)

public static Optional<ECDSAOperations>
public ECOperations
public byte[]

Returns:

the ECDSA signature value
signDigest
(byte[]
the private key scalar as a little-endian byte array
privateKey
,
byte[]
the digest to be signed
digest
,
ECDSAOperations.Seed
the seed that will be used to produce the nonce. This object should contain an array that is at least 64 bits longer than the number of bits required to represent the group order.
seed
)

Sign a digest using the provided private key and seed.

public byte[]

Returns:

the ECDSA signature value
signDigest
(byte[]
the private key scalar as a little-endian byte array
privateKey
,
byte[]
the digest to be signed
digest
,
ECDSAOperations.Nonce
the nonce object containing a little-endian scalar value.
nonce
)

Sign a digest using the provided private key and nonce.

public boolean
verifySignedDigest(byte[] digest, byte[] sig, ECPoint pp)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

basePointback to summary
private final AffinePoint basePoint
ecOpsback to summary
private final ECOperations ecOps

Constructor Detail

ECDSAOperationsback to summary
public ECDSAOperations(ECOperations ecOps, ECPoint basePoint)

Method Detail

b2aback to summary
public static ImmutableIntegerModuloP b2a(IntegerModuloP b, IntegerFieldModuloP orderField, byte[] temp1)
basePointMultiplyback to summary
public AffinePoint basePointMultiply(byte[] scalar)
forParametersback to summary
public static Optional<ECDSAOperations> forParameters(ECParameterSpec ecParams)
getEcOperationsback to summary
public ECOperations getEcOperations()
signDigestback to summary
public byte[] signDigest(byte[] privateKey, byte[] digest, ECDSAOperations.Seed seed) throws IntermediateValueException

Sign a digest using the provided private key and seed.

Important Note

The private key is a scalar represented using a little-endian byte array. This is backwards from the conventional representation in ECDSA. The routines that produce and consume this value uses little-endian, so this deviation from convention removes the requirement to swap the byte order. The returned signature is in the conventional byte order.

Parameters
privateKey:byte[]

the private key scalar as a little-endian byte array

digest:byte[]

the digest to be signed

seed:ECDSAOperations.Seed

the seed that will be used to produce the nonce. This object should contain an array that is at least 64 bits longer than the number of bits required to represent the group order.

Returns:byte[]

the ECDSA signature value

Exceptions
IntermediateValueException:
if the signature cannot be produced due to an unacceptable intermediate or final value. If this exception is thrown, then the caller should discard the nonce and try again with an entirely new nonce value.
signDigestback to summary
public byte[] signDigest(byte[] privateKey, byte[] digest, ECDSAOperations.Nonce nonce) throws IntermediateValueException

Sign a digest using the provided private key and nonce.

Important Note

The private key and nonce are scalars represented by a little-endian byte array. This is backwards from the conventional representation in ECDSA. The routines that produce and consume these values use little-endian, so this deviation from convention removes the requirement to swap the byte order. The returned signature is in the conventional byte order.

Parameters
privateKey:byte[]

the private key scalar as a little-endian byte array

digest:byte[]

the digest to be signed

nonce:ECDSAOperations.Nonce

the nonce object containing a little-endian scalar value.

Returns:byte[]

the ECDSA signature value

Exceptions
IntermediateValueException:
if the signature cannot be produced due to an unacceptable intermediate or final value. If this exception is thrown, then the caller should discard the nonce and try again with an entirely new nonce value.
verifySignedDigestback to summary
public boolean verifySignedDigest(byte[] digest, byte[] sig, ECPoint pp)
sun.security.ec back to summary

public Class ECDSAOperations.Nonce

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final byte[]

Constructor Summary

AccessConstructor and Description
public
Nonce(byte[] nonceValue)

Method Summary

Modifier and TypeMethod and Description
public byte[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nonceValueback to summary
private final byte[] nonceValue

Constructor Detail

Nonceback to summary
public Nonce(byte[] nonceValue)

Method Detail

getNonceValueback to summary
public byte[] getNonceValue()
sun.security.ec back to summary

public Class ECDSAOperations.Seed

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final byte[]

Constructor Summary

AccessConstructor and Description
public
Seed(byte[] seedValue)

Method Summary

Modifier and TypeMethod and Description
public byte[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

seedValueback to summary
private final byte[] seedValue

Constructor Detail

Seedback to summary
public Seed(byte[] seedValue)

Method Detail

getSeedValueback to summary
public byte[] getSeedValue()