RandomDSAKCalculator (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.crypto.signers

## Class RandomDSAKCalculator

- java.lang.Object
- - org.bouncycastle.crypto.signers.RandomDSAKCalculator

- All Implemented Interfaces:
    DSAKCalculator

      public class RandomDSAKCalculator
      extends java.lang.Object
      implements DSAKCalculator

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RandomDSAKCalculator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.
    `boolean` | `isDeterministic()` Return true if this calculator is deterministic, false otherwise.
    `java.math.BigInteger` | `nextK()` Return the next valid value of K.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RandomDSAKCalculator

          public RandomDSAKCalculator()

  - ### Method Detail

    - #### isDeterministic

          public boolean isDeterministic()

      Description copied from interface: `DSAKCalculator`
      Return true if this calculator is deterministic, false otherwise.
      Specified by:
        `isDeterministic` in interface `DSAKCalculator`
      Returns:
        true if deterministic, otherwise false.

    - #### init

          public void init(java.math.BigInteger n,
                           java.security.SecureRandom random)

      Description copied from interface: `DSAKCalculator`
      Non-deterministic initialiser.
      Specified by:
        `init` in interface `DSAKCalculator`
      Parameters:
        `n` - the order of the DSA group.
        `random` - a source of randomness.

    - #### init

          public void init(java.math.BigInteger n,
                           java.math.BigInteger d,
                           byte[] message)

      Description copied from interface: `DSAKCalculator`
      Deterministic initialiser.
      Specified by:
        `init` in interface `DSAKCalculator`
      Parameters:
        `n` - the order of the DSA group.
        `d` - the DSA private value.
        `message` - the message being signed.

    - #### nextK

          public java.math.BigInteger nextK()

      Description copied from interface: `DSAKCalculator`
      Return the next valid value of K.
      Specified by:
        `nextK` in interface `DSAKCalculator`
      Returns:
        a K value.