Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
[ABANDONED AND BROKEN] An implementation of Shamir's Secret Sharing Scheme in Java
Java
Tree: 25a5da04dc

README.md

jsecretsharing

Shamir's Secret Sharing Scheme. Java-style.

Generating Shares

// build 10 shares, of which 2 are required to recover the secret
ShareBuilder builder = new ShareBuilder("I am Batman. Seriously.".getBytes(), 2, 512);
List<Share> shares = builder.build(10);

// takes 2 shares, recovers secret
List<Share> someShares = new ArrayList<Share>();
someShares.add(shares.get(2));
someShares.add(shares.get(7));
ShareCombiner combiner = new ShareCombiner(someShares);
System.err.println(new String(combiner.combine()));

// omg I'm batman
Something went wrong with that request. Please try again.