From 42172beaa7fbb92d602a4447f7f0420be8006f42 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 26 May 2017 16:48:22 +0000 Subject: Synchronise chacha test cases with the referenced draft - this adds a missing test case, reassigns two of the labels and removes a test case that was from an earlier draft. Inconsistency noted by Steven Roberts , some time ago... --- src/regress/lib/libcrypto/chacha/chachatest.c | 46 +++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/regress/lib/libcrypto/chacha/chachatest.c b/src/regress/lib/libcrypto/chacha/chachatest.c index 33652ee14f..bb2b54d139 100644 --- a/src/regress/lib/libcrypto/chacha/chachatest.c +++ b/src/regress/lib/libcrypto/chacha/chachatest.c @@ -82,6 +82,29 @@ struct chacha_tv chacha_test_vectors[] = { }, { "TC3: Single bit in IV set, all zero key", + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + 64, + { + 0xef, 0x3f, 0xdf, 0xd6, 0xc6, 0x15, 0x78, 0xfb, + 0xf5, 0xcf, 0x35, 0xbd, 0x3d, 0xd3, 0x3b, 0x80, + 0x09, 0x63, 0x16, 0x34, 0xd2, 0x1e, 0x42, 0xac, + 0x33, 0x96, 0x0b, 0xd1, 0x38, 0xe5, 0x0d, 0x32, + 0x11, 0x1e, 0x4c, 0xaf, 0x23, 0x7e, 0xe5, 0x3c, + 0xa8, 0xad, 0x64, 0x26, 0x19, 0x4a, 0x88, 0x54, + 0x5d, 0xdc, 0x49, 0x7a, 0x0b, 0x46, 0x6e, 0x7d, + 0x6b, 0xbd, 0xb0, 0x04, 0x1b, 0x2f, 0x58, 0x6b + }, + }, + { + "TC4: All bits in key and IV are set", { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -103,29 +126,6 @@ struct chacha_tv chacha_test_vectors[] = { 0x80, 0xe9, 0x31, 0x27, 0x0b, 0x7f, 0x50, 0xeb, }, }, - { - "TC4: All bits in key and IV are set", - { - 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, - 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, - 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, - 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, - }, - { - 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, - }, - 64, - { - 0xaf, 0xf7, 0x41, 0x82, 0x93, 0xf3, 0xa5, 0x53, - 0x89, 0x4b, 0x1e, 0x74, 0x84, 0xbd, 0x1e, 0x8e, - 0xde, 0x19, 0x6e, 0xce, 0xd5, 0xa1, 0xd6, 0x81, - 0x4d, 0xe3, 0x70, 0x91, 0xe0, 0x7e, 0x07, 0x6e, - 0x34, 0xbb, 0xba, 0x81, 0x07, 0xa6, 0x86, 0xc9, - 0x82, 0x85, 0x0f, 0x0a, 0x73, 0x53, 0x94, 0x0d, - 0x40, 0xdb, 0x1a, 0xb0, 0xb5, 0x76, 0x5b, 0x78, - 0xb4, 0xcf, 0x47, 0x3d, 0x94, 0x85, 0xa3, 0xdd, - }, - }, { "TC5: Every even bit set in key and IV", { -- cgit v1.2.3-55-g6feb