public interface SigmaProtocol extends InteractiveArgument
generateSimulatedTranscript(CommonInput, Challenge) are distributed the same as honestly generated transcripts that contain the same Challenge.CommonInput and two SigmaProtocolTranscripts with the same announcement but two different Challenges, one can efficiently compute a witness (or at least it's computationally hard to generate two transcripts for which this is not possible).SigmaProtocolInstance):
CommonInput (through whatever prior process). The prover has some SecretInput (the witness for the protocol)AnnouncementSecret (which will be their private input for the remainder of this process).Announcement and sends it to the verifier.Challenge and sends it to the prover.Response and sends it to the verifier.Announcement, Challenge, and Response.PROVER_ROLE, VERIFIER_ROLE| Modifier and Type | Method and Description |
|---|---|
default boolean |
checkTranscript(CommonInput commonInput,
Announcement announcement,
Challenge challenge,
Response response)
Used by the verifier to check whether the given transcript is accepting.
|
default boolean |
checkTranscript(CommonInput commonInput,
SigmaProtocolTranscript transcript)
Used by the verifier to check whether the given transcript is accepting.
|
org.cryptimeleon.math.expressions.bool.BooleanExpression |
checkTranscriptAsExpression(CommonInput commonInput,
Announcement announcement,
Challenge challenge,
Response response)
Used by the verifier to check whether the given transcript is accepting.
|
default org.cryptimeleon.math.serialization.Representation |
compressTranscript(CommonInput commonInput,
SigmaProtocolTranscript transcript)
Returns a compressed (shorter) version of the given transcript.
|
default SigmaProtocolTranscript |
decompressTranscript(CommonInput commonInput,
Challenge challenge,
org.cryptimeleon.math.serialization.Representation compressedTranscript)
Decompresses a transcript compressed with
compressTranscript(CommonInput, SigmaProtocolTranscript) |
Announcement |
generateAnnouncement(CommonInput commonInput,
SecretInput secretInput,
AnnouncementSecret announcementSecret)
Used by the prover to generate an announcement (the first message sent in the protocol).
|
AnnouncementSecret |
generateAnnouncementSecret(CommonInput commonInput,
SecretInput secretInput)
Used by the prover to generate a secret value that will be input for future method calls.
|
default Challenge |
generateChallenge(CommonInput commonInput)
Used by the verifier to generate a challenge (the second message in the protocol).
|
Response |
generateResponse(CommonInput commonInput,
SecretInput secretInput,
Announcement announcement,
AnnouncementSecret announcementSecret,
Challenge challenge)
Used by the prover to generate a response (the third and last message sent in the protocol).
|
SigmaProtocolTranscript |
generateSimulatedTranscript(CommonInput commonInput,
Challenge challenge)
Generates a random transcript with the same distribution as an honestly generated one that contains the given
Challenge. |
ChallengeSpace |
getChallengeSpace(CommonInput commonInput)
Returns the challenge space used by this protocol.
|
default java.lang.String |
getFirstMessageRole()
Returns the role that sends the first message.
|
default SigmaProtocolProverInstance |
getProverInstance(CommonInput commonInput,
SecretInput secretInput) |
default SigmaProtocolVerifierInstance |
getVerifierInstance(CommonInput commonInput) |
default InteractiveArgumentInstance |
instantiateProtocol(java.lang.String role,
CommonInput commonInput,
SecretInput secretInput) |
Announcement |
restoreAnnouncement(CommonInput commonInput,
org.cryptimeleon.math.serialization.Representation repr) |
default Challenge |
restoreChallenge(CommonInput commonInput,
org.cryptimeleon.math.serialization.Representation repr) |
Response |
restoreResponse(CommonInput commonInput,
Announcement announcement,
Challenge challenge,
org.cryptimeleon.math.serialization.Representation repr) |
default SigmaProtocolTranscript |
restoreTranscript(org.cryptimeleon.math.serialization.Representation repr,
CommonInput commonInput) |
debugProof, getRoleNames, instantiateProver, instantiateVerifierrunProtocolLocallyAnnouncementSecret generateAnnouncementSecret(CommonInput commonInput, SecretInput secretInput)
For example, for an implementation of the original Schnorr protocol, the announcement secret would be a random exponent r.
commonInput - input to the overall protocol that both prover and verifier usesecretInput - input to the overall protocol that only the prover getsAnnouncement generateAnnouncement(CommonInput commonInput, SecretInput secretInput, AnnouncementSecret announcementSecret)
default Challenge generateChallenge(CommonInput commonInput)
ChallengeSpace getChallengeSpace(CommonInput commonInput)
Response generateResponse(CommonInput commonInput, SecretInput secretInput, Announcement announcement, AnnouncementSecret announcementSecret, Challenge challenge)
default boolean checkTranscript(CommonInput commonInput, Announcement announcement, Challenge challenge, Response response)
org.cryptimeleon.math.expressions.bool.BooleanExpression checkTranscriptAsExpression(CommonInput commonInput, Announcement announcement, Challenge challenge, Response response)
default boolean checkTranscript(CommonInput commonInput, SigmaProtocolTranscript transcript)
default org.cryptimeleon.math.serialization.Representation compressTranscript(CommonInput commonInput, SigmaProtocolTranscript transcript)
Useful for FiatShamirProofSystem.
Compressed transcript does not necessarily contain the challenge (see decompressTranscript(CommonInput, Challenge, Representation))
default SigmaProtocolTranscript decompressTranscript(CommonInput commonInput, Challenge challenge, org.cryptimeleon.math.serialization.Representation compressedTranscript) throws java.lang.IllegalArgumentException
compressTranscript(CommonInput, SigmaProtocolTranscript)
The guarantee is that if a transcript is valid, then compressing and decompressing yields the same transcript.
Additionally, any transcript output by this method is valid (i.e. checkTranscript(CommonInput, SigmaProtocolTranscript) returns true).
java.lang.IllegalArgumentException - is the given compressedTranscript cannot be decompressed into a valid transcript.SigmaProtocolTranscript generateSimulatedTranscript(CommonInput commonInput, Challenge challenge)
Challenge.Announcement restoreAnnouncement(CommonInput commonInput, org.cryptimeleon.math.serialization.Representation repr)
default Challenge restoreChallenge(CommonInput commonInput, org.cryptimeleon.math.serialization.Representation repr)
Response restoreResponse(CommonInput commonInput, Announcement announcement, Challenge challenge, org.cryptimeleon.math.serialization.Representation repr)
default SigmaProtocolTranscript restoreTranscript(org.cryptimeleon.math.serialization.Representation repr, CommonInput commonInput)
default java.lang.String getFirstMessageRole()
TwoPartyProtocolgetFirstMessageRole in interface TwoPartyProtocoldefault InteractiveArgumentInstance instantiateProtocol(java.lang.String role, CommonInput commonInput, SecretInput secretInput)
instantiateProtocol in interface InteractiveArgumentinstantiateProtocol in interface TwoPartyProtocoldefault SigmaProtocolProverInstance getProverInstance(CommonInput commonInput, SecretInput secretInput)
default SigmaProtocolVerifierInstance getVerifierInstance(CommonInput commonInput)