Closed jorabin closed 1 month ago
Following agreement at 2024-01-12 meeting, this interface will move to api-java
in a modified form adding the secretId and the version number for CommittedDeRecShare purposes. (see below). It needs to be removed from the cryptography repo and Java binding needs to be altered to match interface.
/**
* Some kind of error was encountered when recombining shares
*/
class RecombinationException extends Exception {}
/**
* Not enough shares were provided to recombine
*/
class ThresholdException extends RecombinationException {}
/**
* Create shares from an array of bytes
* @param secretId the id of the secret
* @param version the version number of the secret
* @param bytesToShare the bytes of the secret and any additional metadata
* @param count the number of shares to create
* @param threshold the recombination threshold
* @return a list of [count] shares
*/
List<byte[]> share (byte[] secretId, int version, byte[] bytesToShare, int count, int threshold);
/**
* Recombine some shares
* @param shares the shares to combine
* @return the combined shares
*/
byte [] combine (List<byte[]> shares) throws RecombinationException;
Can we close this issue (and create a new one if appropriate)?
jni/src/DerecCryptoInterface.java
implements the discussed interface.
given the refactoring of storeshare.proto I think
ShamirInterfaces
spec is wrong . It should just provide for splitting a byte[] and recombining byte[]s the other parameters are not relevant?Pls confirm @rsinha that this is actually what it implements at present?
this is actually what is needed, I think: