Skip to main content

negate_b

Function negate_b 

Source
fn negate_b(b: (&mut Choice, &mut UintRef), b_needs_negation: Choice)
Expand description

Conditionally negate the b coefficient for a binary quadratic form of odd discriminant.

Negation is defined as flipping the sign bit, before taking the negative of the UintRef (considered a ring of 2^k, for some k). The latter process is via taking the logical NOT before applying a carrying addition of 1.