Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/frontend/src/circuits/ripemd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ fn f(b: &CircuitBuilder, x: Wire, y: Wire, z: Wire) -> Wire {

// Selection function g(x, y, z) = (x AND y) OR (NOT x AND z) = z XOR (x AND (y XOR z))
fn g(b: &CircuitBuilder, x: Wire, y: Wire, z: Wire) -> Wire {
b.bor(b.band(x, y), b.band(b.bnot(x), z))
b.bxor(z, b.band(x, b.bxor(y, z)))
}

// Selection function h(x, y, z) = (x OR NOT y) XOR z
Expand All @@ -179,7 +179,7 @@ fn h(b: &CircuitBuilder, x: Wire, y: Wire, z: Wire) -> Wire {

// Selection function i(x, y, z) = (x AND z) OR (y AND NOT z) = y XOR (z AND (x XOR y))
fn i(b: &CircuitBuilder, x: Wire, y: Wire, z: Wire) -> Wire {
b.bor(b.band(x, z), b.band(y, b.bnot(z)))
b.bxor(y, b.band(z, b.bxor(x, y)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use the new operator named FAX (fused-and-xor).

}

// Selection function j(x, y, z) = x XOR (y OR NOT z)
Expand Down
Loading