public class CmtPedersenHashReceiver extends CmtPedersenReceiverCore implements CmtReceiver, PerfectlyHidingCmt, CmtOnByteArray
This is a perfectly-hiding commitment that can be used to commit to a value of any length.
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.2 of pseudo codes document at http://cryptobiu.github.io/scapi/SDK_Pseudocode.pdf.
|Constructor and Description|
This constructor uses a default Dlog Group and default Cryptographic Hash.
This constructor receives as arguments an instance of a Dlog Group and an instance of a Cryptographic Hash such that they keep the condition that the size in bytes of the resulting hash is less than the size in bytes of the order of the DlogGroup.
|Modifier and Type||Method and Description|
This function converts the given commit value to a byte array.
Verifies that the commitment was to H(x).
getCommitmentPhaseValues, getPreProcessedValues, receiveCommitment, receiveDecommitment
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public CmtPedersenHashReceiver(Channel channel) throws java.io.IOException
java.io.IOException- if there was a problem in the communication.
public CmtPedersenHashReceiver(Channel channel, DlogGroup dlog, CryptographicHash hash, java.security.SecureRandom random) throws java.lang.IllegalArgumentException, java.io.IOException, SecurityLevelException, InvalidDlogGroupException
channel- an established channel obtained via the Communication Layer
java.lang.IllegalArgumentException- if the size in bytes of the resulting hash is bigger than the size in bytes of the order of the DlogGroup
SecurityLevelException- if the Dlog Group is not DDH
InvalidDlogGroupException- if the parameters of the group do not conform the type the group is supposed to be
java.io.IOException- if there was a problem during the communication
public CmtCommitValue verifyDecommitment(CmtCCommitmentMsg commitmentMsg, CmtCDecommitmentMessage decommitmentMsg)