def sm4_rounds_unrounds
bend-osdev-legacy-ciphers@0.1.0.0 · PROOF.bend:259
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
259def sm4_rounds_unrounds(+tab: L.LcTab, ks: List<&2, U32>, +s: M.CmBlock) -> {s == S.sm4.rounds(tab, ks, S.sm4.unrounds(tab, ks, s)) : M.CmBlock}:
260 match ks:
261 case Nil{}:
262 {==}
263 case Con{+k, +t}:
264 %sm4_step_unstep(tab, k, S.sm4.unrounds(tab, t, s)) : {s == S.sm4.rounds(tab, t, _) : M.CmBlock}
265 sm4_rounds_unrounds(tab, t, s)