public class TCAKOT15CommitmentScheme extends java.lang.Object implements CommitmentScheme, SPSMessageSpaceVerifier
SPSFSP2SignatureScheme,
the implementation can be used on its own, where it is chosen message target collision resistant
under the assumptions that its building blocks SPSPOSSignatureScheme
and TCGAKOT15CommitmentScheme make.
Note: While the scheme is a trapdoor commitment scheme in the paper, its trapdoor functionality (SimCom, Equiv in
the paper) has been omitted for this implementation, as it is not required for FSPS2 to work as intended.
Note: This scheme does not possess its own implementation of an Commitment instance. It instead reuses
TCGAKOT15Commitment, as the paper states com := com_gbc
[1] Abe et al.: Fully Structure-Preserving Signatures and Shrinking Commitments.
https://eprint.iacr.org/2015/076.pdf| Constructor and Description |
|---|
TCAKOT15CommitmentScheme(AKOT15SharedPublicParameters pp) |
TCAKOT15CommitmentScheme(AKOT15SharedPublicParameters sharedPublicParametersParameters,
TCGAKOT15XSIGPublicParameters tcGammaPublicParameters)
Set up the scheme using a set of shared parameters, as well as special parameters for TC gamma, enabling
inter-compatibility with
SPSXSIGSignatureScheme
Note: The original paper contains a typo in the section: "Procedure: Matching C_gbc to M_xsig -- Setup" [1, p.17]
The whole of TC must be initialized with F_1, F^{tilde}_1 as the default generators, not just TC_gamma. |
TCAKOT15CommitmentScheme(org.cryptimeleon.math.serialization.Representation repr) |
| Modifier and Type | Method and Description |
|---|---|
CommitmentPair |
commit(PlainText plainText)
Creates a commitment to the given
PlainText. |
CommitmentPair |
commit(PlainText plainText,
CommitmentKey commitmentKey) |
boolean |
equals(java.lang.Object o) |
TCGAKOT15CommitmentKey |
generateKey() |
int |
getMaxNumberOfBytesForMapToPlaintext()
Returns the maximal number of bytes that can be mapped injectively to a
PlainText by
CommitmentScheme.mapToPlaintext(byte[]) |
org.cryptimeleon.math.serialization.Representation |
getRepresentation() |
int |
hashCode() |
MessageBlock |
mapToPlaintext(byte[] bytes)
Provides an injective mapping of the given
byte[] to a PlainText usable with this scheme
(which may be a MessageBlock). |
Commitment |
restoreCommitment(org.cryptimeleon.math.serialization.Representation repr) |
OpenValue |
restoreOpenValue(org.cryptimeleon.math.serialization.Representation repr) |
boolean |
verify(Commitment commitment,
OpenValue openValue,
PlainText plainText)
Verifies that the given announced
PlainText equals the result of opening
the Commitment with the OpenValue. |
boolean |
verify(PlainText plainText,
CommitmentKey commitmentKey,
Commitment commitment,
OpenValue openValue) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitrestoreCommitmentPair, restoreFromRepresentationdoMessageCheckspublic TCAKOT15CommitmentScheme(AKOT15SharedPublicParameters pp)
public TCAKOT15CommitmentScheme(AKOT15SharedPublicParameters sharedPublicParametersParameters, TCGAKOT15XSIGPublicParameters tcGammaPublicParameters)
SPSXSIGSignatureScheme
Note: The original paper contains a typo in the section: "Procedure: Matching C_gbc to M_xsig -- Setup" [1, p.17]
The whole of TC must be initialized with F_1, F^{tilde}_1 as the default generators, not just TC_gamma.public TCAKOT15CommitmentScheme(org.cryptimeleon.math.serialization.Representation repr)
public TCGAKOT15CommitmentKey generateKey()
public CommitmentPair commit(PlainText plainText)
CommitmentSchemePlainText.commit in interface CommitmentSchemeplainText - the message to commit toCommitmentPair containing the commitment and an OpenValue that can be used to
reveal the committed message.public CommitmentPair commit(PlainText plainText, CommitmentKey commitmentKey)
public boolean verify(Commitment commitment, OpenValue openValue, PlainText plainText)
CommitmentSchemePlainText equals the result of opening
the Commitment with the OpenValue.
A commitment scheme such as HashThenCommitCommitmentScheme may also hash the message before committing
to it. This method can take this into account, i.e. by hashing the given announced plaintext before comparing.
verify in interface CommitmentSchemecommitment - commitment to verifyopenValue - used to open the commitment and reveal the contentplainText - the hash of this will be compared with the opened commitment messagepublic boolean verify(PlainText plainText, CommitmentKey commitmentKey, Commitment commitment, OpenValue openValue)
public MessageBlock mapToPlaintext(byte[] bytes)
CommitmentSchemebyte[] to a PlainText usable with this scheme
(which may be a MessageBlock).
It only guarantees injectivity for arrays of the same length.
Applications that would like to use mapToPlaintext with multiple different array lengths
may want to devise a padding method and then only call mapToPlaintext with
byte arrays of the same (padded) length.mapToPlaintext in interface CommitmentSchemebytes - byte[] to map to a PlainText that can be committed to using this commitment schemePlainText usable with this commitment schemepublic int getMaxNumberOfBytesForMapToPlaintext()
CommitmentSchemePlainText by
CommitmentScheme.mapToPlaintext(byte[])
As described in CommitmentScheme.mapToPlaintext(byte[]) there might be no injective PlainText for some byte arrays, e.g.
if the byte array is too long. Therefore, this method provides the maximal number of bytes that can be mapped
injectively to a PlainText.
getMaxNumberOfBytesForMapToPlaintext in interface CommitmentSchemeCommitmentScheme.mapToPlaintext(byte[]).public Commitment restoreCommitment(org.cryptimeleon.math.serialization.Representation repr)
restoreCommitment in interface CommitmentSchemepublic OpenValue restoreOpenValue(org.cryptimeleon.math.serialization.Representation repr)
restoreOpenValue in interface CommitmentSchemepublic org.cryptimeleon.math.serialization.Representation getRepresentation()
getRepresentation in interface org.cryptimeleon.math.serialization.Representablepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object