mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-05-13 03:00:24 -04:00
37 lines
785 B
C++
37 lines
785 B
C++
/*
|
|
* Diagonalizer.h
|
|
*
|
|
*/
|
|
|
|
#ifndef FHE_DIAGONALIZER_H_
|
|
#define FHE_DIAGONALIZER_H_
|
|
|
|
#include "Math/gfpvar.h"
|
|
#include "Ciphertext.h"
|
|
#include "Protocols/ShareMatrix.h"
|
|
|
|
class Diagonalizer
|
|
{
|
|
const FFT_Data& FTD;
|
|
|
|
size_t n_rows, n_cols;
|
|
|
|
public:
|
|
typedef AddableVector<ValueMatrix<gfpvar>> MatrixVector;
|
|
|
|
vector<Ciphertext> ciphertexts;
|
|
|
|
Diagonalizer(const MatrixVector& matrices,
|
|
const FFT_Data& FTD, const FHE_PK& pk);
|
|
|
|
Plaintext_<FFT_Data> get_plaintext(const MatrixVector& matrices,
|
|
int left_col, int right_col);
|
|
|
|
MatrixVector decrypt(const vector<Ciphertext>&, int n_matrices, FHE_SK& sk);
|
|
|
|
MatrixVector dediag(const vector<Plaintext_<FFT_Data>>& plaintexts,
|
|
int n_matrices);
|
|
};
|
|
|
|
#endif /* FHE_DIAGONALIZER_H_ */
|