pluto / signius

Exploring Fast Cryptographic Primitives in Binius
3 stars 0 forks source link

feat: `maj()` function #9

Open Autoparallel opened 3 months ago

Autoparallel commented 3 months ago

Last but not least, we have the maj() function which, essentially, picks out the majority of the bits from x, y, and z. It is implemented like so:

fn maj(x: u32, y: u32, z: u32) -> u32 { (x & y) ^ (x & z) ^ (y & z) }