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
use crateCloudKey;
use crateCiphertext;
/// Trait for bootstrapping strategies
///
/// Bootstrapping is the core operation in TFHE that refreshes a noisy ciphertext
/// by homomorphically evaluating the decryption function. Different strategies
/// can optimize for different tradeoffs (speed, accuracy, memory, hardware).
///
/// # Core Operation
/// Bootstrap takes a noisy LWE ciphertext at level 0 and returns a refreshed
/// ciphertext with reduced noise, enabling unbounded homomorphic operations.
///
/// # Typical Flow
/// 1. Blind rotation: Homomorphically evaluate a test polynomial
/// 2. Sample extraction: Convert RLWE to LWE
/// 3. Key switching: Convert back to original key
/// Get the default bootstrap strategy