LAWS.cmac_rfc4493_k1: 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 160-162 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=160&end_line=162 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/aes.bend as X import bend-osdev-cipher-modes@0.1.0.0/cmac.bend as CM # RFC 4493 section 4: the AES-CMAC subkey K1 law cmac_rfc4493_k1: {Result.map(&2, &2, M.CmError, X.CmAesKey, B.Octets, k => M.CmBlock.to_octets(CM.Cmac.subkey1(~X.CmAesKey, ~X.CmAes.encrypt, k)), X.CmAes.key128(B.Octets.of_list([43, 126, 21, 22, 40, 174, 210, 166, 171, 247, 21, 136, 9, 207, 79, 60]))) == Done{B.Octets.of_list([251, 238, 214, 24, 53, 113, 51, 102, 124, 133, 224, 143, 114, 54, 168, 222])} : Result<&2, &2, M.CmError, B.Octets>} Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.map 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.of_list https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/aes.bend&name=CmAes.encrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/aes.bend&name=CmAes.key128 https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/aes.bend&name=CmAesKey https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend&name=CmBlock.to_octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend&name=CmError https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cmac.bend&name=Cmac.subkey1