Check.toy.rot: def of bend-osdev-cbc@0.1.0.0 Import: import bend-osdev-cbc@0.1.0.0/check.bend as Check Lines 65-73 of bend-osdev-cbc@0.1.0.0/check.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-cbc@0.1.0.0/check.bend&start_line=65&end_line=73 import Base import bend-osdev-mode-core@0.1.0.0/mode_core.bend as M # A toy permutation of blocks, NOT a cipher: the words rotated, then XOR # with the key block. Enough to run the mode's code paths (encryption and # decryption differ, so mixing them up shows); the mode is tested against # its specification over AES in bend-osdev-aes-modes (the specifications' # vectors) and in ref/ (against Python's cryptography). def toy.rot(b: M.CmBlock) -> M.CmBlock: match b: case M.CmBlock{w0, w1, w2, w3}: M.CmBlock{w1, w2, w3, w0} Uses (1): https://jend.leeeet.dev/definition.txt?path=bend-osdev-mode-core@0.1.0.0/mode_core.bend&name=CmBlock