org.bouncycastle.crypto.signers
Class ECNRSigner
java.lang.Object
org.bouncycastle.crypto.signers.ECNRSigner
- DSA
public class ECNRSigner
extends java.lang.Object
EC-NR as described in IEEE 1363-2000
BigInteger[] | generateSignature(byte[] digest) - generate a signature for the given message using the key we were
initialised with.
|
void | init(boolean forSigning, CipherParameters param)
|
boolean | verifySignature(byte[] digest, BigInteger r, BigInteger s) - return true if the value r and s represent a signature for the
message passed in.
|
generateSignature
public BigInteger[] generateSignature(byte[] digest)
generate a signature for the given message using the key we were
initialised with. Generally, the order of the curve should be at
least as long as the hash of the message of interest, and with
ECNR it *must* be at least as long.
- generateSignature in interface DSA
digest
- the digest to be signed.
verifySignature
public boolean verifySignature(byte[] digest,
BigInteger r,
BigInteger s)
return true if the value r and s represent a signature for the
message passed in. Generally, the order of the curve should be at
least as long as the hash of the message of interest, and with
ECNR, it *must* be at least as long. But just in case the signer
applied mod(n) to the longer digest, this implementation will
apply mod(n) during verification.
- verifySignature in interface DSA
digest
- the digest to be verified.r
- the r value of the signature.s
- the s value of the signature.