pub struct CiphertextBlock { /* private fields */ }Expand description
An opaque handle to a single encrypted block (radix digit) in the IR graph.
A ciphertext block represents one digit in the radix-decomposition of
an encrypted integer. Its bit layout contains message_size message bits (the digit
value), carry_size carry bits (to absorb arithmetic overflow), and one padding bit.
See the module-level documentation for the full layout diagram.
Blocks are produced by
Builder::ciphertext_split or by block-level
arithmetic methods, and can be recombined into a full Ciphertext via
Builder::ciphertext_join.
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 CiphertextBlock
impl CiphertextBlock
Sourcepub fn spec(&self) -> CiphertextBlockSpec
pub fn spec(&self) -> CiphertextBlockSpec
Returns the block specification describing the message/carry bit layout.
Sourcepub fn make_value(&self, val: EmulatedCiphertextBlockStorage) -> IopValue
pub fn make_value(&self, val: EmulatedCiphertextBlockStorage) -> IopValue
Creates a compatible value to be used in evaluation.
The val argument is the complete block representation including both carry and
message bits. It is interpreted according to this block’s CiphertextBlockSpec.
§Panics
Panics if val overflows the complete bit width (padding + carry + message).
Trait Implementations§
Source§impl AsRef<CiphertextBlock> for CiphertextBlock
impl AsRef<CiphertextBlock> for CiphertextBlock
Source§fn as_ref(&self) -> &CiphertextBlock
fn as_ref(&self) -> &CiphertextBlock
Source§impl Clone for CiphertextBlock
impl Clone for CiphertextBlock
Source§fn clone(&self) -> CiphertextBlock
fn clone(&self) -> CiphertextBlock
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more