| Modifier and Type | Field and Description |
|---|---|
| private final DSAKCalculator | |
| private DSAKeyParameters | |
| private SecureRandom |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DSASigner(DSAKCalculator
a K value calculator. kCalculator)Configuration with an alternate, possibly deterministic calculator of K. |
| Modifier and Type | Method and Description |
|---|---|
| private BigInteger | |
| public BigInteger[] | generateSignature(byte[]
the message that will be verified later. message)Implements org. generate a signature for the given message using the key we were initialised with. |
| public BigInteger | getOrder()
Implements org. Get the order of the group that the r, s values in signatures belong to. |
| private BigInteger | |
| public void | init(boolean
true if we are generating a signature, false
otherwise. forSigning, CipherParameters key parameters for signature generation. param)Implements org. initialise the signer for signature generation or signature verification. |
| protected SecureRandom | |
| public boolean | verifySignature(byte[]
the message that was supposed to have been signed. message, BigInteger the r signature value. r, BigInteger the s signature value. s)Implements org. return true if the value r and s represent a DSA signature for the passed in message for standard DSA the message should be a SHA-1 hash of the real message to be verified. |
| kCalculator | back to summary |
|---|---|
| private final DSAKCalculator kCalculator | |
| key | back to summary |
|---|---|
| private DSAKeyParameters key | |
| random | back to summary |
|---|---|
| private SecureRandom random | |
| DSASigner | back to summary |
|---|---|
| public DSASigner() Default configuration, random K values. | |
| DSASigner | back to summary |
|---|---|
| public DSASigner(DSAKCalculator kCalculator) Configuration with an alternate, possibly deterministic calculator of K.
| |
| calculateE | back to summary |
|---|---|
| private BigInteger calculateE(BigInteger n, byte[] message) | |
| generateSignature | back to summary |
|---|---|
| public BigInteger[] generateSignature(byte[] message) Implements org. generate a signature for the given message using the key we were initialised with. For conventional DSA the message should be a SHA-1 hash of the message of interest.
| |
| getOrder | back to summary |
|---|---|
| public BigInteger getOrder() Implements org. Doc from org. Get the order of the group that the r, s values in signatures belong to. | |
| getRandomizer | back to summary |
|---|---|
| private BigInteger getRandomizer(BigInteger q, SecureRandom provided) | |
| init | back to summary |
|---|---|
| public void init(boolean forSigning, CipherParameters param) Implements org. Doc from org. initialise the signer for signature generation or signature verification.
| |
| initSecureRandom | back to summary |
|---|---|
| protected SecureRandom initSecureRandom(boolean needed, SecureRandom provided) | |
| verifySignature | back to summary |
|---|---|
| public boolean verifySignature(byte[] message, BigInteger r, BigInteger s) Implements org. return true if the value r and s represent a DSA signature for the passed in message for standard DSA the message should be a SHA-1 hash of the real message to be verified.
| |