public class MonotoneSpanProgram extends AccessStructure
field, shareReceivers, thresholdTree| Constructor and Description |
|---|
MonotoneSpanProgram(Policy policy,
org.cryptimeleon.math.structures.rings.zn.Zp field) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkShareConsistency(org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement secret,
java.util.Map<java.lang.Integer,org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement> shares)
Outputs true if the given (full) set of shares is consistent with the given secret, meaning that all qualified
subsets of the shares will recreate the given secret.
|
java.util.Map<java.lang.Integer,org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement> |
completeShares(org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement secret,
java.util.Map<java.lang.Integer,org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement> partialShares)
Takes a partial set of shares and completes it to a full set of shares for the given secret.
|
java.util.HashMap<java.lang.Integer,PolicyFact> |
getAttributes() |
int |
getNumberOfColumns()
Calculates number of columns of the monotone span program matrix given by this instance.
|
java.util.Map<java.lang.Integer,org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement> |
getShares(org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement secret)
Calculates shares for the given secret.
|
java.util.Map<java.lang.Integer,org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement> |
getSolvingVector(java.util.Set<? extends PolicyFact> setOfParties)
Calculates set of solving secret shares for this monotone span program.
|
java.lang.String |
toStringFor3DigitsGates()
This method returns a string that contains a representation of the
monotone span program given by this instance.
|
getSharedRing, getShareReceiverMap, isQualified, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetShareReceiver, getSharesOfReceiver, getSharesOfReceivers, isQualified, reconstructpublic MonotoneSpanProgram(Policy policy, org.cryptimeleon.math.structures.rings.zn.Zp field)
public java.util.Map<java.lang.Integer,org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement> getShares(org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement secret)
throws WrongAccessStructureException
secret - the secret to calculate shares forWrongAccessStructureException - if monotone span program matrix generation failspublic int getNumberOfColumns()
throws WrongAccessStructureException
WrongAccessStructureException - if monotone span program matrix generation failspublic java.util.Map<java.lang.Integer,org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement> getSolvingVector(java.util.Set<? extends PolicyFact> setOfParties) throws NoSatisfyingSet, WrongAccessStructureException
setOfParties - the set of share-holding parties to considerNoSatisfyingSet - if the given set of parties cannot satisfy the monotone span programWrongAccessStructureException - if the access structure is invalidpublic java.lang.String toStringFor3DigitsGates()
throws WrongAccessStructureException
WrongAccessStructureException - if monotone span program matrix generation failspublic java.util.HashMap<java.lang.Integer,PolicyFact> getAttributes()
public java.util.Map<java.lang.Integer,org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement> completeShares(org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement secret,
java.util.Map<java.lang.Integer,org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement> partialShares)
throws java.lang.IllegalArgumentException
LinearSecretSharingisQualified(S) == true this method will simply recreate the full set of shares.
The contract is that the two S in the following are distributed identically:
secret - the desired secret for the completed sharespartialShares - the set of partial shares \(\{s_i \; | \; i \in \text{getSharesOfReceivers}(X)\}\)getShares(secret)
(if the given partial shares are distributed as in getShares())java.lang.IllegalArgumentException - if partialShares cannot be completed to secretpublic boolean checkShareConsistency(org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement secret,
java.util.Map<java.lang.Integer,org.cryptimeleon.math.structures.rings.zn.Zp.ZpElement> shares)
LinearSecretSharing