HElib  1.0
Implementing Homomorphic Encryption
 All Classes Files Functions Variables Friends Pages
Classes | Functions
FHE.h File Reference

Public/secret keys for the BGV cryptosystem. More...

#include <vector>
#include "NTL/ZZX.h"
#include "DoubleCRT.h"
#include "FHEContext.h"
#include "Ctxt.h"

Go to the source code of this file.

Classes

class  KeySwitch
 Key-switching matrices. More...
 
class  FHEPubKey
 The public key. More...
 
class  FHESecKey
 The secret key. More...
 

Functions

ostream & operator<< (ostream &str, const KeySwitch &matrix)
 
Strategies for generating key-switching matrices

These functions are implemented in KeySwitching.cpp

void addAllMatrices (FHESecKey &sKey, long keyID=0)
 Maximalistic approach: generate matrices s(X^e)->s(X) for all e in Zm*.
 
void addFewMatrices (FHESecKey &sKey, long keyID=0)
 Generate matrices so every s(X^e) can be reLinearized in at most two steps.
 
void add1DMatrices (FHESecKey &sKey, long keyID=0)
 Generate all matrices s(X^{g^i})->s(X) for generators g of Zm* /(p) and i<ord(g). If g has different orders in Zm* and Zm* /(p) then generate also matrices of the form s(X^{g^{-i}})->s(X)
 
void addSome1DMatrices (FHESecKey &sKey, long bound=100, long keyID=0)
 Generate some matrices of the form s(X^{g^i})->s(X), but not all. For a generator g whose order is larger than bound, generate only enough matrices for the giant-step/baby-step procedures (2*sqrt(ord(g))of them).
 
void addFrbMatrices (FHESecKey &sKey, long keyID=0)
 Generate all Frobenius matrices of the form s(X^{2^i})->s(X)
 

Detailed Description

Public/secret keys for the BGV cryptosystem.