Skip to main content

add32

Function add32 

Source
pub fn add32(a: [Field; 32], b: [Field; 32]) -> [Field; 32]
Expand description

Modular addition mod 2^32.

Adds the two words as field elements (a sum < 2^33), decomposes the sum into 33 bits (32 result bits + 1 carry), and returns the low 32 bits. Cost: 33 booleanity gates + 1 recomposition equality.