pub struct Ciphertext { /* private fields */ }Expand description
An opaque handle to a multi-block encrypted integer in the IR graph.
A Ciphertext represents an integer stored as a radix-2^message_size decomposition
across multiple CiphertextBlocks (one block per digit). Its CiphertextSpec
records the total integer bit-width (int_size) and the per-block layout; the number
of blocks is int_size / message_size.
Use Builder::ciphertext_split to decompose it
into individual radix digits for block-level operations, and
Builder::ciphertext_join to reassemble.
This type cannot be constructed directly — it is always returned by
Builder methods. Use make_value to create a test
IopValue for Builder::eval.
Implementations§
Source§impl Ciphertext
impl Ciphertext
Sourcepub fn spec(&self) -> CiphertextSpec
pub fn spec(&self) -> CiphertextSpec
Returns the specification describing the integer bit-width and per-block layout.
Sourcepub fn make_value(&self, val: EmulatedCiphertextStorage) -> IopValue
pub fn make_value(&self, val: EmulatedCiphertextStorage) -> IopValue
Creates a compatible value to be used in evaluation.
The val argument is the integer to be encoded. It is decomposed into
blocks according to this ciphertext’s CiphertextSpec.
Trait Implementations§
Source§impl AsRef<Ciphertext> for Ciphertext
impl AsRef<Ciphertext> for Ciphertext
Source§fn as_ref(&self) -> &Ciphertext
fn as_ref(&self) -> &Ciphertext
Source§impl Clone for Ciphertext
impl Clone for Ciphertext
Source§fn clone(&self) -> Ciphertext
fn clone(&self) -> Ciphertext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more