LAWS.cmac_streaming: law of bend-osdev-cipher-modes@0.1.0.0 Import: import bend-osdev-cipher-modes@0.1.0.0/LAWS.bend as LAWS Lines 56-66 of bend-osdev-cipher-modes@0.1.0.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-cipher-modes@0.1.0.0/LAWS.bend&start_line=56&end_line=66 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M import bend-osdev-cipher-modes@0.1.0.0/cmac.bend as CM # CMAC in pieces: the state after a ++ b is the state after a, then b, for # every cipher, key and state (so start, update .. update, finish is the MAC # of the pieces joined) law cmac_streaming: for ~K: Data for ~enc: K -> M.CmBlock -> M.CmBlock for +k: K for s: CM.CmacState for +a: B.Octets for +b: B.Octets {CM.Cmac.update(~K, ~enc, k, s, B.Octets.append(a, b)) == CM.Cmac.update(~K, ~enc, k, CM.Cmac.update(~K, ~enc, k, s, a), b) : CM.CmacState} Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/LAWS.bend&name=octets_append_list https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.append https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.to_list https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=append https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/PROOF.bend&name=cmacp.feed 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-cipher-modes@0.1.0.0/cmac.bend&name=Cmac.update https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cmac.bend&name=CmacState https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cmac.bend&name=cmac.feed