{ "crypto": [ { "name": "https://github.com/jedisct1/libsodium/blob/master/test/default/aead_xchacha20poly1305.c Test Vector #1", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515253", "ad": "50515253c0c1c2c3c4c5c6c7", "plaintext": "4C616469657320616E642047656E746C656D656E206F662074686520636C617373206F66202739393A204966204920636F756C64206F6666657220796F75206F6E6C79206F6E652074697020666F7220746865206675747572652C2073756E73637265656E20776F756C642062652069742E", "ciphertext": "f8ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e68420" } ], "error": [ { "name": "Invalid key", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e90", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515253", "ad": "50515253c0c1c2c3c4c5c6c7", "ciphertext": "f8ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e68420" }, { "name": "Invalid nonce", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515254", "ad": "50515253c0c1c2c3c4c5c6c7", "ciphertext": "f8ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e68420" }, { "name": "Invalid AD", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515253", "ad": "50515253c0c1c2c3c4c5c6c8", "ciphertext": "f8ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e68420" }, { "name": "Invalid message", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515253", "ad": "50515253c0c1c2c3c4c5c6c7", "ciphertext": "08ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e68420" }, { "name": "Invalid MAC", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515253", "ad": "50515253c0c1c2c3c4c5c6c7", "ciphertext": "f8ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e68421" }, { "name": "Extended AD", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515253", "ad": "50515253c0c1c2c3c4c5c6c7c8", "ciphertext": "f8ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e68420" }, { "name": "Extended message", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515253", "ad": "50515253c0c1c2c3c4c5c6c7", "ciphertext": "00f8ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e68420" }, { "name": "Extended MAC", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515253", "ad": "50515253c0c1c2c3c4c5c6c7", "ciphertext": "f8ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e6842021" }, { "name": "Truncated AD", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515253", "ad": "50515253c0c1c2c3c4c5c6", "ciphertext": "f8ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e68420" }, { "name": "Truncated message", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515253", "ad": "50515253c0c1c2c3c4c5c6c7", "ciphertext": "ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e68420" }, { "name": "Truncated MAC", "key": "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f", "nonce": "07000000404142434445464748494a4b4c4d4e4f50515253", "ad": "50515253c0c1c2c3c4c5c6c7", "ciphertext": "f8ebea4875044066fc162a0604e171feecfb3d20425248563bcfd5a155dcc47bbda70b86e5ab9b55002bd1274c02db35321acd7af8b2e2d25015e136b7679458e9f43243bf719d639badb5feac03f80a19a96ef10cb1d15333a837b90946ba3854ee74da3f2585efc7e1e170e17e15e563e77601f4f85cafa8e5877614e143e684" } ], "api": { "defaults": { "key_len": 32, "nonce_len": 24, "ad_len": 64, "enc_input_len": 263, "enc_buf_len": 279, "dec_input_len": 279, "dec_buf_len": 263 }, "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 nonce length (< 24)", "nonce_len": 23, "error": "ApiMisuse(\"Invalid nonce length\")" }, { "name": "Invalid nonce length (> 24)", "nonce_len": 25, "error": "ApiMisuse(\"Invalid nonce length\")" }, { "name": "Invalid buffer length (< input_len)", "enc_buf_len": 278, "dec_buf_len": 262, "error": "ApiMisuse(\"Buffer is too small\")" } ] } }