|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.crypto.signers.ECNRSigner
EC-NR as described in IEEE 1363-2000 - a signature algorithm for Elliptic Curve which also offers message recovery.
Constructor Summary | |
ECNRSigner()
|
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ECNRSigner()
Method Detail |
public void init(boolean forSigning, CipherParameters param)
init
in interface DSA
forSigning
- true if we are generating a signature, false
for verification or if we want to use the signer for message recovery.param
- key parameters for signature generation.public java.math.BigInteger getOrder()
DSAExt
getOrder
in interface 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)
|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |