-
Notifications
You must be signed in to change notification settings - Fork 0
/
Encoding.hpp
40 lines (30 loc) · 851 Bytes
/
Encoding.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Encoding.hpp
// FHE
//
// Created by Woods, Jess on 10/15/19.
// work done at Oak Ridge National Lab
//
#ifndef Encoding_hpp
#define Encoding_hpp
#include <stdio.h>
#include <vector>
#include "Pk.hpp"
class Encoding{
public:
Encoding(Pk pk, std::vector<int> m); //for public creation
Encoding(Pk pk, mpz_class c); // class handling - don't use
~Encoding();
std::vector<int> decode();
std::vector<int> decode_squashed();
void recode(int shift);
Encoding operator+(Encoding x);
Encoding operator*(Encoding x);
static Encoding matmul(std::vector<std::vector<int>> a, std::vector<std::vector<int>> b, Pk pk);
static Encoding selector(std::vector<int> s, Encoding a, Encoding b);
Encoding neg();
mpz_class e_val;
private:
Pk e_pk;
};
#endif /* Encoding_hpp */