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
53
54
55
56
//! Server-side FHE context: holds only the server key.
//!
//! [`ServerContext`] is the only thing the inference server needs. It
//! contains the [`ServerKey`] required to perform homomorphic operations, but
//! **no private key material** — so sharing it with the server does not
//! compromise input privacy.
//!
//! In a real deployment the client serializes this context and sends it to the
//! server once; the server creates an [`FheEvaluator`] which installs the key
//! on its Rayon worker threads automatically.
//!
//! [`FheEvaluator`]: super::evaluator::FheEvaluator
//!
//! [`ServerKey`]: tfhe::ServerKey
use ;
// ---------------------------------------------------------------------------
// ServerContext
// ---------------------------------------------------------------------------
/// Server-side FHE context — contains only the [`ServerKey`], no private key.
///
/// Obtain a `ServerContext` from [`ClientContext::server_context`]; do not
/// construct one directly. Pass it to [`FheEvaluator::new`] to create an
/// evaluator that can run inference on encrypted inputs.
///
/// [`ClientContext::server_context`]: super::client::ClientContext::server_context
/// [`FheEvaluator::new`]: super::evaluator::FheEvaluator::new