public class SetMembershipFragment extends SendThenDelegateFragment
SendThenDelegateFragment.ProverSpec, SendThenDelegateFragment.ProverSpecBuilder, SendThenDelegateFragment.SendThenDelegateAnnouncement, SendThenDelegateFragment.SubprotocolSpec, SendThenDelegateFragment.SubprotocolSpecBuilder, SendThenDelegateFragment.WitnessValues| Constructor and Description |
|---|
SetMembershipFragment(SetMembershipPublicParameters pp,
org.cryptimeleon.math.expressions.exponent.ExponentExpr member)
Instantiates the fragment.
|
| 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 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 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, restoreResponsepublic SetMembershipFragment(SetMembershipPublicParameters pp, org.cryptimeleon.math.expressions.exponent.ExponentExpr member)
pp - public parameters to use (implicitly defines the set for which membership is proven,
see SetMembershipPublicParameters).member - an expression whose value shall be in the set. In the easiest case, this is a SchnorrZnVariable,
but it can be any affine linear combination of SchnorrZnVariablesprotected 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 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 org.cryptimeleon.math.expressions.bool.BooleanExpression provideAdditionalCheck(SendFirstValue sendFirstValue)
SendThenDelegateFragmentprovideAdditionalCheck in class SendThenDelegateFragment