Skip to main content

add

Function add 

Source
pub fn add(spec: CiphertextSpec) -> Builder
Expand description

Creates an IR for the addition of two encrypted integers.

The returned Builder declares two ciphertext inputs and one ciphertext output representing the wrapping sum of the operands. Internally the addition uses Builder::iop_add_hillis_steele for carry propagation.

The spec parameter describes the integer encoding (bit-width, message bits, carry bits) and determines the number of blocks in the decomposition.

ยงExamples

let builder = add(spec);
let ir = builder.into_ir();