![JAR search and dependency download from the Maven repository](/logo.png)
org.bouncycastle.crypto.threshold.SecretSplitter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcprov-jdk14 Show documentation
Show all versions of bcprov-jdk14 Show documentation
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.4.
The newest version!
package org.bouncycastle.crypto.threshold;
import java.io.IOException;
/**
* Secret sharing (also called secret splitting) refers to methods for distributing a secret among a group.
* In this process, no individual holds any intelligible information about the secret.
* However, when a sufficient number of individuals combine their 'shares', the secret can be reconstructed.
*/
public interface SecretSplitter
{
/**
* Creates secret shares. The secret will be divided into shares, where the secret has a length of L bytes.
* @param m A threshold number of shares
* @param n Total number of shares
* @return An array of {@code byte[][]} representing the generated secret shares for m users with l bytes each.
*/
SplitSecret split(int m, int n);
/**
* Creates secret shares from a given secret share. The secret will be divided into shares, where the secret has a length of L bytes.
* @param m A threshold number of shares
* @param n Total number of shares
* @return An array of {@code byte[][]} representing the generated secret shares for m users with l bytes each.
*/
SplitSecret splitAround(SecretShare s, int m, int n)
throws IOException;
/**
* Creates secret shares from a given secret. The secret will be divided into shares, where the secret has a length of L bytes.
* @param m A threshold number of shares
* @param n Total number of shares
* @return An array of {@code byte[][]} representing the generated secret shares for m users with l bytes each.
*/
SplitSecret resplit(byte[] secret, int m, int n);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy