public abstract class DelegateFragment extends SendThenDelegateFragment
A SchnorrFragment that sets up some (shared) variables and then runs subprotocols to prove something about these variables.
This is a a special case of a SendThenDelegateFragment in which the SendFirstValue is empty.
SendThenDelegateFragment.ProverSpec, SendThenDelegateFragment.ProverSpecBuilder, SendThenDelegateFragment.SendThenDelegateAnnouncement, SendThenDelegateFragment.SubprotocolSpec, SendThenDelegateFragment.SubprotocolSpecBuilder, SendThenDelegateFragment.WitnessValues| Constructor and Description |
|---|
DelegateFragment() |
| Modifier and Type | Method and Description |
|---|---|
protected org.cryptimeleon.math.expressions.bool.BooleanExpression |
provideAdditionalCheck(SendFirstValue sendFirstValue)
Runs an additional check on the sendFirstValue when the verifier checks a transcript.
|
protected SendThenDelegateFragment.ProverSpec |
provideProverSpec(SchnorrVariableAssignment externalWitnesses,
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.ProverSpec |
provideProverSpecWithNoSendFirst(SchnorrVariableAssignment externalWitnesses,
SendThenDelegateFragment.ProverSpecBuilder builder)
Run by the prover to set up witness values for variables this fragment proves knowledge of itself (i.e.
|
protected SendThenDelegateFragment.SubprotocolSpec |
provideSubprotocolSpec(SendFirstValue sendFirstValue,
SendThenDelegateFragment.SubprotocolSpecBuilder builder)
Run by both prover and verifier to deterministically instantiate the desired subprotocols (subfragments) depending on the sendFirstValue.
For this, the given SendThenDelegateFragment.SubprotocolSpecBuilder allows you to create (1) variables (witnesses) and (2) register fragments to run. |
protected abstract SendThenDelegateFragment.SubprotocolSpec |
provideSubprotocolSpec(SendThenDelegateFragment.SubprotocolSpecBuilder builder) |
protected SendFirstValue |
restoreSendFirstValue(org.cryptimeleon.math.serialization.Representation repr)
Restores a
SendFirstValue from Representation |
protected SendFirstValue |
simulateSendFirstValue()
Returns a random
SendFirstValue with the same probability distribution as an honest prover would generate. |
checkTranscript, compressTranscript, debugFragment, decompressTranscript, generateAnnouncement, generateAnnouncementSecret, generateResponse, generateSimulatedTranscript, restoreAnnouncement, restoreResponseprotected SendThenDelegateFragment.ProverSpec provideProverSpec(SchnorrVariableAssignment externalWitnesses, SendThenDelegateFragment.ProverSpecBuilder builder)
SendThenDelegateFragment
Run by the prover to set up (1) the sendFirstValue and
(2) witness values for variables this fragment proves knowledge of itself (i.e. those specified in SendThenDelegateFragment.provideSubprotocolSpec(SendFirstValue, SubprotocolSpecBuilder)).
A typical example implementation can be found in SetMembershipFragment.
provideProverSpec in class SendThenDelegateFragmentexternalWitnesses - the witness values for external variablesbuilder - helper object to instantiate a SendThenDelegateFragment.ProverSpecSendThenDelegateFragment.ProverSpecBuilder.build().protected abstract SendThenDelegateFragment.ProverSpec provideProverSpecWithNoSendFirst(SchnorrVariableAssignment externalWitnesses, SendThenDelegateFragment.ProverSpecBuilder builder)
Run by the prover to set up witness values for variables this fragment proves knowledge of itself (i.e. those specified in DelegateFragment#provideSubprotocolSpec(SubprotocolSpecBuilder)).
A typical example implementation can be found in SmallerThanPowerFragment.
externalWitnesses - the witness values for external variablesbuilder - helper object to instantiate a ProverSpecProverSpecBuilder#build().protected SendFirstValue restoreSendFirstValue(org.cryptimeleon.math.serialization.Representation repr)
SendThenDelegateFragmentSendFirstValue from RepresentationrestoreSendFirstValue in class SendThenDelegateFragmentprotected SendFirstValue simulateSendFirstValue()
SendThenDelegateFragmentSendFirstValue with the same probability distribution as an honest prover would generate.simulateSendFirstValue in class SendThenDelegateFragmentprotected SendThenDelegateFragment.SubprotocolSpec provideSubprotocolSpec(SendFirstValue sendFirstValue, SendThenDelegateFragment.SubprotocolSpecBuilder builder)
SendThenDelegateFragment
Run by both prover and verifier to deterministically instantiate the desired subprotocols (subfragments) depending on the sendFirstValue.
For this, the given SendThenDelegateFragment.SubprotocolSpecBuilder allows you to create (1) variables (witnesses) and (2) register fragments to run.
The SendThenDelegateFragment will then take care of proving knowledge of the desired witnesses and running the desired subfragments.
For the subfragments, the registered variables will be considered "external" (cf. SchnorrFragment).
A typical example implementation can be found in SetMembershipFragment.
provideSubprotocolSpec in class SendThenDelegateFragmentsendFirstValue - the value the prover sends as his first message.builder - helper object to instantiate a SendThenDelegateFragment.SubprotocolSpecSendThenDelegateFragment.SubprotocolSpecBuilder.build().protected abstract SendThenDelegateFragment.SubprotocolSpec provideSubprotocolSpec(SendThenDelegateFragment.SubprotocolSpecBuilder builder)
protected org.cryptimeleon.math.expressions.bool.BooleanExpression provideAdditionalCheck(SendFirstValue sendFirstValue)
SendThenDelegateFragmentprovideAdditionalCheck in class SendThenDelegateFragment