Serpent.sp.rounds: def of bend-osdev-legacy-ciphers@0.1.0.0 Import: import bend-osdev-legacy-ciphers@0.1.0.0/serpent.bend as Serpent Lines 339-348 of bend-osdev-legacy-ciphers@0.1.0.0/serpent.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/serpent.bend&start_line=339&end_line=348 import Base import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M # the steps of the 32 rounds from round i: K_i, S_(i mod 8), then LT (rounds # 0 to 30) or K_32 (round 31) def sp.rounds(ks: List<&2, M.CmBlock>, +i: Nat) -> List<&2, LcSpOp>: match ks: case Con{k, Con{k32, Nil{}}}: [LcSpKey{k}, LcSpS{sp.box(i)}, LcSpKey{k32}] case Con{k, t}: Con{LcSpKey{k}, Con{LcSpS{sp.box(i)}, Con{LcSpLt{}, sp.rounds(t, Nat.add(i, 1n))}}} case Nil{}: Nil{} Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend&name=CmBlock https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/serpent.bend&name=LcSpOp https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/serpent.bend&name=sp.box