public class HMacDSAKCalculator extends java.lang.Object implements DSAKCalculator
Constructor and Description |
---|
HMacDSAKCalculator(Digest digest)
Base constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
init(java.math.BigInteger n,
java.math.BigInteger d,
byte[] message)
Deterministic initialiser.
|
void |
init(java.math.BigInteger n,
java.security.SecureRandom random)
Non-deterministic initialiser.
|
protected void |
initAdditionalInput0(HMac hmac0)
Supply additional input to HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1)).
|
protected void |
initAdditionalInput1(HMac hmac1)
Supply additional input to HMAC_K(V || 0x01 || int2octets(x) || bits2octets(h1)).
|
boolean |
isDeterministic()
Return true if this calculator is deterministic, false otherwise.
|
java.math.BigInteger |
nextK()
Return the next valid value of K.
|
public HMacDSAKCalculator(Digest digest)
digest
- digest to build the HMAC on.public boolean isDeterministic()
DSAKCalculator
isDeterministic
in interface DSAKCalculator
public void init(java.math.BigInteger n, java.security.SecureRandom random)
DSAKCalculator
init
in interface DSAKCalculator
n
- the order of the DSA group.random
- a source of randomness.public void init(java.math.BigInteger n, java.math.BigInteger d, byte[] message)
DSAKCalculator
init
in interface DSAKCalculator
n
- the order of the DSA group.d
- the DSA private value.message
- the message being signed.public java.math.BigInteger nextK()
DSAKCalculator
nextK
in interface DSAKCalculator
protected void initAdditionalInput0(HMac hmac0)
hmac0
- the HMac
to which the additional input should be added.protected void initAdditionalInput1(HMac hmac1)
initAdditionalInput0(HMac)
.hmac1
- the HMac
to which the additional input should be added.