Skip to content

Commit

Permalink
Add additional HIGHT test vectors (GH weidai11#672, GH weidai11#1010)
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader authored and EAddario committed Apr 10, 2021
1 parent 45df9d0 commit 98d547e
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
67 changes: 67 additions & 0 deletions TestVectors/hight.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,73 @@ Plaintext : 32 22 F4 CC CF D3 90 2D
Ciphertext : BB 80 F5 0B 35 11 5B A8
Test: Encrypt

AlgorithmType: SymmetricCipher
Name: HIGHT/CBC
#
Source: HIGHT reference implementation
Comment: HIGHT/CBC, 128-bit key
Key: 88 E3 4F 8F 08 17 79 F1 E9 F3 94 37 0A D4 05 89
IV: 26 8D 66 A7 35 A8 1A 81
Plaintext: 00 01 02 03 04 05 06 07
Ciphertext: CE 15 95 08 5A 18 8C 28
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/CBC, 128-bit key
Key: 88 E3 4F 8F 08 17 79 F1 E9 F3 94 37 0A D4 05 89
IV: 26 8D 66 A7 35 A8 1A 81
Plaintext: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Ciphertext: CE 15 95 08 5A 18 8C 28 C1 8D 77 08 D9 C1 25 86
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/CBC, 128-bit key
Key: 88 E3 4F 8F 08 17 79 F1 E9 F3 94 37 0A D4 05 89
IV: 26 8D 66 A7 35 A8 1A 81
Plaintext: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07
Ciphertext: CE 15 95 08 5A 18 8C 28 C1 8D 77 08 D9 C1 25 86 4B 3D AF 2B F2 0D 52 47
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/CBC, 128-bit key
Key: 88 E3 4F 8F 08 17 79 F1 E9 F3 94 37 0A D4 05 89
IV: 26 8D 66 A7 35 A8 1A 81
Plaintext: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Ciphertext: CE 15 95 08 5A 18 8C 28 C1 8D 77 08 D9 C1 25 86 4B 3D AF 2B F2 0D 52 47 63 4A 00 01 2F A0 E9 F0
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/CBC, 128-bit key
Key: 88 E3 4F 8F 08 17 79 F1 E9 F3 94 37 0A D4 05 89
IV: 26 8D 66 A7 35 A8 1A 81
Plaintext: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07
Ciphertext: CE 15 95 08 5A 18 8C 28 C1 8D 77 08 D9 C1 25 86 4B 3D AF 2B F2 0D 52 47 63 4A 00 01 2F A0 E9 F0 44 9D E2 BC C1 68 51 6C
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/CBC, 128-bit key
Key: 88 E3 4F 8F 08 17 79 F1 E9 F3 94 37 0A D4 05 89
IV: 26 8D 66 A7 35 A8 1A 81
Plaintext: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Ciphertext: CE 15 95 08 5A 18 8C 28 C1 8D 77 08 D9 C1 25 86 4B 3D AF 2B F2 0D 52 47 63 4A 00 01 2F A0 E9 F0 44 9D E2 BC C1 68 51 6C 0E 27 45 AC 37 C1 A6 74
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/CBC, 128-bit key
Key: 88 E3 4F 8F 08 17 79 F1 E9 F3 94 37 0A D4 05 89
IV: 26 8D 66 A7 35 A8 1A 81
Plaintext: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07
Ciphertext: CE 15 95 08 5A 18 8C 28 C1 8D 77 08 D9 C1 25 86 4B 3D AF 2B F2 0D 52 47 63 4A 00 01 2F A0 E9 F0 44 9D E2 BC C1 68 51 6C 0E 27 45 AC 37 C1 A6 74 3A 1E A5 1E B4 07 D1 4E
Test: Encrypt
#
Source: HIGHT reference implementation
Comment: HIGHT/CBC, 128-bit key
Key: 88 E3 4F 8F 08 17 79 F1 E9 F3 94 37 0A D4 05 89
IV: 26 8D 66 A7 35 A8 1A 81
Plaintext: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Ciphertext: CE 15 95 08 5A 18 8C 28 C1 8D 77 08 D9 C1 25 86 4B 3D AF 2B F2 0D 52 47 63 4A 00 01 2F A0 E9 F0 44 9D E2 BC C1 68 51 6C 0E 27 45 AC 37 C1 A6 74 3A 1E A5 1E B4 07 D1 4E C8 C4 B4 35 CA 05 CC 62
Test: Encrypt

AlgorithmType: SymmetricCipher
Name: HIGHT/CTR
#
Expand Down
1 change: 1 addition & 0 deletions regtest3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ void RegisterFactories4()
RegisterSymmetricCipherDefaultFactories<ECB_Mode<SHACAL2> >();
RegisterSymmetricCipherDefaultFactories<ECB_Mode<ARIA> >();
RegisterSymmetricCipherDefaultFactories<ECB_Mode<HIGHT> >();
RegisterSymmetricCipherDefaultFactories<CBC_Mode<HIGHT> >();
RegisterSymmetricCipherDefaultFactories<CTR_Mode<HIGHT> >();
RegisterSymmetricCipherDefaultFactories<ECB_Mode<Camellia> >();
RegisterSymmetricCipherDefaultFactories<ECB_Mode<TEA> >();
Expand Down

0 comments on commit 98d547e

Please sign in to comment.