Skip to main content

cmp_gt

Function cmp_gt 

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

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

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