LAWS.hmac_crc32_vector: law of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/LAWS.bend as LAWS Lines 341-345 of bend-osdev-crypto@0.1.0.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/LAWS.bend&start_line=341&end_line=345 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-crc@0.1.0.0/crc.bend as C import bend-osdev-crypto@0.1.0.0/hmac.bend as Hm import bend-osdev-crypto@0.1.0.0/inst_crc.bend as CR # HMAC over CRC-32 (the key "key", the message "The quick brown fox"): the # value of Python's hmac module over binascii.crc32 (ref/gen.py checks the # same construction on random keys and messages) law hmac_crc32_vector: {Hm.CrHmac.mac(~CR.CrCrc32.digest(~C.crc32.spec()), Hm.CrHmac.key(~64n, ~CR.CrCrc32.digest(~C.crc32.spec()), B.Octets.of_string("key")), B.Octets.of_string("The quick brown fox")) == B.Octets.of_list([69, 52, 205, 87]) : B.Octets} Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=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.of_list https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.of_string https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc32.spec https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/hmac.bend&name=CrHmac.key https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/hmac.bend&name=CrHmac.mac https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/inst_crc.bend&name=CrCrc32.digest