LAWS.michael_tkip_m63: law of bend-osdev-hashes@0.1.0.0 Import: import bend-osdev-hashes@0.1.0.0/LAWS.bend as LAWS Lines 428-430 of bend-osdev-hashes@0.1.0.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-hashes@0.1.0.0/LAWS.bend&start_line=428&end_line=430 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-hashes@0.1.0.0/hashes.bend as Hs import bend-osdev-hashes@0.1.0.0/michael.bend as MI # Michael (IEEE 802.11i): IEEE Std 802.11-2012, M.6.3 (the TKIP test vector, as hostap's BSD-licensed wlantest/test_vectors.c reproduces it): the MIC of its MSDU (DA, SA, priority 0 and three zero bytes, then the data) under TK bytes 16 to 23 law michael_tkip_m63: {Result.map(&2, &2, Hs.HsError, Hs.HsW2, B.Octets, k => MI.HsMichael.mic(k, B.Octets.of_list([2, 3, 4, 5, 6, 8, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 170, 170, 3, 0, 0, 0, 8, 0, 69, 0, 0, 84, 0, 0, 64, 0, 64, 1, 165, 85, 192, 168, 10, 2, 192, 168, 10, 1, 8, 0, 58, 176, 0, 0, 0, 0, 205, 76, 5, 0, 0, 0, 0, 0, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55])), MI.HsMichael.key(B.Octets.of_list([52, 86, 120, 144, 18, 52, 86, 120]))) == Done{B.Octets.of_list([104, 129, 163, 243, 214, 72, 208, 60])} : Result<&2, &2, Hs.HsError, B.Octets>} Uses (9): 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-hashes@0.1.0.0/hashes.bend&name=HsError https://jend.leeeet.dev/definition.txt?path=bend-osdev-hashes@0.1.0.0/hashes.bend&name=HsW2 https://jend.leeeet.dev/definition.txt?path=bend-osdev-hashes@0.1.0.0/michael.bend&name=HsMichael.key https://jend.leeeet.dev/definition.txt?path=bend-osdev-hashes@0.1.0.0/michael.bend&name=HsMichael.mic