Previous: , Up: Classes   [Contents][Index]


2.2.3.6 Toolbox for Mental Card Games

This section explains the main class of LibTMCG which provides some “high-level operations” from Schindelhauer’s toolbox [Sc98]. Even if the more efficient card encoding scheme of Barnett and Smart [BS03] will deployed in your application, at least one instance of the following class must be created to perform any card or stack operations.

Class: SchindelhauerTMCG

This class implements the main core of Schindelhauer’s toolbox, i.e. important functions like masking, opening, and shuffling of cards and stacks, respectively. Some exotic operations are still missing, e.g., the possibility to insert a masked card secretly into a stack or the verifiable subset properties of stacks. All implemented operations are available for the original encoding scheme of Schindelhauer (see Data Types) and, of course, for the more efficient encoding scheme of Barnett and Smart (see BarnettSmartVTMF) as well.

Member of SchindelhauerTMCG: unsigned long int TMCG_SecurityLevel

This read-only nonnegative integer represents the security parameter \kappa which was given to the constructor of this class. It defines the number of sequential protocol iterations and hence the soundness error probability (2^{-\kappa}) of the zero-knowledge proofs in the encoding scheme of Schindelhauer. Further it defines the soundness error probability (also 2^{-\kappa}) of the shuffle argument in the encoding scheme of Barnett and Smart, if the efficient protocols of Groth [Gr05, Gr10] and others [HSSV09] are not used.

Member of SchindelhauerTMCG: size_t TMCG_Players

This read-only nonnegative integer represents the number of players as given to the constructor of this class.

Member of SchindelhauerTMCG: size_t TMCG_TypeBits

This read-only nonnegative integer contains the number of bits that are necessary to encode the card types in the binary representation. It was given as an argument to the constructor of this class.

Constructor on SchindelhauerTMCG: SchindelhauerTMCG (const unsigned long int security, const size_t k, const size_t w)

This constructor creates an instance, where security is a nonnegative integer that represents the security parameter \kappa. The parameter k is the number of players and w is the number of bits which are necessary to represent all possible card types in a binary representation.

The integer \kappa controls the maximum soundness error probability (2^{-\kappa}) of the zero-knowledge proofs in the encoding scheme of Schindelhauer. Specifically, security defines the number of sequential iterations of the involved protocols and thus has a major impact on the computational and communication complexity. If the encoding scheme of Barnett and Smart [BS03] is used, then it only defines the soundness error probability (also 2^{-\kappa}) of the corresponding shuffle proof. However, if the efficient shuffle verification protocol of Groth [Gr05] is used, then the parameter security is dispensable, because the parameter ell_e given during instantiation of GrothVSSHE (e.g. the LibTMCG default security parameter TMCG_GROTH_L_E) determines this soundness error probability (2^{-\ell_e}). The similar holds for the verifiable rotation protocol [HSSV09], however, in this case there is no explicit security parameter for the soundness error.

Unfortunately, the parameters k and w have a major impact on the complexity in the encoding scheme of Schindelhauer, too. Therefore you should always use reasonable values here. For example, to create a deck with M different card types simply set w to \lceil\log_2 M\rceil which is an tight upper-bound for the applied binary representation. Furthermore, set k to the number of players which are really involved and not to a possible maximum value. Note that k and w are limited by the global constants TMCG_MAX_PLAYERS and TMCG_MAX_TYPEBITS, respectively.

Method on SchindelhauerTMCG: void TMCG_CreateOpenCard (TMCG_Card& c, const TMCG_PublicKeyRing& ring, const size_t type)

This method initializes the open card c with the given type using the encoding scheme of Schindelhauer. The type MUST be an integer from the interval [0, 2^{w} - 1], where w is the number given to the constructor of this class. The w MUST be the same number as used at creation of c (see Data Types). The parameter ring is a container with exactly k public keys, where k is the number given to the constructor of this class. The k MUST be the same number as used at the creation of c.

Method on SchindelhauerTMCG: void TMCG_CreateOpenCard (VTMF_Card& c, BarnettSmartVTMF_dlog* vtmf, const size_t type)

This method initializes the open card c with the given type using the encoding scheme of Barnett and Smart. The type MUST be an integer from the interval [0, 2^{w} - 1], where w is the number given to the constructor of this class. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol was successfully finished (see BarnettSmartVTMF and BarnettSmartVTMF_dlog_GroupQR, respectively).

Method on SchindelhauerTMCG: void TMCG_CreateCardSecret (TMCG_CardSecret& cs, const TMCG_PublicKeyRing& ring, const size_t index)

This method initializes the card secret cs with random values which is necessary to perform later a masking operation on a card. The parameter ring is a container with exactly k public keys, where k is the number given to the constructor of this class. It MUST be the same number as used at the creation of cs (see Data Types). The parameter index is from the interval [0, k - 1] and determines the position of the players public key in the container ring.

Method on SchindelhauerTMCG: void TMCG_CreateCardSecret (VTMF_CardSecret& cs, BarnettSmartVTMF_dlog* vtmf)

This method initializes the card secret cs with a random value which is necessary to perform later a masking operation on a card. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished (see BarnettSmartVTMF).

Method on SchindelhauerTMCG: void TMCG_CreatePrivateCard (TMCG_Card& c, TMCG_CardSecret& cs, const TMCG_PublicKeyRing& ring, const size_t index, const size_t type)

This method initializes a masked card c with the given type and a corresponding card secret cs using the encoding scheme of Schindelhauer. The type MUST be an integer from the interval [0, 2^{w} - 1], where w is the number given to the constructor of this class. The w MUST be the same number as used at creation of c and cs (see Data Types). The parameter ring is a container with exactly k public keys, where k is the number given to the constructor of this class. The k MUST be the same number as used at the creation of c and cs. The parameter index is from the interval [0, k - 1] and determines the position of the players public key in the container ring. Internally, TMCG_CreatePrivateCard calls

  1. TMCG_CreateOpenCard to initialize c with type,
  2. TMCG_CreateCardSecret to initialize cs with random values, and
  3. TMCG_MaskCard to mask c with the secret cs.
Method on SchindelhauerTMCG: void TMCG_CreatePrivateCard (VTMF_Card& c, VTMF_CardSecret& cs, BarnettSmartVTMF_dlog* vtmf, const size_t type)

This method initializes a masked card c with the given type and a corresponding card secret cs using the encoding scheme of Barnett and Smart. The type MUST be an integer from the interval [0, 2^{w} - 1], where w is the number given to the constructor of this class. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished (see BarnettSmartVTMF). Specifically, TMCG_CreatePrivateCard directly executes the masking operation of the verifiable masking protocol.

Method on SchindelhauerTMCG: void TMCG_MaskCard (const TMCG_Card& c, TMCG_Card& cc, const TMCG_CardSecret& cs, const TMCG_PublicKeyRing& ring, const bool TimingAttackProtection =true)

This method performs a masking operation on the open or already masked card c using the encoding scheme of Schindelhauer. Finally it returns the result in cc. The parameter cs MUST be an initialized fresh card secret which has NEVER been involved in a masking operation before. The parameters c, cc, and cs MUST be created such that their k and w corresponds to the numbers given to the constructor of this class, respectively. The parameter ring is a container with exactly k public keys. The protection against timing attacks is turned on, if TimingAttackProtection is set to true.

Method on SchindelhauerTMCG: void TMCG_MaskCard (const VTMF_Card& c, VTMF_Card& cc, const VTMF_CardSecret& cs, BarnettSmartVTMF_dlog* vtmf, const bool TimingAttackProtection =true)

This method performs a masking operation on the open or already masked card c using the encoding scheme of Barnett and Smart. Finally it returns the result in cc. Specifically, TMCG_MaskCard directly executes the masking operation of the verifiable re-masking protocol. The parameter cs MUST be an initialized fresh card secret which has NEVER been involved in a masking operation before. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished (see BarnettSmartVTMF). The protection against timing attacks is turned on, if TimingAttackProtection is set to true.

Method on SchindelhauerTMCG: void TMCG_ProveMaskCard (const TMCG_Card& c, const TMCG_Card& cc, const TMCG_CardSecret& cs, const TMCG_PublicKeyRing& ring, std::istream& in, std::ostream& out)

This method should be called by the prover after TMCG_MaskCard to show that he performed the masking operation correctly. The parameters c, cc, and cs are the input, the result, and the used card secret of TMCG_MaskCard, respectively. They MUST be created such that their k resp. w corresponds to the numbers given to the constructor of this class. The parameter ring is a container with exactly k public keys. The input/output protocol messages from and to the verifier are transmitted on the streams in and out, respectively.

Method on SchindelhauerTMCG: void TMCG_ProveMaskCard (const VTMF_Card& c, const VTMF_Card& cc, const VTMF_CardSecret& cs, BarnettSmartVTMF_dlog* vtmf, std::istream& in, std::ostream& out)

This method should be executed by the prover after calling TMCG_MaskCard to show that he performed the masking operation correctly. Specifically, TMCG_ProveMaskCard directly calls the prove operation of the verifiable re-masking protocol. The parameters c, cc, and cs are the input, the result, and the used card secret of TMCG_MaskCard, respectively. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished. The input/output protocol messages from and to the verifier are transmitted on the streams in and out, respectively.

Method on SchindelhauerTMCG: bool TMCG_VerifyMaskCard (const TMCG_Card& c, const TMCG_Card& cc, const TMCG_PublicKeyRing& ring, std::istream& in, std::ostream& out)

This method should be executed by the verifier to check whether or not a masking operation was performed correctly. The parameters c and cc are the input and the result of TMCG_MaskCard, respectively. They MUST be created such that their k resp. w corresponds to the numbers given to the constructor of this class. The parameter ring is a container with exactly k public keys. The input/output protocol messages from and to the prover are transmitted on the streams in and out, respectively. The method returns true, if everything was sound.

Method on SchindelhauerTMCG: bool TMCG_VerifyMaskCard (const VTMF_Card& c, const VTMF_Card& cc, BarnettSmartVTMF_dlog* vtmf, std::istream& in, std::ostream& out)

This method should be executed by the verifier to check whether or not a masking operation was performed correctly. Specifically, TMCG_VerifyMaskCard directly calls the verify operation of the verifiable re-masking protocol. The parameters c and cc are the input and the result of TMCG_MaskCard, respectively. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished. The input/output protocol messages from and to the prover are transmitted on the streams in and out, respectively. The method returns true, if everything was sound.

Method on SchindelhauerTMCG: void TMCG_ProveCardSecret (const TMCG_Card& c, const TMCG_SecretKey& key, const size_t index, std::istream& in, std::ostream& out)

This method is used to reveal the card type of c to a verifier. Every player must execute this method as prover. The card c MUST be created such that its k resp. w corresponds to the numbers given to the constructor of this class. The parameter key is the corresponding secret key (see Data Types) of the prover. The parameter index is from the interval [0, k - 1] and contains the position of the provers public key in the container ring (same as in TMCG_CreateCardSecret). The input/output protocol messages from and to the verifier are transmitted on the streams in and out, respectively.

Method on SchindelhauerTMCG: void TMCG_ProveCardSecret (const VTMF_Card& c, BarnettSmartVTMF_dlog* vtmf, std::istream& in, std::ostream& out)

This method is used to reveal the card type of c to a verifier. Every player must execute this method as prover. Specifically, TMCG_ProveCardSecret directly calls the prove operation of the verifiable decryption protocol. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished. The input/output protocol messages from and to the verifier are transmitted on the streams in and out, respectively.

Method on SchindelhauerTMCG: bool TMCG_VerifyCardSecret (const TMCG_Card& c, TMCG_CardSecret& cs, const TMCG_PublicKey& key, const size_t index, std::istream& in, std::ostream& out)

This method is used to verify and accumulate card type information regarding c that are supplied by a prover. It is the opposite method of TMCG_ProveCardSecret and must be executed by the player who wants to know the type. The secrets provided by the single provers are accumulated in the parameter cs. Thus c and cs MUST be created such that their k resp. w corresponds to the numbers given to the constructor of this class. The parameter key is the corresponding public key (see Data Types) of the prover. The parameter index is from the interval [0, k - 1] and contains the position of the provers public key in the container ring (same as in TMCG_CreateCardSecret). The input/output protocol messages from and to the prover are transmitted on the streams in and out, respectively.

Method on SchindelhauerTMCG: bool TMCG_VerifyCardSecret (const VTMF_Card& c, BarnettSmartVTMF_dlog* vtmf, std::istream& in, std::ostream& out)

This method is used to verify and accumulate card type information regarding c that are supplied by a prover. It is the opposite method of TMCG_ProveCardSecret and must be executed by the player who wants to know the type. The secrets provided by the single provers are accumulated internally, thus this method cannot be interleaved with the opening of other cards. Specifically, TMCG_VerifyCardSecret directly calls the verify and update operation of the verifiable decryption protocol. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished. The input/output protocol messages from and to the verifier are transmitted on the streams in and out, respectively.

Method on SchindelhauerTMCG: void TMCG_SelfCardSecret (const TMCG_Card& c, TMCG_CardSecret& cs, const TMCG_SecretKey& key, const size_t index)

This method is used to compute and accumulate card type information regarding c. Analogously to TMCG_VerifyCardSecret it must be executed by the player who wants to know the type of c. The information is accumulated in the parameter cs. Thus c and cs MUST be created such that their k resp. w corresponds to the numbers given to the constructor of this class. The parameter key is the corresponding secret key (see Data Types) of the player. The parameter index is from the interval [0, k - 1] and contains the position of the players public key in the container ring (same as in TMCG_CreateCardSecret).

Method on SchindelhauerTMCG: void TMCG_SelfCardSecret (const VTMF_Card& c, BarnettSmartVTMF_dlog* vtmf)

This method is used to compute and accumulate card type information regarding c. It MUST be called by the player who wants to know the type of c BEFORE TMCG_VerifyCardSecret and TMCG_TypeOfCard are executed. The secrets provided by the player are accumulated internally, thus this method cannot be interleaved with the opening of other cards. Specifically, TMCG_SelfCardSecret directly calls the initialize operation of the verifiable decryption protocol. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished.

Method on SchindelhauerTMCG: size_t TMCG_TypeOfCard (const TMCG_CardSecret& cs)

This method returns the type of a masked card provided that the type information were properly accumulated in cs before (by calling TMCG_SelfCardSecret and TMCG_VerifyCardSecret, respectively).

Method on SchindelhauerTMCG: size_t TMCG_TypeOfCard (const VTMF_Card& c, BarnettSmartVTMF_dlog* vtmf)

This method returns the type of a masked card c provided that the type information regarding c were properly accumulated internally before (by calling TMCG_SelfCardSecret and TMCG_VerifyCardSecret, respectively). It returns the value TMCG_MaxCardType, if the opening operation failed or if the card type was not among the set of valid types. This method MUST be performed by the player who wants to know the type AFTER TMCG_SelfCardSecret and TMCG_VerifyCardSecret are executed. Specifically, TMCG_TypeOfCard directly calls the finalize operation of the verifiable decryption protocol. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished.

Method on SchindelhauerTMCG: size_t TMCG_CreateStackSecret (TMCG_StackSecret<TMCG_CardSecret>& ss, const bool cyclic, const TMCG_PublicKeyRing& ring, const size_t index, const size_t size)

This method initializes the stack secret ss with a randomly and uniformly chosen permutation (using the algorithm of Knuth) and fresh card secrets. Later this stack secret can be used to perform a secret shuffle operation on a stack. If the parameter cyclic is set to true, then the permutation is only a cyclic shift which might be of interest for particular operations, e.g. cutting the deck. The parameter ring is a container with exactly k public keys, where k is the number given to the constructor of this class. The parameter index is from the interval [0, k - 1] and contains the position of the players public key in the container ring. The parameter size determines the size of the created stack secret, i.e. the number of cards in the corresponding stack. The size is upper-bounded by TMCG_MAX_CARDS. The method returns the offset of the cyclic shift, if cyclic was set to true. Otherwise, the value 0 is returned.

Method on SchindelhauerTMCG: size_t TMCG_CreateStackSecret (TMCG_StackSecret<VTMF_CardSecret>& ss, const bool cyclic, const size_t size, BarnettSmartVTMF_dlog* vtmf)

This method initializes the stack secret ss with a randomly and uniformly chosen permutation (using the algorithm of Knuth) and fresh card secrets. Later this stack secret can be used to perform a secret shuffle operation on a stack. If the parameter cyclic is set to true, then the permutation is only a cyclic shift which might be of interest for particular operations, e.g. cutting the deck. The parameter size determines the size of the created stack secret, i.e. the number of cards in the corresponding stack. The size is upper-bounded by TMCG_MAX_CARDS. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished. The method returns the offset of the cyclic shift, if cyclic was set to true. Otherwise, the value 0 is returned.

Method on SchindelhauerTMCG: void TMCG_CreateStackSecret (TMCG_StackSecret<TMCG_CardSecret>& ss, const std::vector<size_t>& pi, const TMCG_PublicKeyRing& ring, const size_t index, const size_t size)

This method initializes the stack secret ss with a given permutation pi and fresh card secrets. Later this stack secret can be used to perform a secret shuffle operation on a stack. The parameter ring is a container with exactly k public keys, where k is the number given to the constructor of this class. The parameter index is from the interval [0, k - 1] and contains the position of the players public key in the container ring. The parameter size determines the size of the created stack secret, i.e. the number of cards in the corresponding stack. The size is upper-bounded by TMCG_MAX_CARDS.

Method on SchindelhauerTMCG: void TMCG_CreateStackSecret (TMCG_StackSecret<VTMF_CardSecret>& ss, const std::vector<size_t>& pi, const size_t size, BarnettSmartVTMF_dlog* vtmf)

This method initializes the stack secret ss with a given permutation pi and fresh card secrets. Later this stack secret can be used to perform a secret shuffle operation on a stack. The parameter size determines the size of the created stack secret, i.e. the number of cards in the corresponding stack. The size is upper-bounded by TMCG_MAX_CARDS. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished.

Method on SchindelhauerTMCG: void TMCG_MixStack (const TMCG_Stack<TMCG_Card>& s, TMCG_Stack<TMCG_Card>& s2, const TMCG_StackSecret<TMCG_CardSecret>& ss, const TMCG_PublicKeyRing& ring, const bool TimingAttackProtection =true)

This method shuffles a given stack s according to the previously created stack secret ss (see Data Types). The result of the shuffle is returned in s2. The parameter ss MUST be a fresh stack secret which has NEVER been involved in a shuffle operation before. The parameters s and ss MUST be of the same size. The parameter ring is a container with exactly k public keys, where k is the number given to the constructor of this class. The protection against timing attacks is turned on, if TimingAttackProtection is set to true.

Method on SchindelhauerTMCG: void TMCG_MixStack (const TMCG_Stack<VTMF_Card>& s, TMCG_Stack<VTMF_Card>& s2, const TMCG_StackSecret<VTMF_CardSecret>& ss, BarnettSmartVTMF_dlog* vtmf, const bool TimingAttackProtection =true)

This method shuffles a given stack s according to the previously created stack secret ss (see Data Types). The result of the shuffle is returned in s2. The parameter ss MUST be a fresh stack secret which has NEVER been involved in a shuffle operation before. The parameters s and ss MUST be of the same size. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished. The protection against timing attacks is turned on, if TimingAttackProtection is set to true.

Method on SchindelhauerTMCG: void TMCG_ProveStackEquality (const TMCG_Stack<TMCG_Card>& s, const TMCG_Stack<TMCG_Card>& s2, const TMCG_StackSecret<TMCG_CardSecret>& ss, const bool cyclic, const TMCG_PublicKeyRing& ring, const size_t index, std::istream& in, std::ostream& out)

This method should be called by the prover after TMCG_MixStack to show that he performed the shuffle operation correctly. The parameters s, s2, and ss are the input, the result, and the used stack secret of TMCG_MixStack, respectively. Of course, the parameters s, s2, and ss MUST be of the same size. The parameter cyclic determines whether a cyclic shift or a full permutation was used to shuffle the stack. The parameter ring is a container with exactly k public keys, where k is the number given to the constructor of this class. The parameter index is from the interval [0, k - 1] and contains the position of the provers public key in the container ring. The input/output protocol messages from and to the verifier are transmitted on the streams in and out, respectively.

Method on SchindelhauerTMCG: void TMCG_ProveStackEquality (const TMCG_Stack<VTMF_Card>& s, const TMCG_Stack<VTMF_Card>& s2, const TMCG_StackSecret<VTMF_CardSecret>& ss, const bool cyclic, BarnettSmartVTMF_dlog* vtmf, std::istream& in, std::ostream& out)

This method should be called by the prover after TMCG_MixStack to show that he performed the shuffle operation correctly. The parameters s, s2, and ss are the input, the result, and the used stack secret of TMCG_MixStack, respectively. Of course, the parameters s, s2, and ss MUST be of the same size. The parameter cyclic determines whether a cyclic shift or a full permutation was used to shuffle the stack. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished. The input/output protocol messages from and to the verifier are transmitted on the streams in and out, respectively.

Method on SchindelhauerTMCG: void TMCG_ProveStackEquality_Groth (const TMCG_Stack<VTMF_Card>& s, const TMCG_Stack<VTMF_Card>& s2, const TMCG_StackSecret<VTMF_CardSecret>& ss, BarnettSmartVTMF_dlog* vtmf, GrothVSSHE* vsshe, std::istream& in, std::ostream& out)

This is a method like above. The only difference is that the more efficient interactive shuffle verification protocol of Groth [Gr05] is used. Thus vsshe is a pointer to a proper initialized instance of GrothVSSHE. The rest of the arguments are the same.

Method on SchindelhauerTMCG: void TMCG_ProveStackEquality_Groth_noninteractive (const TMCG_Stack<VTMF_Card>& s, const TMCG_Stack<VTMF_Card>& s2, const TMCG_StackSecret<VTMF_CardSecret>& ss, BarnettSmartVTMF_dlog* vtmf, GrothVSSHE* vsshe, std::ostream& out)

This is a method like above. The difference is that the non-interactive version of the shuffle verification protocol is used. Thus only an output stream out is given, for example std::stringstream can be appropriate here. Again vsshe is a pointer to a proper initialized instance of GrothVSSHE. The rest of the arguments are the same.

Method on SchindelhauerTMCG: void TMCG_ProveStackEquality_Hoogh (const TMCG_Stack<VTMF_Card>& s, const TMCG_Stack<VTMF_Card>& s2, const TMCG_StackSecret<VTMF_CardSecret>& ss, BarnettSmartVTMF_dlog* vtmf, HooghSchoenmakersSkoricVillegasVRHE* vrhe, std::istream& in, std::ostream& out)

This is a method like above. The only difference is that the more efficient rotation verification protocol [HSSV09] is used. Thus vrhe is a pointer to an initialized instance of HooghSchoenmakersSkoricVillegasVRHE. The rest of the arguments are the same.

Method on SchindelhauerTMCG: void TMCG_ProveStackEquality_Hoogh_noninteractive (const TMCG_Stack<VTMF_Card>& s, const TMCG_Stack<VTMF_Card>& s2, const TMCG_StackSecret<VTMF_CardSecret>& ss, BarnettSmartVTMF_dlog* vtmf, HooghSchoenmakersSkoricVillegasVRHE* vrhe, std::ostream& out)

This is a method like above. The difference is that the non-interactive version of the rotation verification protocol is used. Thus only an output stream out is given, for example std::stringstream can be appropriate here. Again vrhe is a pointer to an initialized instance of HooghSchoenmakersSkoricVillegasVRHE. The rest of the arguments are the same.

Method on SchindelhauerTMCG: bool TMCG_VerifyStackEquality (const TMCG_Stack<TMCG_Card>& s, const TMCG_Stack<TMCG_Card>& s2, const bool cyclic, const TMCG_PublicKeyRing& ring, std::istream& in, std::ostream& out)

This method should be executed by the verifier to check whether or not a shuffle operation was performed correctly. The parameters s and s2 are the input and the result of TMCG_MixStack, respectively. Of course, the parameters s and s2 should be of the same size. The parameter cyclic determines whether a cyclic shift or a full permutation was used to shuffle the stack. The parameter ring is a container with exactly k public keys, where k is the number given to the constructor of this class. The input/output protocol messages from and to the prover are transmitted on the streams in and out, respectively. This method returns true, if the shuffle operation was successfully verified.

Method on SchindelhauerTMCG: bool TMCG_VerifyStackEquality (const TMCG_Stack<VTMF_Card>& s, const TMCG_Stack<VTMF_Card>& s2, const bool cyclic, BarnettSmartVTMF_dlog* vtmf, std::istream& in, std::ostream& out)

This method should be executed by the verifier to check whether or not a shuffle operation was performed correctly. The parameters s and s2 are the input and the result of TMCG_MixStack, respectively. Of course, the parameters s and s2 should be of the same size. The parameter cyclic determines whether a cyclic shift or a full permutation was used to shuffle the stack. The parameter vtmf is a pointer to an already initialized VTMF instance, i.e. the key generation protocol MUST be successfully finished. The input/output protocol messages from and to the verifier are transmitted on the streams in and out, respectively. This method returns true, if the shuffle operation was successfully verified.

Method on SchindelhauerTMCG: bool TMCG_VerifyStackEquality_Groth (const TMCG_Stack<VTMF_Card>& s, const TMCG_Stack<VTMF_Card>& s2, BarnettSmartVTMF_dlog* vtmf, GrothVSSHE* vsshe, std::istream& in, std::ostream& out)

This is a method like above. The only difference is that the more efficient shuffle verification protocol of Groth is used. Thus vsshe is a pointer to an initialized instance of GrothVSSHE. The rest of the arguments and the returned values are the same.

Method on SchindelhauerTMCG: bool TMCG_VerifyStackEquality_Groth_noninteractive (const TMCG_Stack<VTMF_Card>& s, const TMCG_Stack<VTMF_Card>& s2, BarnettSmartVTMF_dlog* vtmf, GrothVSSHE* vsshe, std::istream& in)

This is a method like above. The difference is that the non-interactive version of the shuffle verification protocol is used. Thus only an input stream in is given, for example std::stringstream can be appropriate here. Again vsshe is a pointer to an initialized instance of GrothVSSHE. The rest of the arguments and the returned values are the same.

Method on SchindelhauerTMCG: bool TMCG_VerifyStackEquality_Hoogh (const TMCG_Stack<VTMF_Card>& s, const TMCG_Stack<VTMF_Card>& s2, BarnettSmartVTMF_dlog* vtmf, HooghSchoenmakersSkoricVillegasVRHE* vrhe, std::istream& in, std::ostream& out)

This is a method like above. The only difference is that the more efficient rotation verification protocol [HSSV09] is used. Thus vrhe is a pointer to an initialized instance of HooghSchoenmakersSkoricVillegasVRHE. The rest of the arguments and the returned values are the same.

Method on SchindelhauerTMCG: bool TMCG_VerifyStackEquality_Hoogh_noninteractive (const TMCG_Stack<VTMF_Card>& s, const TMCG_Stack<VTMF_Card>& s2, BarnettSmartVTMF_dlog* vtmf, HooghSchoenmakersSkoricVillegasVRHE* vrhe, std::istream& in)

This is a method like above. The difference is that the non-interactive version of the rotation verification protocol is used. Thus only an input stream in is given, for example std::stringstream can be appropriate here. Again vrhe is a pointer to an initialized instance of HooghSchoenmakersSkoricVillegasVRHE. The rest of the arguments and the returned values are the same.

Destructor on SchindelhauerTMCG: ~SchindelhauerTMCG ()

This destructor releases all occupied resources.


Previous: , Up: Classes   [Contents][Index]