Skip to main content

cmp_lte

Function cmp_lte 

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

Creates an IR for a less-or-equal comparison of two encrypted integers.

The returned Builder declares two ciphertext inputs and one single-block ciphertext output encoding the boolean result (1 when the first operand is less than or equal to the second, 0 otherwise). Internally delegates to Builder::iop_cmp with CmpKind::LowerOrEqual.

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 = cmp_lte(spec);
let ir = builder.into_ir();