PROOF.lrw_b.camellia: def of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/PROOF.bend as PROOF Lines 1000-1007 of bend-osdev-crypto@0.1.0.0/PROOF.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/PROOF.bend&start_line=1000&end_line=1007 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/camellia.bend as Ca import bend-osdev-legacy-ciphers@0.1.0.0/LAWS.bend as LL import bend-osdev-crypto@0.1.0.0/lrw.bend as Lw import bend-osdev-crypto@0.1.0.0/inst_cm.bend as CM def lrw_b.camellia(+k: Ca.LcCamelliaKey, t: Maybe<&2, M.CmBlock>, +p: M.CmBlock) -> {p == Lw.cr.lrw.bdec(~Ca.LcCamelliaKey, ~M.CmBlock, ~Ca.LcCamellia.decrypt, ~CM.CrBlk128.xor, k, t, Lw.cr.lrw.benc(~Ca.LcCamelliaKey, ~M.CmBlock, ~Ca.LcCamellia.encrypt, ~CM.CrBlk128.xor, k, t, p)) : M.CmBlock}: match t: case None{}: Equal.sym(M.CmBlock, Ca.LcCamellia.decrypt(k, Ca.LcCamellia.encrypt(k, p)), p, LL.camellia_round_trip(k, p)) case Some{+x}: %cmblock_xx(Ca.LcCamellia.encrypt(k, CM.CrBlk128.xor(p, x)), x) : {p == CM.CrBlk128.xor(Ca.LcCamellia.decrypt(k, _), x) : M.CmBlock} %Equal.sym(M.CmBlock, Ca.LcCamellia.decrypt(k, Ca.LcCamellia.encrypt(k, CM.CrBlk128.xor(p, x))), CM.CrBlk128.xor(p, x), LL.camellia_round_trip(k, CM.CrBlk128.xor(p, x))) : {p == CM.CrBlk128.xor(_, x) : M.CmBlock} cmblock_xx(p, x) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe 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-crypto@0.1.0.0/PROOF.bend&name=cmblock_xx https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/inst_cm.bend&name=CrBlk128.xor https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/lrw.bend&name=cr.lrw.bdec https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/lrw.bend&name=cr.lrw.benc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/LAWS.bend&name=camellia_round_trip https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/camellia.bend&name=LcCamellia.decrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/camellia.bend&name=LcCamellia.encrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/camellia.bend&name=LcCamelliaKey