mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 22:33:06 +00:00
more %stack
This commit is contained in:
parent
d8f2e04c2b
commit
5ca5a3b3c8
@ -171,9 +171,7 @@
|
||||
|
||||
%macro sha2_majority
|
||||
// stack: x, y, z
|
||||
DUP3
|
||||
DUP3
|
||||
DUP3
|
||||
%stack ((a: 3)) -> (a, a)
|
||||
// stack: x, y, z, x, y, z
|
||||
AND
|
||||
// stack: x and y, z, x, y, z
|
||||
@ -181,12 +179,8 @@
|
||||
// stack: x, z, x and y, y, z
|
||||
AND
|
||||
// stack: x and z, x and y, y, z
|
||||
SWAP2
|
||||
// stack: y, x and y, x and z, z
|
||||
SWAP1
|
||||
// stack: x and y, y, x and z, z
|
||||
SWAP3
|
||||
// stack: z, y, x and z, x and y
|
||||
%stack ((a: 2), (b: 2)) -> (b, a)
|
||||
// stack: y, z, x and z, x and y
|
||||
AND
|
||||
// stack: y and z, x and z, x and y
|
||||
OR
|
||||
|
||||
@ -4,11 +4,7 @@
|
||||
// stack: e, e, f, g, h, K[i], W[i]
|
||||
%sha2_bigsigma_1
|
||||
// stack: Sigma_1(e), e, f, g, h, K[i], W[i]
|
||||
SWAP3
|
||||
// stack: g, e, f, Sigma_1(e), h, K[i], W[i]
|
||||
SWAP2
|
||||
// stack: f, e, g, Sigma_1(e), h, K[i], W[i]
|
||||
SWAP1
|
||||
%stack (sig, (efg: 3)) -> (efg, sig)
|
||||
// stack: e, f, g, Sigma_1(e), h, K[i], W[i]
|
||||
%sha2_choice
|
||||
// stack: Ch(e, f, g), Sigma_1(e), h, K[i], W[i]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user