SFE.TimedCommitments
Class TimedCommitment
java.lang.Object
SFE.TimedCommitments.TimedCommitment
public class TimedCommitment
- extends java.lang.Object
Constructor Summary |
TimedCommitment(java.math.BigInteger N,
java.math.BigInteger g,
int n,
int k,
java.util.Vector W,
java.util.BitSet S)
package-visible constructor. |
Method Summary |
void |
addHint(SFE.TimedCommitments.TimedCommitmentHint hint)
Learn the new hint, for use when decoding. |
java.util.BitSet |
decodeMessage()
Decode the message based on the best hint available. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimedCommitment
public TimedCommitment(java.math.BigInteger N,
java.math.BigInteger g,
int n,
int k,
java.util.Vector W,
java.util.BitSet S)
- package-visible constructor.
Sets the initial commitment fields
- Parameters:
N
- the modulog
- as per Boneh-Naor's algorithmn
- security parameter, as per Boneh-Naor's algorithmk
- security parameter, as per Boneh-Naor's algorithmW
- as per Boneh-Naor's algorithm: [g^2, g^4, g^16, ..., g^ (2^(2^k))]S
- the encrypted message, as per Boneh-Naor's algorithm
addHint
public void addHint(SFE.TimedCommitments.TimedCommitmentHint hint)
- Learn the new hint, for use when decoding.
When decoding the best hint available is used.
The timed commitment is created with the first hint already: each
succesive hint, if given according to Pinkas' algorithm's order, cuts
the decoding time in half.
decodeMessage
public java.util.BitSet decodeMessage()
- Decode the message based on the best hint available.
The class instance is initialized with the first hint already,
deduceable from the vector W.
- Returns:
- the decoded message