Performs a proof of shuffle of commitments. It is an implementation of the Verfication class. More...
#include <proofofcorrectdecryption.hpp>
Public Member Functions | |
ProofOfCorrectDecryption (bool &readingWasOK, XmlConfig *config, std::vector< uint8_t > prefix, unsigned int N, arithm::Elmt partialJointKey, elGamal::CipherGroup cipherTextsGrp, arithm::Group *plainTextGrp, elGamal::ArrayOfCiphers inputCiphers, arithm::ArrayOfElmts decryptionFactors, verifierUtils::ByteTree *commitmentFSproof, verifierUtils::ByteTree *replyFSproof) | |
Creates an instance of the ProofOfCorrectDecryption class by setting its attributes. | |
bool | isEverythingOK () |
Checks that the joint decryption of the re-encrypted and permuted vote went as expected. | |
![]() | |
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::Elmt | y |
The partial public key ![]() | |
elGamal::CipherGroup | C |
The ciphertexts group ![]() | |
arithm::Group * | M |
The plaintexts group ![]() | |
elGamal::ArrayOfCiphers | w |
The array ![]() ![]() | |
arithm::ArrayOfElmts | f |
Array ![]() ![]() |
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 commitments. It is an implementation of the Verfication class.
The operation performed in this class are just implementation of the verificatum verifier specification, namely page 17.
Definition at line 30 of file proofofcorrectdecryption.hpp.
ProofOfCorrectDecryption::ProofOfCorrectDecryption | ( | bool & | readingWasOK, |
XmlConfig * | config, | ||
std::vector< uint8_t > | prefix, | ||
unsigned int | N, | ||
arithm::Elmt | partialJointKey, | ||
elGamal::CipherGroup | cipherTextsGrp, | ||
arithm::Group * | plainTextGrp, | ||
elGamal::ArrayOfCiphers | inputCiphers, | ||
arithm::ArrayOfElmts | decryptionFactors, | ||
verifierUtils::ByteTree * | commitmentFSproof, | ||
verifierUtils::ByteTree * | replyFSproof | ||
) |
Creates an instance of the ProofOfCorrectDecryption class by setting its attributes.
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. | |
N | The actual number of ciphers. | |
partialJointKey | The partial joint El Gamal public key. | |
cipherTextsGrp | The field in which live ciphertexts. | |
plainTextGrp | The field in which live plaintexts. | |
inputCiphers | The ciphers to check. | |
decryptionFactors | The decryption factors. | |
commitmentFSproof | Commitments of the Fiat-Shamir proof. | |
replyFSproof | Reply of the Fiat-Shamir proof. |
Definition at line 21 of file proofofcorrectdecryption.cpp.
|
virtual |
Checks that the joint decryption of the re-encrypted and permuted vote went as expected.
The detail of this algorithm is given page 17 of the verificatum verifier specification.
Reimplemented from proofs::Verification.
Definition at line 85 of file proofofcorrectdecryption.cpp.
|
private |
The ciphertexts group .
Definition at line 41 of file proofofcorrectdecryption.hpp.
|
private |
Array of decryption factors in
.
Definition at line 58 of file proofofcorrectdecryption.hpp.
|
private |
The plaintexts group .
Definition at line 46 of file proofofcorrectdecryption.hpp.
|
private |
The array of input ciphertexts in
.
Definition at line 52 of file proofofcorrectdecryption.hpp.
|
private |
The partial public key .
Definition at line 36 of file proofofcorrectdecryption.hpp.