Interface DSAKCalculator

All Known Implementing Classes:
HMacDSAKCalculator, RandomDSAKCalculator

public interface DSAKCalculator
Interface define calculators of K values for DSA/ECDSA.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    init(BigInteger n, BigInteger d, byte[] message)
    Deterministic initialiser.
    void
    Non-deterministic initialiser.
    boolean
    Return true if this calculator is deterministic, false otherwise.
    Return the next valid value of K.
  • Method Details

    • isDeterministic

      boolean isDeterministic()
      Return true if this calculator is deterministic, false otherwise.
      Returns:
      true if deterministic, otherwise false.
    • init

      void init(BigInteger n, SecureRandom random)
      Non-deterministic initialiser.
      Parameters:
      n - the order of the DSA group.
      random - a source of randomness.
    • init

      void init(BigInteger n, BigInteger d, byte[] message)
      Deterministic initialiser.
      Parameters:
      n - the order of the DSA group.
      d - the DSA private value.
      message - the message being signed.
    • nextK

      BigInteger nextK()
      Return the next valid value of K.
      Returns:
      a K value.