scheme.h
1 /* Copyright (C) 2020 IBM Corp.
2  * This program is Licensed under the Apache License, Version 2.0
3  * (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://www.apache.org/licenses/LICENSE-2.0
6  * Unless required by applicable law or agreed to in writing, software
7  * distributed under the License is distributed on an "AS IS" BASIS,
8  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9  * See the License for the specific language governing permissions and
10  * limitations under the License. See accompanying LICENSE file.
11  */
12 
13 #ifndef HELIB_SCHEME_H
14 #define HELIB_SCHEME_H
15 
22 namespace helib {
23 
24 class PolyMod;
25 
29 struct CKKS
30 {
34  using SlotType = std::complex<double>;
35 
39  static constexpr std::string_view schemeName = "CKKS";
40 };
41 
45 struct BGV
46 {
51  using SlotType = PolyMod;
52 
56  static constexpr std::string_view schemeName = "BGV";
57 };
58 
59 } // namespace helib
60 
61 #endif // HELIB_SHEME_H
An object that contains an NTL::ZZX polynomial along with a coefficient modulus p2r and a polynomial ...
Definition: PolyMod.h:49
Definition: apiAttributes.h:21
Type for BGV scheme, to be used as template parameter.
Definition: scheme.h:46
static constexpr std::string_view schemeName
Scheme label to be added to JSON serialization.
Definition: scheme.h:56
Type for CKKS scheme, to be used as template parameter.
Definition: scheme.h:30
static constexpr std::string_view schemeName
Scheme label to be added to JSON serialization.
Definition: scheme.h:39
std::complex< double > SlotType
Slot type used for CKKS plaintexts: std::complex<double>.
Definition: scheme.h:34