public class ECDSAOperations
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ECDSAOperations.Nonce |
static class |
ECDSAOperations.Seed |
| Constructor and Description |
|---|
ECDSAOperations(ECOperations ecOps,
java.security.spec.ECPoint basePoint) |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableIntegerModuloP |
b2a(IntegerModuloP b,
IntegerFieldModuloP orderField,
byte[] temp1) |
AffinePoint |
basePointMultiply(byte[] scalar) |
static java.util.Optional<ECDSAOperations> |
forParameters(java.security.spec.ECParameterSpec ecParams) |
ECOperations |
getEcOperations() |
byte[] |
signDigest(byte[] privateKey,
byte[] digest,
ECDSAOperations.Nonce nonce)
Sign a digest using the provided private key and nonce.
|
byte[] |
signDigest(byte[] privateKey,
byte[] digest,
ECDSAOperations.Seed seed)
Sign a digest using the provided private key and seed.
|
static AffinePoint |
toAffinePoint(java.security.spec.ECPoint point,
IntegerFieldModuloP field) |
boolean |
verifySignedDigest(byte[] digest,
byte[] sig,
java.security.spec.ECPoint pp) |
public ECDSAOperations(ECOperations ecOps, java.security.spec.ECPoint basePoint)
public ECOperations getEcOperations()
public AffinePoint basePointMultiply(byte[] scalar)
public static AffinePoint toAffinePoint(java.security.spec.ECPoint point, IntegerFieldModuloP field)
public static java.util.Optional<ECDSAOperations> forParameters(java.security.spec.ECParameterSpec ecParams)
public byte[] signDigest(byte[] privateKey,
byte[] digest,
ECDSAOperations.Seed seed)
throws ECOperations.IntermediateValueException
privateKey - the private key scalar as a little-endian byte arraydigest - the digest to be signedseed - 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.ECOperations.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.public byte[] signDigest(byte[] privateKey,
byte[] digest,
ECDSAOperations.Nonce nonce)
throws ECOperations.IntermediateValueException
privateKey - the private key scalar as a little-endian byte arraydigest - the digest to be signednonce - the nonce object containing a little-endian scalar value.ECOperations.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.public boolean verifySignedDigest(byte[] digest,
byte[] sig,
java.security.spec.ECPoint pp)
public static ImmutableIntegerModuloP b2a(IntegerModuloP b, IntegerFieldModuloP orderField, byte[] temp1)