| Modifier and Type | Field and Description |
|---|---|
| private final DsaKCalculator | |
| private DsaKeyParameters | |
| private SecureRandom |
| Access | Constructor and Description |
|---|---|
| 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. |
| 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. |
| 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. |
| 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(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.
| |
| 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.
| |
| 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.
| |