def sm4_unstep_step

bend-osdev-legacy-ciphers@0.1.0.0 · PROOF.bend:239

import bend-osdev-legacy-ciphers@0.1.0.0/PROOF.bend as PROOF
import Base
import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M
import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L
import bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend as S

239def sm4_unstep_step(+tab: L.LcTab, +rk: U32, s: M.CmBlock) -> {s == S.sm4.unstep(tab, rk, S.sm4.step(tab, rk, s)) : M.CmBlock}:
240  match s:
241    case M.CmBlock{x0, +x1, +x2, +x3}:
242      %u32_xx(x0, S.sm4.t(tab, U32.xor(U32.xor(U32.xor(x1, x2), x3), rk))) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{_, x1, x2, x3} : M.CmBlock}
243      {==}

Uses (8)

Used by (1)