Package org.bouncycastle.crypto.signers
Class RandomDSAKCalculator
java.lang.Object
org.bouncycastle.crypto.signers.RandomDSAKCalculator
- All Implemented Interfaces:
DSAKCalculator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(BigInteger n, BigInteger d, byte[] message) Deterministic initialiser.void
init
(BigInteger n, SecureRandom random) Non-deterministic initialiser.boolean
Return true if this calculator is deterministic, false otherwise.nextK()
Return the next valid value of K.
-
Constructor Details
-
RandomDSAKCalculator
public RandomDSAKCalculator()
-
-
Method Details
-
isDeterministic
public boolean isDeterministic()Description copied from interface:DSAKCalculator
Return true if this calculator is deterministic, false otherwise.- Specified by:
isDeterministic
in interfaceDSAKCalculator
- Returns:
- true if deterministic, otherwise false.
-
init
Description copied from interface:DSAKCalculator
Non-deterministic initialiser.- Specified by:
init
in interfaceDSAKCalculator
- Parameters:
n
- the order of the DSA group.random
- a source of randomness.
-
init
Description copied from interface:DSAKCalculator
Deterministic initialiser.- Specified by:
init
in interfaceDSAKCalculator
- Parameters:
n
- the order of the DSA group.d
- the DSA private value.message
- the message being signed.
-
nextK
Description copied from interface:DSAKCalculator
Return the next valid value of K.- Specified by:
nextK
in interfaceDSAKCalculator
- Returns:
- a K value.
-