public class CmtPedersenTrapdoorCommitter extends CmtPedersenCommitter implements CmtCommitter, PerfectlyHidingCmt, CmtOnBigInteger
This commitment is also a trapdoor commitment in the sense that the receiver after the commitment phase has a trapdoor value, that if known by the committer would enable it to decommit to any value.
This trapdoor is output by the receiver and can be used by a higher-level application (e.g., by the ZK transformation of a sigma protocol to a zero-knowledge proof of knowledge).
For more information see Protocol 6.5.3, page 164 of Efficient Secure Two-Party Protocols by Hazay-Lindell.
The pseudo code of this protocol can be found in Protocol 3.3 of pseudo codes document at http://cryptobiu.github.io/scapi/SDK_Pseudocode.pdf.
|Constructor and Description|
Constructor that receives a connected channel (to the receiver) and chooses default dlog and random.
Constructor that receives a connected channel (to the receiver), the DlogGroup agreed upon between them and a SecureRandom object.
|Modifier and Type||Method and Description|
Validate the h value received from the receiver in the pre process phase.
generateBytesFromCommitValue, generateCommitValue, sampleRandomCommitValue
commit, decommit, generateCommitmentMsg, generateDecommitmentMsg, getCommitmentPhaseValues, getPreProcessValues
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public CmtPedersenTrapdoorCommitter(Channel channel) throws java.lang.ClassNotFoundException, java.io.IOException, CheatAttemptException
java.lang.ClassNotFoundException- in case there was a problem in the serialization in the preprocess phase.
java.io.IOException- in case there was a problem in the communication in the preprocess phase.
CheatAttemptException- in case the committer suspects the receiver cheated in the preprocess phase.
public CmtPedersenTrapdoorCommitter(Channel channel, DlogGroup dlog, java.security.SecureRandom random) throws java.lang.IllegalArgumentException, SecurityLevelException, InvalidDlogGroupException, java.lang.ClassNotFoundException, java.io.IOException, CheatAttemptException
SecurityLevelException- if the given dlog is not DDH secure
InvalidDlogGroupException- if the given dlog is not valid.
java.lang.ClassNotFoundException- if there was a problem in the serialization
java.io.IOException- if there was a problem in the communication
CheatAttemptException- if the receiver h is not in the DlogGroup.
public boolean validate(CmtRCommitPhaseOutput trap)
trap- the trapdoor outputed from the receiver's commit phase.