Performs a proof of shuffle of ciphers. It is an implementation of the Verfication class. More...
#include <proofofshuffleofciphers.hpp>
Public Member Functions | |
ProofOfShuffleOfCiphers (bool &readingWasOK, XmlConfig *config, std::vector< uint8_t > prefix, arithm::ArrayOfElmts pedersen, unsigned int N, arithm::Field *randomizerGrp, elGamal::CipherGroup cipherTextsGrp, arithm::Elmt elGamalPkey, elGamal::ArrayOfCiphers inputCiphers, elGamal::ArrayOfCiphers outputCiphers, verifierUtils::ByteTree *commitmentFSproof, verifierUtils::ByteTree *replyFSproof) | |
Creates an instance of a ProofOfShuffleOfCiphers class by setting all of its attributes. | |
bool | isEverythingOK () |
Checks that the mix-servers re-encrypted and permuted the ciphered votes as they were commited to. | |
![]() | |
Verification (XmlConfig *config, std::vector< uint8_t > prefix, unsigned int nZero) | |
Creates an instance of a Verification class by setting its two attributes. | |
arithm::ArrayOfElmts | randomExponents (verifierUtils::ByteTree *bts, std::vector< uint8_t > &s) |
Used to compute a random exponents vector according to the specification. | |
arithm::Elmt | getChallenge (std::vector< uint8_t > s) |
Returns a challenge computed from the original seed s and a bytetree. | |
arithm::ArrayOfElmts | getGenerators () |
Returns the h attribute. |
Private Attributes | |
arithm::ArrayOfElmts | u |
![]() ![]() | |
arithm::Field * | R |
The randomizer field ![]() | |
elGamal::CipherGroup | C |
The cipher group ![]() | |
arithm::Elmt | pk |
The El-Gamal public key. | |
elGamal::ArrayOfCiphers | w |
The array containing the input cipher texts. | |
elGamal::ArrayOfCiphers | wPrime |
The array containing the output cipher texts. |
Additional Inherited Members | |
![]() | |
XmlConfig * | protocolFile |
A class containing the information in the protocol info file. | |
cryptoTools::SHAx * | H |
The hashfunction to be used by the random oracles. | |
cryptoTools::RO * | ROs |
The random oracle to use to seed the PRG. | |
cryptoTools::RO * | ROv |
The random oracle to use to generate challenges. | |
std::vector< uint8_t > | rho |
![]() | |
unsigned int | n0 |
![]() ![]() | |
unsigned int | ne |
![]() | |
unsigned int | nr |
![]() | |
unsigned int | nv |
![]() | |
cryptoTools::PRG * | prg |
Pseudo-random generator ![]() | |
arithm::Group * | gq |
![]() ![]() | |
arithm::Field * | zq |
The field in which the exponent live, ![]() | |
arithm::ArrayOfElmts | h |
An array of independant generators ![]() | |
verifierUtils::ByteTree * | tau |
The commitment of the Fiat-Shamir proof, ![]() | |
verifierUtils::ByteTree * | sigma |
The reply of the Fiat-Shamir proof, ![]() |
Performs a proof of shuffle of ciphers. It is an implementation of the Verfication class.
The operation performed in this class are just implementation of the verificatum verifier specification, namely page 16.
Definition at line 30 of file proofofshuffleofciphers.hpp.
ProofOfShuffleOfCiphers::ProofOfShuffleOfCiphers | ( | bool & | readingWasOK, |
XmlConfig * | config, | ||
std::vector< uint8_t > | prefix, | ||
arithm::ArrayOfElmts | pedersen, | ||
unsigned int | N, | ||
arithm::Field * | randomizerGrp, | ||
elGamal::CipherGroup | cipherTextsGrp, | ||
arithm::Elmt | elGamalPkey, | ||
elGamal::ArrayOfCiphers | inputCiphers, | ||
elGamal::ArrayOfCiphers | outputCiphers, | ||
verifierUtils::ByteTree * | commitmentFSproof, | ||
verifierUtils::ByteTree * | replyFSproof | ||
) |
Creates an instance of a ProofOfShuffleOfCiphers class by setting all of its attributes.
Checks also whether or not tau and sigma will contain the data needed for the rest of the computations to run smoothly. Verifies that the size of the arrays is equal to N.
If any variable is wrong, readingWasOK takes the value false. Otherwise, this variable is equal to true at the end of the construction.
[out] | readingWasOK | Is false at the end of the construction if there was a problem. |
config | The protocol info file to use. | |
prefix | The value to give to the rho attribute. | |
pedersen | Arrays of Pedersen commitments. | |
N | The actual number ciphers | |
randomizerGrp | The randomizer group. | |
cipherTextsGrp | The ciphertext group. | |
elGamalPkey | The El-Gamal public key. | |
inputCiphers | The ciphers to check. | |
outputCiphers | The shuffled ciphers — or are they? | |
commitmentFSproof | Commitments of the Fiat-Shamir proof. | |
replyFSproof | Reply of the Fiat-Shamir proof. |
Definition at line 18 of file proofofshuffleofciphers.cpp.
|
virtual |
Checks that the mix-servers re-encrypted and permuted the ciphered votes as they were commited to.
The detail of this algorithm is given page 16 of the verificatum verifier specification.
Reimplemented from proofs::Verification.
Definition at line 95 of file proofofshuffleofciphers.cpp.
|
private |
The cipher group .
Definition at line 47 of file proofofshuffleofciphers.hpp.
|
private |
The El-Gamal public key.
Definition at line 52 of file proofofshuffleofciphers.hpp.
|
private |
The randomizer field .
Definition at line 42 of file proofofshuffleofciphers.hpp.
|
private |
, an array of Pedersen commitments in
.
Definition at line 37 of file proofofshuffleofciphers.hpp.
|
private |
The array containing the input cipher texts.
Definition at line 57 of file proofofshuffleofciphers.hpp.
|
private |
The array containing the output cipher texts.
Definition at line 62 of file proofofshuffleofciphers.hpp.