Provides an interface every verification we want to perform must implement. More...
#include <verification.hpp>
Inheritance diagram for proofs::Verification:
Collaboration diagram for proofs::Verification:Public Member Functions | |
| 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. | |
| virtual bool | isEverythingOK () |
| Checks that everything is OK. This is a virtual method. | |
Protected Attributes | |
| 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 |
, a prefix for the random oracle. | |
| unsigned int | n0 |
(or ), the size of the arrays. | |
| unsigned int | ne |
, number of bits in each component of random vectors used for batching. | |
| unsigned int | nr |
, acceptable "statistical error" when deriving independent generators. | |
| unsigned int | nv |
, number of bits in challenges. | |
| cryptoTools::PRG * | prg |
Pseudo-random generator used to derive random vectors for batching. | |
| arithm::Group * | gq |
a group of prime order with characteristic . | |
| 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, . | |
Provides an interface every verification we want to perform must implement.
The idea is to make it easier to add new proofs should the necessity arise. It is a virtual class.
Definition at line 38 of file verification.hpp.
| Verification::Verification | ( | XmlConfig * | config, |
| std::vector< uint8_t > | prefix, | ||
| unsigned int | nZero | ||
| ) |
Creates an instance of a Verification class by setting its two attributes.
| config | The protocol info file to use. |
| prefix | The value to give to the rho attribute. |
| nZero | The value to give to the n0 attribute. |
Definition at line 17 of file verification.cpp.
| arithm::Elmt Verification::getChallenge | ( | std::vector< uint8_t > | s | ) |
Returns a challenge computed from the original seed s and a bytetree.
First, concatenates the hexadecimal representation of the node containing a leaf containing s and tau with rho. Then, uses it as query for ROv. At last, turns its output into an integer in
.
| s | The former seed, used by ROs to compute exponents. |
Definition at line 76 of file verification.cpp.
| arithm::ArrayOfElmts Verification::getGenerators | ( | ) |
|
virtual |
Checks that everything is OK. This is a virtual method.
true if the content of the protocol info file and proof directory are coherent, false otherwise. Reimplemented in proofs::ProofOfShuffleOfCiphers, proofs::ProofOfCorrectDecryption, and proofs::ProofOfShuffleOfCommitments.
Definition at line 101 of file verification.cpp.
| arithm::ArrayOfElmts Verification::randomExponents | ( | verifierUtils::ByteTree * | bts, |
| std::vector< uint8_t > & | s | ||
| ) |
Used to compute a random exponents vector according to the specification.
The exponents are derived using a PRG whose output is turned into integers of bytelength $n_e/8$. The moduli of the exponents thus created are returned (division modulo
).
| bts | The bytetree whose hexadecimal representation must be appended to rho. | |
| [in,out] | s | The seed for the prg is initialized in this function but can be used after. |
for
. Definition at line 49 of file verification.cpp.
|
protected |
a group of prime order with characteristic
.
Definition at line 99 of file verification.hpp.
|
protected |
The hashfunction to be used by the random oracles.
Definition at line 50 of file verification.hpp.
|
protected |
An array of independant generators
.
Definition at line 110 of file verification.hpp.
|
protected |
(or
), the size of the arrays.
Definition at line 71 of file verification.hpp.
|
protected |
, number of bits in each component of random vectors used for batching.
Definition at line 77 of file verification.hpp.
|
protected |
, acceptable "statistical error" when deriving independent generators.
Definition at line 83 of file verification.hpp.
|
protected |
, number of bits in challenges.
Definition at line 88 of file verification.hpp.
|
protected |
Pseudo-random generator
used to derive random vectors for batching.
Definition at line 94 of file verification.hpp.
|
protected |
A class containing the information in the protocol info file.
Definition at line 45 of file verification.hpp.
|
protected |
|
protected |
The random oracle to use to seed the PRG.
Definition at line 55 of file verification.hpp.
|
protected |
The random oracle to use to generate challenges.
Definition at line 60 of file verification.hpp.
|
protected |
The reply of the Fiat-Shamir proof,
.
Definition at line 120 of file verification.hpp.
|
protected |
The commitment of the Fiat-Shamir proof,
.
Definition at line 115 of file verification.hpp.
|
protected |
The field in which the exponent live,
.
Definition at line 104 of file verification.hpp.