Permutation.round: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/keccak/permutation.bend as Permutation Lines 36-74 of bend-collections@1.0.0.0/src/crypto/keccak/permutation.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/permutation.bend&start_line=36&end_line=74 import Base import bend-collections@1.0.0.0/src/crypto/keccak/types.bend as T import bend-collections@1.0.0.0/src/crypto/keccak/lane.bend as L def round(s: T.State, rc: T.Lane) -> T.State: match s: case T.S{+a0,+a1,+a2,+a3,+a4,+a5,+a6,+a7,+a8,+a9,+a10,+a11,+a12,+a13,+a14,+a15,+a16,+a17,+a18,+a19,+a20,+a21,+a22,+a23,+a24}: +c0 = L.xor(a0,L.xor(a5,L.xor(a10,L.xor(a15,a20)))) +c1 = L.xor(a1,L.xor(a6,L.xor(a11,L.xor(a16,a21)))) +c2 = L.xor(a2,L.xor(a7,L.xor(a12,L.xor(a17,a22)))) +c3 = L.xor(a3,L.xor(a8,L.xor(a13,L.xor(a18,a23)))) +c4 = L.xor(a4,L.xor(a9,L.xor(a14,L.xor(a19,a24)))) +d0 = L.xor(c4,L.rol1(c1)) +d1 = L.xor(c0,L.rol1(c2)) +d2 = L.xor(c1,L.rol1(c3)) +d3 = L.xor(c2,L.rol1(c4)) +d4 = L.xor(c3,L.rol1(c0)) +b0 = L.rol0(L.xor(a0,d0)) +b10 = L.rol1(L.xor(a1,d1)) +b20 = L.rol62(L.xor(a2,d2)) +b5 = L.rol28(L.xor(a3,d3)) +b15 = L.rol27(L.xor(a4,d4)) +b16 = L.rol36(L.xor(a5,d0)) +b1 = L.rol44(L.xor(a6,d1)) +b11 = L.rol6(L.xor(a7,d2)) +b21 = L.rol55(L.xor(a8,d3)) +b6 = L.rol20(L.xor(a9,d4)) +b7 = L.rol3(L.xor(a10,d0)) +b17 = L.rol10(L.xor(a11,d1)) +b2 = L.rol43(L.xor(a12,d2)) +b12 = L.rol25(L.xor(a13,d3)) +b22 = L.rol39(L.xor(a14,d4)) +b23 = L.rol41(L.xor(a15,d0)) +b8 = L.rol45(L.xor(a16,d1)) +b18 = L.rol15(L.xor(a17,d2)) +b3 = L.rol21(L.xor(a18,d3)) +b13 = L.rol8(L.xor(a19,d4)) +b14 = L.rol18(L.xor(a20,d0)) +b24 = L.rol2(L.xor(a21,d1)) +b9 = L.rol61(L.xor(a22,d2)) +b19 = L.rol56(L.xor(a23,d3)) +b4 = L.rol14(L.xor(a24,d4)) T.S{L.xor(L.chi(b0,b1,b2),rc),L.chi(b1,b2,b3),L.chi(b2,b3,b4),L.chi(b3,b4,b0),L.chi(b4,b0,b1),L.chi(b5,b6,b7),L.chi(b6,b7,b8),L.chi(b7,b8,b9),L.chi(b8,b9,b5),L.chi(b9,b5,b6),L.chi(b10,b11,b12),L.chi(b11,b12,b13),L.chi(b12,b13,b14),L.chi(b13,b14,b10),L.chi(b14,b10,b11),L.chi(b15,b16,b17),L.chi(b16,b17,b18),L.chi(b17,b18,b19),L.chi(b18,b19,b15),L.chi(b19,b15,b16),L.chi(b20,b21,b22),L.chi(b21,b22,b23),L.chi(b22,b23,b24),L.chi(b23,b24,b20),L.chi(b24,b20,b21)} Uses (29): https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=chi https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol0 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol1 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol10 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol14 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol15 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol18 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol2 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol20 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol21 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol25 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol27 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol28 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol3 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol36 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol39 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol41 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol43 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol44 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol45 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol55 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol56 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol6 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol61 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol62 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=rol8 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/lane.bend&name=xor https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/types.bend&name=Lane https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/keccak/types.bend&name=State