summaryrefslogtreecommitdiff
path: root/TestVectors
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-01-24 21:15:48 -0500
committerJeffrey Walton <noloader@gmail.com>2019-01-24 21:15:48 -0500
commit099f870c55fe165038de6341a5cc17776a8c769c (patch)
tree3a397573fc43f540eaf21b9d7aae1145c60ae1cc /TestVectors
parenta29b734a0fa9955292a4a2e444dfa33487035577 (diff)
downloadcryptopp-git-099f870c55fe165038de6341a5cc17776a8c769c.tar.gz
Add additional ChaChaTLS test vectors from RFC 7539
Diffstat (limited to 'TestVectors')
-rw-r--r--TestVectors/chacha_tls.txt53
1 files changed, 53 insertions, 0 deletions
diff --git a/TestVectors/chacha_tls.txt b/TestVectors/chacha_tls.txt
index 2a9f0912..ab400879 100644
--- a/TestVectors/chacha_tls.txt
+++ b/TestVectors/chacha_tls.txt
@@ -2,6 +2,59 @@ AlgorithmType: SymmetricCipher
Name: ChaChaTLS
Source: http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305
#
+Comment: Section A.1, ChaCha20 Block Function, Test 1
+Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+IV: 00 00 00 00 00 00 00 00 00 00 00 00
+Plaintext: r64 00
+Ciphertext: 76 b8 e0 ad a0 f1 3d 90 40 5d 6a e5 53 86 bd 28 \
+ bd d2 19 b8 a0 8d ed 1a a8 36 ef cc 8b 77 0d c7 \
+ da 41 59 7c 51 57 48 8d 77 24 e0 3f b8 d8 4a 37 \
+ 6a 43 b8 f4 15 18 a1 1c c3 87 b6 69 b2 ee 65 86
+Test: Encrypt
+#
+Comment: Section A.1, ChaCha20 Block Function, Test 2
+Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+IV: 00 00 00 00 00 00 00 00 00 00 00 00
+Plaintext: r64 00
+Ciphertext: 9f 07 e7 be 55 51 38 7a 98 ba 97 7c 73 2d 08 0d \
+ cb 0f 29 a0 48 e3 65 69 12 c6 53 3e 32 ee 7a ed \
+ 29 b7 21 76 9c e6 4e 43 d5 71 33 b0 74 d8 39 d5 \
+ 31 ed 1f 28 51 0a fb 45 ac e1 0a 1f 4b 79 4d 6f
+InitialBlock: 1
+Test: Encrypt
+#
+Comment: Section A.1, ChaCha20 Block Function, Test 3
+Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
+IV: 00 00 00 00 00 00 00 00 00 00 00 00
+Plaintext: r64 00
+Ciphertext: 3a eb 52 24 ec f8 49 92 9b 9d 82 8d b1 ce d4 dd \
+ 83 20 25 e8 01 8b 81 60 b8 22 84 f3 c9 49 aa 5a \
+ 8e ca 00 bb b4 a7 3b da d1 92 b5 c4 2f 73 f2 fd \
+ 4e 27 36 44 c8 b3 61 25 a6 4a dd eb 00 6c 13 a0
+InitialBlock: 1
+Test: Encrypt
+#
+Comment: Section A.1, ChaCha20 Block Function, Test 4
+Key: 00ff000000000000 0000000000000000 0000000000000000 0000000000000000
+IV: 00 00 00 00 00 00 00 00 00 00 00 00
+Plaintext: r64 00
+Ciphertext: 72 d5 4d fb f1 2e c4 4b 36 26 92 df 94 13 7f 32 \
+ 8f ea 8d a7 39 90 26 5e c1 bb be a1 ae 9a f0 ca \
+ 13 b2 5a a2 6c b4 a6 48 cb 9b 9d 1b e6 5b 2c 09 \
+ 24 a6 6c 54 d5 45 ec 1b 73 74 f4 87 2e 99 f0 96
+InitialBlock: 2
+Test: Encrypt
+#
+Comment: Section A.1, ChaCha20 Block Function, Test 5
+Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+IV: 00 00 00 00 00 00 00 00 00 00 00 02
+Plaintext: r64 00
+Ciphertext: c2 c6 4d 37 8c d5 36 37 4a e2 04 b9 ef 93 3f cd \
+ 1a 8b 22 88 b3 df a4 96 72 ab 76 5b 54 ee 27 c7 \
+ 8a 97 0e 0e 95 5c 14 f3 a8 8e 74 1b 97 c2 86 f7 \
+ 5f 8f c2 99 e8 14 83 62 fa 19 8a 39 53 1b ed 6d
+Test: Encrypt
+#
Comment: Section A.2, ChaCha20 Encryption, Test 1
Key: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
IV: 00 00 00 00 00 00 00 00 00 00 00 00