|
ComputeFHE 1.0
General-Purpose Privacy-Preserving Computation Library for TFHE
|
Proxy object for accessing and modifying elements in an Evector using encrypted indices. More...
#include <Evector.h>

Public Member Functions | |
| Eitem (Evector< T > &vec, const Einteger &idx) | |
| Constructs a proxy item using an encrypted index. | |
| Eitem (Evector< T > &vec, const size_t idx) | |
| Constructs a proxy item using a plaintext index. | |
| operator T () const | |
| Implicit conversion to the underlying encrypted type T. | |
| template<typename V , typename = std::enable_if_t<std::is_constructible_v<V, T> && !std::is_same_v<V, T>>> | |
| operator V () const | |
| Implicit conversion to any type constructible from T (e.g., derived types like Euint64). | |
| const T & | operator= (const T &value) |
| Assignment operator: conditionally updates vector elements based on the index. | |
| const T & | operator= (U value) |
| Assignment operator from a plaintext value: converts to T using vector element metadata and then updates elements. | |
Arithmetic Operators | |
| T | operator+ (const T &b) const |
| T | operator+ (U b) const |
| T | operator- (const T &b) const |
| T | operator- (U b) const |
| T | operator* (const T &b) const |
| T | operator* (U b) const |
| T | operator/ (const T &b) const |
| T | operator/ (U b) const |
| T | operator% (const T &b) const |
| T | operator% (U b) const |
Bitwise Logic Operators | |
| T | operator& (const T &b) const |
| T | operator& (U b) const |
| T | operator| (const T &b) const |
| T | operator| (U b) const |
| T | operator^ (const T &b) const |
| T | operator^ (U b) const |
Comparison Operators | |
| Einteger | operator== (const T &b) const |
| Einteger | operator== (U b) const |
| Einteger | operator!= (const T &b) const |
| Einteger | operator!= (U b) const |
| Einteger | operator> (const T &b) const |
| Einteger | operator> (U b) const |
| Einteger | operator>= (const T &b) const |
| Einteger | operator>= (U b) const |
| Einteger | operator< (const T &b) const |
| Einteger | operator< (U b) const |
| Einteger | operator<= (const T &b) const |
| Einteger | operator<= (U b) const |
Logical Operators | |
| T | operator&& (const T &b) const |
| T | operator&& (U b) const |
| T | operator|| (const T &b) const |
| T | operator|| (U b) const |
Shift Operators | |
| T | operator<< (int b) const |
| T | operator>> (int b) const |
Compound Assignment Operators | |
| Eitem< T, U > & | operator+= (const T &b) |
| Eitem< T, U > & | operator+= (U b) |
| Eitem< T, U > & | operator-= (const T &b) |
| Eitem< T, U > & | operator-= (U b) |
| Eitem< T, U > & | operator*= (const T &b) |
| Eitem< T, U > & | operator*= (U b) |
| Eitem< T, U > & | operator/= (const T &b) |
| Eitem< T, U > & | operator/= (U b) |
| Eitem< T, U > & | operator%= (const T &b) |
| Eitem< T, U > & | operator%= (U b) |
| Eitem< T, U > & | operator&= (const T &b) |
| Eitem< T, U > & | operator&= (U b) |
| Eitem< T, U > & | operator|= (const T &b) |
| Eitem< T, U > & | operator|= (U b) |
| Eitem< T, U > & | operator^= (const T &b) |
| Eitem< T, U > & | operator^= (U b) |
| Eitem< T, U > & | operator<<= (int b) |
| Eitem< T, U > & | operator>>= (int b) |
Unary and Inc/Dec Operators | |
| T | operator! () const |
| T | operator~ () const |
| T | operator- () const |
| T | operator++ () |
| T | operator++ (int) |
| T | operator-- () |
| T | operator-- (int) |
Protected Attributes | |
| Evector< T > & | data |
| Reference to the parent vector. | |
| FixedPoint | index |
| The encrypted index value. | |
| size_t | p_index |
| Plaintext index (used if encrypted_index is false). | |
| bool | encrypted_index |
| Flag indicating if the index is encrypted. | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const Eitem< T, U > &item) |
| Stream insertion operator to handle direct printing of proxy items. | |
Proxy object for accessing and modifying elements in an Evector using encrypted indices.
Eitem acts as a bridge between the vector and encrypted logic. When an operation is performed on an Eitem initialized with an encrypted index, the library performs the operation across all elements of the underlying vector using multiplexers (MUX) to ensure the secret index is not leaked.
| T | The encrypted type stored in the vector (i.e., Einteger). |
| U | The corresponding plaintext type for constant operations. |