PROOF.cbcp.ins: def of bend-osdev-cbc@0.1.0.0 Import: import bend-osdev-cbc@0.1.0.0/PROOF.bend as PROOF Lines 291-298 of bend-osdev-cbc@0.1.0.0/PROOF.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-cbc@0.1.0.0/PROOF.bend&start_line=291&end_line=298 import Base import bend-osdev-mode-core@0.1.0.0/mode_core.bend as M # the blocks CBC encryption gives the cipher: each plaintext block XOR the # block before it (the IV first) def cbcp.ins(~K: Data, ~enc: K -> M.CmBlock -> M.CmBlock, +k: K, bs: List<&2, M.CmBlock>, +iv: M.CmBlock) -> List<&2, M.CmBlock>: match bs: case Nil{}: Nil{} case Con{+p, t}: Con{M.CmBlock.xor(iv, p), cbcp.ins(~K, ~enc, k, t, enc(k, M.CmBlock.xor(iv, p)))} Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=bend-osdev-mode-core@0.1.0.0/mode_core.bend&name=CmBlock https://jend.leeeet.dev/definition.txt?path=bend-osdev-mode-core@0.1.0.0/mode_core.bend&name=CmBlock.xor