def lrw_rt.aria

bend-osdev-crypto@0.1.0.0 · PROOF.bend:1237

import bend-osdev-crypto@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/aria.bend as Ar
import bend-osdev-crypto@0.1.0.0/lrw.bend as Lw
import bend-osdev-gf@0.1.0.0/gf128.bend as G
import bend-osdev-crypto@0.1.0.0/inst_cm.bend as CM

1237def lrw_rt.aria(+k: Ar.LcAriaKey, +k2: G.Gf128, bs: List<&2, M.CmBlock>, +i: G.Gf128) -> {bs == Lw.cr.lrw.dec(~Ar.LcAriaKey, ~M.CmBlock, ~Ar.LcAria.decrypt, ~CM.CrBlk128.xor, ~CM.CrBlk128.of_octets, k, k2, Lw.cr.lrw.enc(~Ar.LcAriaKey, ~M.CmBlock, ~Ar.LcAria.encrypt, ~CM.CrBlk128.xor, ~CM.CrBlk128.of_octets, k, k2, bs, i), i) : List<&2, M.CmBlock>}:
1238  match bs:
1239    case Nil{}:
1240      {==}
1241    case Con{+p, t}:
1242      %lrw_b.aria(k, Lw.cr.lrw.tweak(~M.CmBlock, ~CM.CrBlk128.of_octets, k2, i), p) : {Con{p, t} == Con{_, Lw.cr.lrw.dec(~Ar.LcAriaKey, ~M.CmBlock, ~Ar.LcAria.decrypt, ~CM.CrBlk128.xor, ~CM.CrBlk128.of_octets, k, k2, Lw.cr.lrw.enc(~Ar.LcAriaKey, ~M.CmBlock, ~Ar.LcAria.encrypt, ~CM.CrBlk128.xor, ~CM.CrBlk128.of_octets, k, k2, t, Lw.cr.lrw.inc(i)), Lw.cr.lrw.inc(i))} : List<&2, M.CmBlock>}
1243      %lrw_rt.aria(k, k2, t, Lw.cr.lrw.inc(i)) : {Con{p, t} == Con{p, _} : List<&2, M.CmBlock>}
1244      {==}

Uses (13)

Used by (1)