def des.e
import bend-osdev-legacy-ciphers@0.1.0.0/des.bend as Desimport Base
import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L
231# group i of E(R): bits 4i .. 4i + 5 of R (bit 0 is bit 32), the top six bits
232# of R rotated left by n = 4i - 1 (mod 32)
233def des.e(+r: U32, +n: Nat) -> U32:
234 U32.and(63, U32.shrn(L.lc.rotl(r, n), 26n))