TC3 contained the data for TC4.
TC4 contained incorrect data.

Moved the data from TC3 into TC4.
Generated correct data for TC3.

Index: chachatest.c
===================================================================
RCS file: /cvs/src/regress/lib/libcrypto/chacha/chachatest.c,v
retrieving revision 1.3
diff -u -p -r1.3 chachatest.c
--- chachatest.c 24 Jun 2014 17:55:40 -0000 1.3
+++ chachatest.c 18 Mar 2017 14:14:59 -0000
@@ -83,6 +83,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,
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
@@ -101,29 +124,6 @@ struct chacha_tv chacha_test_vectors[] =
  0x0c, 0x52, 0xc8, 0xae, 0x43, 0x24, 0x0b, 0x79,
  0xd4, 0x90, 0x42, 0xb7, 0x77, 0xbf, 0xd6, 0xcb,
  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,
  },
  },
  {

Reply via email to