Implements an array containing several ciphers. More...
#include <arrayofciphers.hpp>
Collaboration diagram for elGamal::ArrayOfCiphers:Public Member Functions | |
| ArrayOfCiphers (verifierUtils::ByteTree *bt, CipherGroup c) | |
| Builds an array from the content of a bytetree and the group in which the ciphers are. | |
| ArrayOfCiphers (arithm::ArrayOfElmts left, arithm::ArrayOfElmts right) | |
| Builds an array by setting directly its two attributes. | |
| verifierUtils::ByteTree * | toByteTree () |
| Returns a node containing the bytetree representations of the ciphertexts stored in this instance. | |
| arithm::ArrayOfElmts | getUarray () |
| Returns the u attribute. | |
| arithm::ArrayOfElmts | getVarray () |
| Returns the v attribute. | |
| CipherText | getCipherText (unsigned int index) |
| Returns the ciphertext at index. | |
| unsigned int | size () |
| Returns the size of the array. | |
Private Attributes | |
| arithm::ArrayOfElmts | u |
| The "u" part of every ciphertext, i.e. their left hand side. | |
| arithm::ArrayOfElmts | v |
| The "v" part of every ciphertext, i.e. their right hand side. | |
Implements an array containing several ciphers.
Actually, we cheat to in order to make use of the ArrayOfElmts class: the ciphertexts are not stored as CipherText instances. Instead, we have a first ArrayOfElmts containing the values of their u attribute and another for their v. CipherTexts are then built just before the output.
Definition at line 34 of file arrayofciphers.hpp.
| ArrayOfCiphers::ArrayOfCiphers | ( | verifierUtils::ByteTree * | bt, |
| CipherGroup | c | ||
| ) |
Builds an array from the content of a bytetree and the group in which the ciphers are.
The bytetree has to be a node containing the bytetree representations of the ciphertexts, NOT a Node containing the bytetree representation of two ArrayOfElmts's.
Definition at line 20 of file arrayofciphers.cpp.
| ArrayOfCiphers::ArrayOfCiphers | ( | arithm::ArrayOfElmts | left, |
| arithm::ArrayOfElmts | right | ||
| ) |
Builds an array by setting directly its two attributes.
Definition at line 37 of file arrayofciphers.cpp.
| CipherText ArrayOfCiphers::getCipherText | ( | unsigned int | index | ) |
Returns the ciphertext at index.
In practice, builds a new ciphertext from u[index] and v[index].
Definition at line 74 of file arrayofciphers.cpp.
| arithm::ArrayOfElmts ArrayOfCiphers::getUarray | ( | ) |
| arithm::ArrayOfElmts ArrayOfCiphers::getVarray | ( | ) |
| unsigned int ArrayOfCiphers::size | ( | ) |
Returns the size of the array.
Definition at line 80 of file arrayofciphers.cpp.
| verifierUtils::ByteTree * ArrayOfCiphers::toByteTree | ( | ) |
Returns a node containing the bytetree representations of the ciphertexts stored in this instance.
Definition at line 53 of file arrayofciphers.cpp.
|
private |
The "u" part of every ciphertext, i.e. their left hand side.
Definition at line 41 of file arrayofciphers.hpp.
|
private |
The "v" part of every ciphertext, i.e. their right hand side.
Definition at line 47 of file arrayofciphers.hpp.