Skip to main content

cmp_gte

Function cmp_gte 

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

Creates an IR for a greater-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 greater than or equal to the second, 0 otherwise). Internally delegates to Builder::iop_cmp with CmpKind::GreaterOrEqual.

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