HEaaN
Crypto Lab's great homomorphic encryption library
include
HEaaN
Encryptor.hpp
Go to the documentation of this file.
1
// //
3
// Copyright (C) 2021-2023 Crypto Lab Inc. //
4
// //
5
// - This file is part of HEaaN homomorphic encryption library. //
6
// - HEaaN cannot be copied and/or distributed without the express permission //
7
// of Crypto Lab Inc. //
8
// //
10
11
#pragma once
12
13
#include "
HEaaN/Context.hpp
"
14
#include "
HEaaN/HEaaNExport.hpp
"
15
16
namespace
HEaaN
{
17
18
class
SecretKey;
19
class
KeyPack;
20
class
Message;
21
class
Plaintext;
22
class
Ciphertext;
23
27
class
HEAAN_API
Encryptor
{
28
public
:
29
explicit
Encryptor
(
const
Context
&context);
30
37
void
encrypt(
const
Message
&msg,
const
SecretKey
&sk,
38
Ciphertext
&ctxt)
const
;
39
48
void
encrypt(
const
Message
&msg,
const
SecretKey
&sk,
Ciphertext
&ctxt,
49
u64
level,
int
r_counter = 0)
const
;
50
57
void
encrypt(
const
Message
&msg,
const
KeyPack
&keypack,
58
Ciphertext
&ctxt)
const
;
59
68
void
encrypt(
const
Message
&msg,
const
KeyPack
&keypack,
Ciphertext
&ctxt,
69
u64
level,
int
r_counter = 0)
const
;
70
74
void
encrypt(
const
Plaintext
&ptxt,
const
SecretKey
&sk,
75
Ciphertext
&ctxt)
const
;
76
81
void
encrypt(
const
Plaintext
&ptxt,
const
KeyPack
&keypack,
82
Ciphertext
&ctxt)
const
;
83
84
private
:
86
const
Context
context_
;
87
};
88
}
// namespace HEaaN
HEaaN::KeyPack
Class managing public keys.
Definition:
KeyPack.hpp:29
HEaaN::SecretKey
Secret key class.
Definition:
SecretKey.hpp:26
HEaaN::Message
Definition:
Message.hpp:30
HEaaN::u64
std::uint64_t u64
Definition:
Integers.hpp:17
HEaaN::Plaintext
A class of plaintexts each of which is simply a polynomial.
Definition:
Plaintext.hpp:26
HEaaN::Ciphertext
A class of ciphertexts each of which contains a vector of polynomials of length > 1.
Definition:
Ciphertext.hpp:27
HEaaN::Encryptor
Abstract entity for encrypting messages into ciphertexts.
Definition:
Encryptor.hpp:27
HEaaN::Context
std::shared_ptr< ContextContent > Context
Definition:
Context.hpp:27
Context.hpp
HEaaNExport.hpp
HEaaN::Encryptor::context_
const Context context_
A context with which Encryptor is associated.
Definition:
Encryptor.hpp:86
HEAAN_API
#define HEAAN_API
Definition:
HEaaNExport.hpp:26
HEaaN
Definition:
Bootstrapper.hpp:16
Generated by
1.8.17