Constructor and Description |
---|
ECNRSigner() |
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger[] |
generateSignature(byte[] digest)
generate a signature for the given message using the key we were
initialised with.
|
java.math.BigInteger |
getOrder()
Get the order of the group that the r, s values in signatures belong to.
|
byte[] |
getRecoveredMessage(java.math.BigInteger r,
java.math.BigInteger s)
Returns the data used for the signature generation, assuming the public key passed
to init() is correct.
|
void |
init(boolean forSigning,
CipherParameters param)
Initialise the signer.
|
boolean |
verifySignature(byte[] digest,
java.math.BigInteger r,
java.math.BigInteger s)
return true if the value r and s represent a signature for the
message passed in.
|
public void init(boolean forSigning, CipherParameters param)
public java.math.BigInteger getOrder()
DSAExt
public java.math.BigInteger[] generateSignature(byte[] digest)
generateSignature
in interface DSA
digest
- the digest to be signed.DataLengthException
- if the digest is longer than the key allowspublic boolean verifySignature(byte[] digest, java.math.BigInteger r, java.math.BigInteger s)
verifySignature
in interface DSA
digest
- the digest to be verified.r
- the r value of the signature.s
- the s value of the signature.DataLengthException
- if the digest is longer than the key allowspublic byte[] getRecoveredMessage(java.math.BigInteger r, java.math.BigInteger s)