From f6cfcaa72bbe9f542e31778c48ae299f560f09cd Mon Sep 17 00:00:00 2001 From: Mika Tuupola Date: Wed, 23 Jun 2021 13:38:41 +0300 Subject: [PATCH] Use hex encoded keys to avoid confusion (see #37) (#39) --- test_vectors.json | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/test_vectors.json b/test_vectors.json index 041cf44..e7e1bb4 100644 --- a/test_vectors.json +++ b/test_vectors.json @@ -1,5 +1,5 @@ { - "version": "0.2.0", + "version": "0.3.0", "numberOfTests": 25, "testGroups": [ { @@ -8,7 +8,7 @@ { "id": 0, "comment": "Hello world with zero timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": "beefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef", "timestamp": 0, "token": "870S4BYxgHw0KnP3W9fgVUHEhT5g86vJ17etaC5Kh5uIraWHCI1psNQGv298ZmjPwoYbjDQ9chy2z", @@ -18,7 +18,7 @@ { "id": 1, "comment": "Hello world with max timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": "beefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef", "timestamp": 4294967295, "token": "89i7YCwu5tWAJNHUDdmIqhzOi5hVHOd4afjZcGMcVmM4enl4yeLiDyYv41eMkNmTX6IwYEFErCSqr", @@ -28,7 +28,7 @@ { "id": 2, "comment": "Hello world with November 27 timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": "beefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef", "timestamp": 123206400, "token": "875GH23U0Dr6nHFA63DhOyd9LkYudBkX8RsCTOMz5xoYAMw9sMd5QwcEqLDRnTDHPenOX7nP2trlT", @@ -38,7 +38,7 @@ { "id": 3, "comment": "Eight null bytes with zero timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": "beefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef", "timestamp": 0, "token": "1jIBheHbDdkCDFQmtgw4RUZeQoOJgGwTFJSpwOAk3XYpJJr52DEpILLmmwYl4tjdSbbNqcF1", @@ -48,7 +48,7 @@ { "id": 4, "comment": "Eight null bytes with max timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": "beefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef", "timestamp": 4294967295, "token": "1jrx6DUu5q06oxykef2e2ZMyTcDRTQot9ZnwgifUtzAphGtjsxfbxXNhQyBEOGtpbkBgvIQx", @@ -58,7 +58,7 @@ { "id": 5, "comment": "Eight null bytes with November 27th timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": "beefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef", "timestamp": 123206400, "token": "1jJDJOEjuwVb9Csz1Ypw1KBWSkr0YDpeBeJN6NzJWx1VgPLmcBhu2SbkpQ9JjZ3nfUf7Aytp", @@ -68,7 +68,7 @@ { "id": 6, "comment": "Empty payload", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": "beefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef", "timestamp": 0, "token": "4sfD0vPFhIif8cy4nB3BQkHeJqkOkDvinI4zIhMjYX4YXZU5WIq9ycCVjGzB5", @@ -78,7 +78,7 @@ { "id": 7, "comment": "Non-UTF8 payload", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": "beefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef", "timestamp": 123206400, "token": "K9u6d0zjXp8RXNUGDyXAsB9AtPo60CD3xxQ2ulL8aQoTzXbvockRff0y1eXoHm", @@ -93,7 +93,7 @@ { "id": 8, "comment": "Hello world with zero timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 0, "token": "870S4BYxgHw0KnP3W9fgVUHEhT5g86vJ17etaC5Kh5uIraWHCI1psNQGv298ZmjPwoYbjDQ9chy2z", @@ -103,7 +103,7 @@ { "id": 9, "comment": "Hello world with max timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 4294967295, "token": "89i7YCwu5tWAJNHUDdmIqhzOi5hVHOd4afjZcGMcVmM4enl4yeLiDyYv41eMkNmTX6IwYEFErCSqr", @@ -113,7 +113,7 @@ { "id": 10, "comment": "Hello world with November 27 timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 123206400, "token": "875GH23U0Dr6nHFA63DhOyd9LkYudBkX8RsCTOMz5xoYAMw9sMd5QwcEqLDRnTDHPenOX7nP2trlT", @@ -123,7 +123,7 @@ { "id": 11, "comment": "Eight null bytes with zero timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 0, "token": "1jIBheHbDdkCDFQmtgw4RUZeQoOJgGwTFJSpwOAk3XYpJJr52DEpILLmmwYl4tjdSbbNqcF1", @@ -133,7 +133,7 @@ { "id": 12, "comment": "Eight null bytes with max timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 4294967295, "token": "1jrx6DUu5q06oxykef2e2ZMyTcDRTQot9ZnwgifUtzAphGtjsxfbxXNhQyBEOGtpbkBgvIQx", @@ -143,7 +143,7 @@ { "id": 13, "comment": "Eight null bytes with November 27th timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 123206400, "token": "1jJDJOEjuwVb9Csz1Ypw1KBWSkr0YDpeBeJN6NzJWx1VgPLmcBhu2SbkpQ9JjZ3nfUf7Aytp", @@ -153,7 +153,7 @@ { "id": 14, "comment": "Empty payload", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 0, "token": "4sfD0vPFhIif8cy4nB3BQkHeJqkOkDvinI4zIhMjYX4YXZU5WIq9ycCVjGzB5", @@ -163,7 +163,7 @@ { "id": 15, "comment": "Non-UTF8 payload", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 123206400, "token": "K9u6d0zjXp8RXNUGDyXAsB9AtPo60CD3xxQ2ulL8aQoTzXbvockRff0y1eXoHm", @@ -173,7 +173,7 @@ { "id": 16, "comment": "Wrong version 0xBB", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 0, "token": "89mvl3RkwXjpEj5WMxK7GUDEHEeeeZtwjMIOogTthvr44qBfYtQSIZH5MHOTC0GzoutDIeoPVZk3w", @@ -183,7 +183,7 @@ { "id": 17, "comment": "Invalid base62 characters", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 123206400, "token": "875GH23U0Dr6nHFA63DhOyd9LkYudBkX8RsCTOMz5xoYAMw9sMd5QwcEqLDRnTDHPenOX7nP2trlT_", @@ -193,7 +193,7 @@ { "id": 18, "comment": "Modified version", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 0, "token": "89mvl3S0BE0UCMIY94xxIux4eg1w5oXrhvCEXrDAjusSbO0Yk7AU6FjjTnbTWTqogLfNPJLzecHVb", @@ -203,7 +203,7 @@ { "id": 19, "comment": "Modified first byte of the nonce", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 0, "token": "875GH233SUysT7fQ711EWd9BXpwOjB72ng3ZLnjWFrmOqVy49Bv93b78JU5331LbcY0EEzhLfpmSx", @@ -214,7 +214,7 @@ { "id": 20, "comment": "Modified timestamp", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 0, "token": "870g1RCk4lW1YInhaU3TP8u2hGtfol16ettLcTOSoA0JIpjCaQRW7tQeP6dQmTvFIB2s6wL5deMXr", @@ -225,7 +225,7 @@ { "id": 21, "comment": "Modified last byte of the ciphertext", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 0, "token": "875GH23U0Dr6nHFA63DhOyd9LkYudBkX8RsCTOMz5xoYAMw9sMd5Qw6Jpo96myliI3hHD7VbKZBYh", @@ -235,7 +235,7 @@ { "id": 22, "comment": "Modified last byte of the Poly1305 tag", - "key": "supersecretkeyyoushouldnotcommit", + "key": "73757065727365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 0, "token": "875GH23U0Dr6nHFA63DhOyd9LkYudBkX8RsCTOMz5xoYAMw9sMd5QwcEqLDRnTDHPenOX7nP2trk0", @@ -245,7 +245,7 @@ { "id": 23, "comment": "Wrong key", - "key": "wrongsecretkeyyoushouldnotcommit", + "key": "77726f6e677365637265746b6579796f7573686f756c646e6f74636f6d6d6974", "nonce": null, "timestamp": 0, "token": "870S4BYxgHw0KnP3W9fgVUHEhT5g86vJ17etaC5Kh5uIraWHCI1psNQGv298ZmjPwoYbjDQ9chy2z", @@ -255,7 +255,7 @@ { "id": 24, "comment": "Invalid key", - "key": "tooshortkey", + "key": "746f6f73686f72746b6579", "nonce": null, "timestamp": 0, "token": "870S4BYxgHw0KnP3W9fgVUHEhT5g86vJ17etaC5Kh5uIraWHCI1psNQGv298ZmjPwoYbjDQ9chy2z",