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

org.bouncycastle.crypto.threshold

## Class ShamirSplitSecret

- java.lang.Object
- - org.bouncycastle.crypto.threshold.ShamirSplitSecret

- All Implemented Interfaces:
    SplitSecret

      public class ShamirSplitSecret
      extends java.lang.Object
      implements SplitSecret

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ShamirSplitSecret(ShamirSecretSplitter.Algorithm algorithm, ShamirSecretSplitter.Mode mode, ShamirSplitSecretShare[] secretShares)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ShamirSplitSecret` | `divide(int div)`
    `byte[]` | `getSecret()` Recombines secret shares to reconstruct the original secret.
    `ShamirSplitSecretShare[]` | `getSecretShares()`
    `ShamirSplitSecret` | `multiple(int mul)`

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

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

- - ### Constructor Detail

    - #### ShamirSplitSecret

          public ShamirSplitSecret(ShamirSecretSplitter.Algorithm algorithm,
                                   ShamirSecretSplitter.Mode mode,
                                   ShamirSplitSecretShare[] secretShares)

  - ### Method Detail

    - #### getSecretShares

          public ShamirSplitSecretShare[] getSecretShares()

      Specified by:
        `getSecretShares` in interface `SplitSecret`

    - #### multiple

          public ShamirSplitSecret multiple(int mul)
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### divide

          public ShamirSplitSecret divide(int div)
                                   throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getSecret

          public byte[] getSecret()
                           throws java.io.IOException

      Description copied from interface: `SplitSecret`
      Recombines secret shares to reconstruct the original secret.
      Specified by:
        `getSecret` in interface `SplitSecret`
      Returns:
        A byte array containing the reconstructed secret.
      Throws:
        `java.io.IOException`