{ "crypto": [ { "name": "RFC 8439 Test Vector #1 (null test vector)", "key": "0000000000000000000000000000000000000000000000000000000000000000", "data": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "mac": "00000000000000000000000000000000" }, { "name": "RFC 8439 Test Vector #2 (test the `s` half of the key)", "key": "0000000000000000000000000000000036e5f6b5c5e06070f0efca96227a863e", "data": "416e79207375626d697373696f6e20746f20746865204945544620696e74656e6465642062792074686520436f6e7472696275746f7220666f72207075626c69636174696f6e20617320616c6c206f722070617274206f6620616e204945544620496e7465726e65742d4472616674206f722052464320616e6420616e792073746174656d656e74206d6164652077697468696e2074686520636f6e74657874206f6620616e204945544620616374697669747920697320636f6e7369646572656420616e20224945544620436f6e747269627574696f6e222e20537563682073746174656d656e747320696e636c756465206f72616c2073746174656d656e747320696e20494554462073657373696f6e732c2061732077656c6c206173207772697474656e20616e6420656c656374726f6e696320636f6d6d756e69636174696f6e73206d61646520617420616e792074696d65206f7220706c6163652c207768696368206172652061646472657373656420746f", "mac": "36e5f6b5c5e06070f0efca96227a863e" }, { "name": "RFC 8439 Test Vector #3 (test the `r` half of the key)", "key": "36e5f6b5c5e06070f0efca96227a863e00000000000000000000000000000000", "data": "416e79207375626d697373696f6e20746f20746865204945544620696e74656e6465642062792074686520436f6e7472696275746f7220666f72207075626c69636174696f6e20617320616c6c206f722070617274206f6620616e204945544620496e7465726e65742d4472616674206f722052464320616e6420616e792073746174656d656e74206d6164652077697468696e2074686520636f6e74657874206f6620616e204945544620616374697669747920697320636f6e7369646572656420616e20224945544620436f6e747269627574696f6e222e20537563682073746174656d656e747320696e636c756465206f72616c2073746174656d656e747320696e20494554462073657373696f6e732c2061732077656c6c206173207772697474656e20616e6420656c656374726f6e696320636f6d6d756e69636174696f6e73206d61646520617420616e792074696d65206f7220706c6163652c207768696368206172652061646472657373656420746f", "mac": "f3477e7cd95417af89a6b8794c310cf0" }, { "name": "RFC 8439 Test Vector #4", "key": "1c9240a5eb55d38af333888604f6b5f0473917c1402b80099dca5cbc207075c0", "data": "2754776173206272696c6c69672c20616e642074686520736c6974687920746f7665730a446964206779726520616e642067696d626c6520696e2074686520776162653a0a416c6c206d696d737920776572652074686520626f726f676f7665732c0a416e6420746865206d6f6d65207261746873206f757467726162652e", "mac": "4541669a7eaaee61e708dc7cbcc5eb62" }, { "name": "RFC 8439 Test Vector #5 (test 130-bit partial reduction)", "key": "0200000000000000000000000000000000000000000000000000000000000000", "data": "ffffffffffffffffffffffffffffffff", "mac": "03000000000000000000000000000000" }, { "name": "RFC 8439 Test Vector #6 (test what happens if addition of s overflows modulo 2^128)", "key": "02000000000000000000000000000000ffffffffffffffffffffffffffffffff", "data": "02000000000000000000000000000000", "mac": "03000000000000000000000000000000" }, { "name": "RFC 8439 Test Vector #7 (test carry from lower limb)", "key": "0100000000000000000000000000000000000000000000000000000000000000", "data": "fffffffffffffffffffffffffffffffff0ffffffffffffffffffffffffffffff11000000000000000000000000000000", "mac": "05000000000000000000000000000000" }, { "name": "RFC 8439 Test Vector #8 (test what happens if final result from polynomial part is exactly 2^130-5)", "key": "0100000000000000000000000000000000000000000000000000000000000000", "data": "fffffffffffffffffffffffffffffffffbfefefefefefefefefefefefefefefe01010101010101010101010101010101", "mac": "00000000000000000000000000000000" }, { "name": "RFC 8439 Test Vector #9 (test what happens if final result from polynomial part is exactly 2^130-6)", "key": "0200000000000000000000000000000000000000000000000000000000000000", "data": "fdffffffffffffffffffffffffffffff", "mac": "faffffffffffffffffffffffffffffff" }, { "name": "RFC 8439 Test Vector #10 (test what happens if 5*H+L-type reduction produces 131-bit intermediate result)", "key": "0100000000000000040000000000000000000000000000000000000000000000", "data": "e33594d7505e43b900000000000000003394d7505e4379cd01000000000000000000000000000000000000000000000001000000000000000000000000000000", "mac": "14000000000000005500000000000000" }, { "name": "RFC 8439 Test Vector #11 (test what happens if 5*H+L-type reduction produces 131-bit final result)", "key": "0100000000000000040000000000000000000000000000000000000000000000", "data": "e33594d7505e43b900000000000000003394d7505e4379cd010000000000000000000000000000000000000000000000", "mac": "13000000000000000000000000000000" }, { "name": "The AEAD message from RFC 8439", "key": "bdf04aa95ce4de8995b14bb6a18fecaf26478f50c054f563dbc0a21e261572aa", "data": "f33388860000000000004e910000000064a0861575861af460f062c79be643bd5e805cfd345cf389f108670ac76c8cb24c6cfc18755d43eea09ee94e382d26b0bdb7b73c321b0100d4f03b7f355894cf332f830e710b97ce98c8a84abd0b948114ad176e008d33bd60f982b1ff37c8559797a06ef4f0ef61c186324e2b3506383606907b6a7c02b0f9f6157b53c867e4b9166c767b804d46a59b5216cde7a4e99040c5a40433225ee282a1b0a06c523eaf4534d7f83fa1155b0047718cbc546a0d072b04b3564eea1b422273f548271a0bb2316053fa76991955ebd63159434ecebb4e466dae5a1073a6727627097a1049e617d91d361094fa68f0ff77987130305beaba2eda04df997b714d6c6f2c29a6ad5cb4022b02709b000000000000000c000000000000000901000000000000", "mac": "eead9d67890cbb22392336fea1851f38" } ], "api": { "defaults": { "key_len": 32, "data_len": 263, "buf_len": 16 }, "tests": [ { "name": "Invalid key length (< 32)", "key_len": 31, "error": "ApiMisuse(\"Invalid key length\")" }, { "name": "Invalid key length (> 32)", "key_len": 33, "error": "ApiMisuse(\"Invalid key length\")" }, { "name": "Invalid buffer length (< 16)", "buf_len": 15, "error": "ApiMisuse(\"Buffer is too small\")" } ] } }