public abstract class SendThenDelegateProtocol extends java.lang.Object implements SigmaProtocol
The protocol version of SendThenDelegateFragment.
A SchnorrFragment is always incomplete in the sense that it depends on external variables.
In contrast, a SigmaProtocol has no external dependencies and, hence, can be run standalone.
An implementation of a SendThenDelegateProtocol is very similar to an implementation of
a SendThenDelegateFragment, except that there are no external SchnorrVariables and the protocol
must define all its variables itself.
PROVER_ROLE, VERIFIER_ROLE| Constructor and Description |
|---|
SendThenDelegateProtocol() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
org.cryptimeleon.math.serialization.Representation |
compressTranscript(CommonInput commonInput,
SigmaProtocolTranscript transcript)
Returns a compressed (shorter) version of the given transcript.
|
void |
debugProof(CommonInput commonInput,
SecretInput secretInput)
Checks if commonInput and secretInput are valid inputs for this protocol.
|
SigmaProtocolTranscript |
decompressTranscript(CommonInput commonInput,
Challenge challenge,
org.cryptimeleon.math.serialization.Representation compressedTranscript)
Decompresses a transcript compressed with
SigmaProtocol.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.
|
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. |
abstract ZnChallengeSpace |
getChallengeSpace(CommonInput commonInput)
Returns the challenge space used by this protocol.
|
protected abstract org.cryptimeleon.math.expressions.bool.BooleanExpression |
provideAdditionalCheck(CommonInput commonInput,
SendFirstValue sendFirstValue) |
protected abstract SendThenDelegateFragment.ProverSpec |
provideProverSpec(CommonInput commonInput,
SecretInput secretInput,
SendThenDelegateFragment.ProverSpecBuilder builder)
Run by the prover to set up (1) the sendFirstValue and
(2) witness values for variables this fragment proves knowledge of itself (i.e.
|
protected abstract SendThenDelegateFragment.SubprotocolSpec |
provideSubprotocolSpec(CommonInput commonInput,
SendFirstValue sendFirstValue,
SendThenDelegateFragment.SubprotocolSpecBuilder builder) |
Announcement |
restoreAnnouncement(CommonInput commonInput,
org.cryptimeleon.math.serialization.Representation repr) |
ZnChallenge |
restoreChallenge(CommonInput commonInput,
org.cryptimeleon.math.serialization.Representation repr) |
Response |
restoreResponse(CommonInput commonInput,
Announcement announcement,
Challenge challenge,
org.cryptimeleon.math.serialization.Representation repr) |
protected abstract SendFirstValue |
restoreSendFirstValue(CommonInput commonInput,
org.cryptimeleon.math.serialization.Representation repr) |
protected abstract SendFirstValue |
simulateSendFirstValue(CommonInput commonInput) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckTranscript, checkTranscript, generateChallenge, getFirstMessageRole, getProverInstance, getVerifierInstance, instantiateProtocol, restoreTranscriptgetRoleNames, instantiateProver, instantiateVerifierrunProtocolLocallyprotected abstract SendThenDelegateFragment.ProverSpec provideProverSpec(CommonInput commonInput, SecretInput secretInput, SendThenDelegateFragment.ProverSpecBuilder builder)
provideSubprotocolSpec(CommonInput, SendFirstValue, SendThenDelegateFragment.SubprotocolSpecBuilder)).protected abstract SendFirstValue restoreSendFirstValue(CommonInput commonInput, org.cryptimeleon.math.serialization.Representation repr)
protected abstract SendFirstValue simulateSendFirstValue(CommonInput commonInput)
protected abstract SendThenDelegateFragment.SubprotocolSpec provideSubprotocolSpec(CommonInput commonInput, SendFirstValue sendFirstValue, SendThenDelegateFragment.SubprotocolSpecBuilder builder)
protected abstract org.cryptimeleon.math.expressions.bool.BooleanExpression provideAdditionalCheck(CommonInput commonInput, SendFirstValue sendFirstValue)
public abstract ZnChallengeSpace getChallengeSpace(CommonInput commonInput)
SigmaProtocolgetChallengeSpace in interface SigmaProtocolpublic AnnouncementSecret generateAnnouncementSecret(CommonInput commonInput, SecretInput secretInput)
SigmaProtocolFor example, for an implementation of the original Schnorr protocol, the announcement secret would be a random exponent r.
generateAnnouncementSecret in interface SigmaProtocolcommonInput - input to the overall protocol that both prover and verifier usesecretInput - input to the overall protocol that only the prover getspublic Announcement generateAnnouncement(CommonInput commonInput, SecretInput secretInput, AnnouncementSecret announcementSecret)
SigmaProtocolgenerateAnnouncement in interface SigmaProtocolpublic Response generateResponse(CommonInput commonInput, SecretInput secretInput, Announcement announcement, AnnouncementSecret announcementSecret, Challenge challenge)
SigmaProtocolgenerateResponse in interface SigmaProtocolpublic org.cryptimeleon.math.expressions.bool.BooleanExpression checkTranscriptAsExpression(CommonInput commonInput, Announcement announcement, Challenge challenge, Response response)
SigmaProtocolcheckTranscriptAsExpression in interface SigmaProtocolpublic SigmaProtocolTranscript generateSimulatedTranscript(CommonInput commonInput, Challenge challenge)
SigmaProtocolChallenge.generateSimulatedTranscript in interface SigmaProtocolpublic Announcement restoreAnnouncement(CommonInput commonInput, org.cryptimeleon.math.serialization.Representation repr)
restoreAnnouncement in interface SigmaProtocolpublic ZnChallenge restoreChallenge(CommonInput commonInput, org.cryptimeleon.math.serialization.Representation repr)
restoreChallenge in interface SigmaProtocolpublic Response restoreResponse(CommonInput commonInput, Announcement announcement, Challenge challenge, org.cryptimeleon.math.serialization.Representation repr)
restoreResponse in interface SigmaProtocolpublic org.cryptimeleon.math.serialization.Representation compressTranscript(CommonInput commonInput, SigmaProtocolTranscript transcript)
SigmaProtocol
Useful for FiatShamirProofSystem.
Compressed transcript does not necessarily contain the challenge (see SigmaProtocol.decompressTranscript(CommonInput, Challenge, Representation))
compressTranscript in interface SigmaProtocolpublic SigmaProtocolTranscript decompressTranscript(CommonInput commonInput, Challenge challenge, org.cryptimeleon.math.serialization.Representation compressedTranscript) throws java.lang.IllegalArgumentException
SigmaProtocolSigmaProtocol.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. SigmaProtocol.checkTranscript(CommonInput, SigmaProtocolTranscript) returns true).
decompressTranscript in interface SigmaProtocoljava.lang.IllegalArgumentException - is the given compressedTranscript cannot be decompressed into a valid transcript.public void debugProof(CommonInput commonInput, SecretInput secretInput)
InteractiveArgumentdebugProof in interface InteractiveArgument