-
Notifications
You must be signed in to change notification settings - Fork 714
/
Copy pathrlwe.h
52 lines (45 loc) · 1.53 KB
/
rlwe.h
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
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#pragma once
#include <cstdint>
#include "seal/randomgen.h"
#include "seal/encryptionparams.h"
#include "seal/publickey.h"
#include "seal/secretkey.h"
#include "seal/publickey.h"
#include "seal/ciphertext.h"
#include "seal/context.h"
namespace seal
{
namespace util
{
void sample_poly_ternary(
std::uint64_t *poly,
std::shared_ptr<UniformRandomGenerator> random,
const EncryptionParameters &parms);
void sample_poly_normal(
std::uint64_t *poly,
std::shared_ptr<UniformRandomGenerator> random,
const EncryptionParameters &parms);
void sample_poly_uniform(
std::uint64_t *poly,
std::shared_ptr<UniformRandomGenerator> random,
const EncryptionParameters &parms);
void encrypt_zero_asymmetric(
const PublicKey &public_key,
std::shared_ptr<SEALContext> context,
parms_id_type parms_id,
std::shared_ptr<UniformRandomGenerator> random,
bool is_ntt_form,
Ciphertext &destination,
MemoryPoolHandle pool);
void encrypt_zero_symmetric(
const SecretKey &secret_key,
std::shared_ptr<SEALContext> context,
parms_id_type parms_id,
std::shared_ptr<UniformRandomGenerator> random,
bool is_ntt_form,
Ciphertext &destination,
MemoryPoolHandle pool);
}
}