Top Description Methods
org.bouncycastle.crypto.fips

pack-priv Interface DsaKCalculator

Known Direct Implementers
org.bouncycastle.crypto.fips.RandomDsaKCalculator
Imports
java.math.BigInteger, java.security.SecureRandom

Interface define calculators of K values for DSA/ECDSA.

Method Summary

Modifier and TypeMethod and Description
public void
init(BigInteger
the order of the DSA group.
n
,
SecureRandom
a source of randomness.
random
)

Non-deterministic initialiser.

public void
init(BigInteger
the order of the DSA group.
n
,
BigInteger
the DSA private value.
d
,
byte[]
the message being signed.
message
)

Deterministic initialiser.

public boolean

Returns:

true if deterministic, otherwise false.
isDeterministic
()

Return true if this calculator is deterministic, false otherwise.

public BigInteger

Returns:

a K value.
nextK
()

Return the next valid value of K.

Method Detail

initback to summary
public void init(BigInteger n, SecureRandom random)

Non-deterministic initialiser.

Parameters
n:BigInteger

the order of the DSA group.

random:SecureRandom

a source of randomness.

initback to summary
public void init(BigInteger n, BigInteger d, byte[] message)

Deterministic initialiser.

Parameters
n:BigInteger

the order of the DSA group.

d:BigInteger

the DSA private value.

message:byte[]

the message being signed.

isDeterministicback to summary
public boolean isDeterministic()

Return true if this calculator is deterministic, false otherwise.

Returns:boolean

true if deterministic, otherwise false.

nextKback to summary
public BigInteger nextK()

Return the next valid value of K.

Returns:BigInteger

a K value.