Camellia.cam.op: def of bend-osdev-camellia@0.1.0.0 Import: import bend-osdev-camellia@0.1.0.0/camellia.bend as Camellia Lines 130-153 of bend-osdev-camellia@0.1.0.0/camellia.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-camellia@0.1.0.0/camellia.bend&start_line=130&end_line=153 import Base import bend-osdev-mode-core@0.1.0.0/mode_core.bend as M import bend-osdev-cipher-core@0.1.0.0/cipher_core.bend as L def cam.op(o: LcCamOp, s: M.CmBlock) -> M.CmBlock: match o: case LcCamWhite{a, b}: cam.white(a, b, s) case LcCamF1{t, k}: match s: case M.CmBlock{+s0, +s1, s2, s3}: +f = cam.f(t, L.LcBlock64{s0, s1}, k) M.CmBlock{s0, s1, U32.xor(s2, cam.hi(f)), U32.xor(s3, cam.lo(f))} case LcCamF2{t, k}: match s: case M.CmBlock{s0, s1, +s2, +s3}: +f = cam.f(t, L.LcBlock64{s2, s3}, k) M.CmBlock{U32.xor(s0, cam.hi(f)), U32.xor(s1, cam.lo(f)), s2, s3} case LcCamFl{a, b}: match s: case M.CmBlock{s0, s1, s2, s3}: +d1 = cam.fl(L.LcBlock64{s0, s1}, a) +d2 = cam.flinv(L.LcBlock64{s2, s3}, b) M.CmBlock{cam.hi(d1), cam.lo(d1), cam.hi(d2), cam.lo(d2)} case LcCamSwap{}: match s: case M.CmBlock{s0, s1, s2, s3}: M.CmBlock{s2, s3, s0, s1} Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.xor https://jend.leeeet.dev/definition.txt?path=bend-osdev-camellia@0.1.0.0/camellia.bend&name=LcCamOp https://jend.leeeet.dev/definition.txt?path=bend-osdev-camellia@0.1.0.0/camellia.bend&name=cam.f https://jend.leeeet.dev/definition.txt?path=bend-osdev-camellia@0.1.0.0/camellia.bend&name=cam.fl https://jend.leeeet.dev/definition.txt?path=bend-osdev-camellia@0.1.0.0/camellia.bend&name=cam.flinv https://jend.leeeet.dev/definition.txt?path=bend-osdev-camellia@0.1.0.0/camellia.bend&name=cam.hi https://jend.leeeet.dev/definition.txt?path=bend-osdev-camellia@0.1.0.0/camellia.bend&name=cam.lo https://jend.leeeet.dev/definition.txt?path=bend-osdev-camellia@0.1.0.0/camellia.bend&name=cam.white https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-core@0.1.0.0/cipher_core.bend&name=LcBlock64 https://jend.leeeet.dev/definition.txt?path=bend-osdev-mode-core@0.1.0.0/mode_core.bend&name=CmBlock