Check.main: def of bend-osdev-legacy-ciphers@0.1.0.0 Import: import bend-osdev-legacy-ciphers@0.1.0.0/check.bend as Check Lines 270-344 of bend-osdev-legacy-ciphers@0.1.0.0/check.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&start_line=270&end_line=344 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-legacy-ciphers@0.1.0.0/des.bend as D import bend-osdev-legacy-ciphers@0.1.0.0/modes64.bend as X # BEGIN GENERATED by gen/vectors.py: check def main() -> IO(Unit): do IO: IO.print(des(B.Octets.of_list([1, 1, 1, 1, 1, 1, 1, 1]), B.Octets.of_list([128, 0, 0, 0, 0, 0, 0, 0]))) IO.print(des(B.Octets.of_list([1, 1, 1, 1, 1, 1, 1, 1]), B.Octets.of_list([64, 0, 0, 0, 0, 0, 0, 0]))) IO.print(des(B.Octets.of_list([1, 1, 1, 1, 1, 1, 1, 1]), B.Octets.of_list([32, 0, 0, 0, 0, 0, 0, 0]))) IO.print(des(B.Octets.of_list([128, 1, 1, 1, 1, 1, 1, 1]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(des(B.Octets.of_list([64, 1, 1, 1, 1, 1, 1, 1]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(tdes_ecb(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 35, 69, 103, 137, 171, 205, 239, 1, 69, 103, 137, 171, 205, 239, 1, 35]), B.Octets.of_list([84, 104, 101, 32, 113, 117, 102, 99, 107, 32, 98, 114, 111, 119, 110, 32, 102, 111, 120, 32, 106, 117, 109, 112]))) IO.print(tdes_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 35, 69, 103, 137, 171, 205, 239, 1, 69, 103, 137, 171, 205, 239, 1, 35]), B.Octets.of_list([246, 159, 36, 69, 223, 79, 155, 23]), B.Octets.of_list([84, 104, 101, 32, 113, 117, 102, 99, 107, 32, 98, 114, 111, 119, 110, 32, 102, 111, 120, 32, 106, 117, 109, 112]))) IO.print(tdes_ecb(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 35, 69, 103, 137, 171, 205, 239, 1]), B.Octets.of_list([84, 104, 101, 32, 113, 117, 102, 99, 107, 32, 98, 114, 111, 119, 110, 32, 102, 111, 120, 32, 106, 117, 109, 112]))) IO.print(sm4(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]), B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]))) IO.print(camellia(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]), B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]))) IO.print(camellia(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16, 0, 17, 34, 51, 68, 85, 102, 119]), B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]))) IO.print(camellia(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16, 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255]), B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]))) IO.print(serpent(B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(serpent(B.Octets.of_list([128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(twofish(B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(twofish(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16, 0, 17, 34, 51, 68, 85, 102, 119]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(twofish(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16, 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(B.Octets.hex(B.Octets.slice(0n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(16n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(240n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(256n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(496n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(512n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(752n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(768n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(1008n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(1024n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(1520n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(1536n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(2032n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(2048n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(3056n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(3072n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(4080n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(B.Octets.hex(B.Octets.slice(4096n, 16n, rc4_ks(B.Octets.of_list([1, 2, 3, 4, 5]), 4112n)))) IO.print(rc4_pieces(B.Octets.of_list([1, 2, 3, 4, 5]))) IO.print(rc4_drop(B.Octets.of_list([1, 2, 3, 4, 5]))) IO.print(sm4_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]), 32768n)) IO.print(camellia_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]), 32768n)) IO.print(twofish_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]), 32768n)) IO.print(serpent_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]), 4096n)) IO.print(tdes_cbc_big(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 35, 69, 103, 137, 171, 205, 239, 1, 69, 103, 137, 171, 205, 239, 1, 35]))) IO.print(aria(B.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), B.Octets.of_list([0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255]))) IO.print(aria(B.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]), B.Octets.of_list([0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255]))) IO.print(aria(B.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]), B.Octets.of_list([0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255]))) IO.print(cast6(B.Octets.of_list([35, 66, 187, 158, 250, 56, 84, 44, 10, 247, 86, 71, 242, 159, 97, 93]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(cast6(B.Octets.of_list([35, 66, 187, 158, 250, 56, 84, 44, 190, 208, 172, 131, 148, 10, 194, 152, 186, 199, 122, 119, 23, 148, 40, 99]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(cast6(B.Octets.of_list([35, 66, 187, 158, 250, 56, 84, 44, 190, 208, 172, 131, 148, 10, 194, 152, 141, 124, 71, 206, 38, 73, 8, 70, 28, 193, 181, 19, 122, 230, 182, 4]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(blowfish(B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(blowfish(B.Octets.of_list([255, 255, 255, 255, 255, 255, 255, 255]), B.Octets.of_list([255, 255, 255, 255, 255, 255, 255, 255]))) IO.print(blowfish(B.Octets.of_list([254, 220, 186, 152, 118, 84, 50, 16]), B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239]))) IO.print(blowfish(B.Octets.of_list([240]), B.Octets.of_list([254, 220, 186, 152, 118, 84, 50, 16]))) IO.print(blowfish(B.Octets.of_list([240, 225, 210]), B.Octets.of_list([254, 220, 186, 152, 118, 84, 50, 16]))) IO.print(blowfish(B.Octets.of_list([240, 225, 210, 195, 180, 165, 150, 135, 120, 105, 90, 75, 60, 45, 30, 15, 0, 17, 34, 51, 68, 85, 102, 119]), B.Octets.of_list([254, 220, 186, 152, 118, 84, 50, 16]))) IO.print(cast5(B.Octets.of_list([1, 35, 69, 103, 18, 52, 86, 120, 35, 69, 103, 137, 52, 86, 120, 154]), B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239]))) IO.print(cast5(B.Octets.of_list([1, 35, 69, 103, 18, 52, 86, 120, 35, 69]), B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239]))) IO.print(cast5(B.Octets.of_list([1, 35, 69, 103, 18]), B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239]))) IO.print(fcrypt(B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0]), B.Octets.of_list([0, 0, 0, 0, 0, 0, 0, 0]))) IO.print(fcrypt(B.Octets.of_list([17, 68, 119, 170, 221, 0, 51, 102]), B.Octets.of_list([18, 52, 86, 120, 154, 188, 222, 240]))) IO.print(tea(False{}, B.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), B.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7]))) IO.print(xtea(False{}, B.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), B.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7]))) IO.print(tea(True{}, B.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), B.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7]))) IO.print(xtea(True{}, B.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), B.Octets.of_list([0, 1, 2, 3, 4, 5, 6, 7]))) IO.print(aria_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]), 32768n)) IO.print(cast6_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]), 32768n)) IO.print(blowfish_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239]), 16384n)) IO.print(cast5_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]), 16384n)) IO.print(tea_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]), 16384n)) IO.print(xtea_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239, 254, 220, 186, 152, 118, 84, 50, 16]), 16384n)) IO.print(fcrypt_cbc(B.Octets.of_list([1, 35, 69, 103, 137, 171, 205, 239]), 16384n)) IO.print(show(X.Lc64.cbc_encrypt(~D.LcDesKey, ~D.LcDes.encrypt, des_key(B.Octets.of_list([1, 1, 1, 1, 1, 1, 1, 1])), B.Octets.zeros(7n), B.Octets.zeros(8n)))) IO.print(show(X.Lc64.ecb_encrypt(~D.LcDesKey, ~D.LcDes.encrypt, des_key(B.Octets.of_list([1, 1, 1, 1, 1, 1, 1, 1])), B.Octets.zeros(9n)))) Uses (45): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.print https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.hex 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.slice https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.zeros https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=aria https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=aria_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=blowfish https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=blowfish_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=camellia https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=camellia_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=cast5 https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=cast5_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=cast6 https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=cast6_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=des https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=des_key https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=fcrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=fcrypt_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=rc4_drop https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=rc4_ks https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=rc4_pieces https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=serpent https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=serpent_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=show https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=sm4 https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=sm4_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=tdes_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=tdes_cbc_big https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=tdes_ecb https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=tea https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=tea_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=twofish https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=twofish_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=xtea https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/check.bend&name=xtea_cbc https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/des.bend&name=LcDes.encrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/des.bend&name=LcDesKey https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/modes64.bend&name=Lc64.cbc_encrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/modes64.bend&name=Lc64.ecb_encrypt