idnits 2.17.1 draft-nir-cfrg-chacha20-poly1305-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 224 has weird spacing: '...db886dc c9a62...' == Line 274 has weird spacing: '...ccccccc ccccc...' == Line 275 has weird spacing: '...kkkkkkk kkkkk...' == Line 276 has weird spacing: '...kkkkkkk kkkkk...' == Line 277 has weird spacing: '...bbbbbbb nnnnn...' == (6 more instances...) == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document date (May 7, 2014) is 3642 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '3' on line 497 -- Looks like a reference, but probably isn't: '7' on line 498 -- Looks like a reference, but probably isn't: '11' on line 499 -- Looks like a reference, but probably isn't: '15' on line 500 -- Looks like a reference, but probably isn't: '4' on line 501 -- Looks like a reference, but probably isn't: '8' on line 502 -- Looks like a reference, but probably isn't: '12' on line 503 -- Looks like a reference, but probably isn't: '16' on line 495 -- Obsolete informational reference (is this intentional?): RFC 5996 (Obsoleted by RFC 7296) Summary: 0 errors (**), 0 flaws (~~), 8 warnings (==), 11 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group Y. Nir 3 Internet-Draft Check Point 4 Intended status: Informational A. Langley 5 Expires: November 8, 2014 Google Inc 6 May 7, 2014 8 ChaCha20 and Poly1305 for IETF protocols 9 draft-nir-cfrg-chacha20-poly1305-03 11 Abstract 13 This document defines the ChaCha20 stream cipher, as well as the use 14 of the Poly1305 authenticator, both as stand-alone algorithms, and as 15 a "combined mode", or Authenticated Encryption with Additional Data 16 (AEAD) algorithm. 18 This document does not introduce any new crypto, but is meant to 19 serve as a stable reference and an implementation guide. 21 Status of this Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at http://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on November 8, 2014. 38 Copyright Notice 40 Copyright (c) 2014 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (http://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 53 1.1. Conventions Used in This Document . . . . . . . . . . . . 3 54 2. The Algorithms . . . . . . . . . . . . . . . . . . . . . . . . 4 55 2.1. The ChaCha Quarter Round . . . . . . . . . . . . . . . . . 4 56 2.1.1. Test Vector for the ChaCha Quarter Round . . . . . . . 4 57 2.2. A Quarter Round on the ChaCha State . . . . . . . . . . . 5 58 2.2.1. Test Vector for the Quarter Round on the ChaCha 59 state . . . . . . . . . . . . . . . . . . . . . . . . 5 60 2.3. The ChaCha20 block Function . . . . . . . . . . . . . . . 6 61 2.3.1. Test Vector for the ChaCha20 Block Function . . . . . 7 62 2.4. The ChaCha20 encryption algorithm . . . . . . . . . . . . 8 63 2.4.1. Example and Test Vector for the ChaCha20 Cipher . . . 9 64 2.5. The Poly1305 algorithm . . . . . . . . . . . . . . . . . . 11 65 2.5.1. Poly1305 Example and Test Vector . . . . . . . . . . . 12 66 2.6. Generating the Poly1305 key using ChaCha20 . . . . . . . . 14 67 2.6.1. Poly1305 Key Generation Test Vector . . . . . . . . . 14 68 2.7. A Pseudo-Random Function for ChaCha/Poly-1305 based 69 Crypto Suites . . . . . . . . . . . . . . . . . . . . . . 15 70 2.8. AEAD Construction . . . . . . . . . . . . . . . . . . . . 16 71 2.8.1. Example and Test Vector for AEAD_CHACHA20-POLY1305 . . 17 72 3. Implementation Advice . . . . . . . . . . . . . . . . . . . . 19 73 4. Security Considerations . . . . . . . . . . . . . . . . . . . 19 74 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 20 75 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 21 76 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21 77 7.1. Normative References . . . . . . . . . . . . . . . . . . . 21 78 7.2. Informative References . . . . . . . . . . . . . . . . . . 21 79 Appendix A. Additional Test Vectors . . . . . . . . . . . . . . . 22 80 A.1. The ChaCha20 Block Functions . . . . . . . . . . . . . . . 22 81 A.2. ChaCha20 Encryption . . . . . . . . . . . . . . . . . . . 25 82 A.3. Poly1305 Message Authentication Code . . . . . . . . . . . 28 83 A.4. Poly1305 Key Generation Using ChaCha20 . . . . . . . . . . 32 84 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 33 86 1. Introduction 88 The Advanced Encryption Standard (AES - [FIPS-197]) has become the 89 gold standard in encryption. Its efficient design, wide 90 implementation, and hardware support allow for high performance in 91 many areas. On most modern platforms, AES is anywhere from 4x to 10x 92 as fast as the previous most-used cipher, 3-key Data Encryption 93 Standard (3DES - [FIPS-46]), which makes it not only the best choice, 94 but the only practical choice. 96 The problem is that if future advances in cryptanalysis reveal a 97 weakness in AES, users will be in an unenviable position. With the 98 only other widely supported cipher being the much slower 3DES, it is 99 not feasible to re-configure implementations to use 3DES. 100 [standby-cipher] describes this issue and the need for a standby 101 cipher in greater detail. 103 This document defines such a standby cipher. We use ChaCha20 104 ([chacha]) with or without the Poly1305 ([poly1305]) authenticator. 105 These algorithms are not just fast and secure. They are fast even in 106 software-only C-language implementations, allowing for much quicker 107 deployment when compared with algorithms such as AES that are 108 significantly accelerated by hardware implementations. 110 These document does not introduce these new algorithms. They have 111 been defined in scientific papers by D. J. Bernstein, which are 112 referenced by this document. The purpose of this document is to 113 serve as a stable reference for IETF documents making use of these 114 algorithms. 116 1.1. Conventions Used in This Document 118 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 119 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 120 document are to be interpreted as described in [RFC2119]. 122 The description of the ChaCha algorithm will at various time refer to 123 the ChaCha state as a "vector" or as a "matrix". This follows the 124 use of these terms in DJB's paper. The matrix notation is more 125 visually convenient, and gives a better notion as to why some rounds 126 are called "column rounds" while others are called "diagonal rounds". 127 Here's a diagram of how to martices relate to vectors (using the C 128 language convention of zero being the index origin). 130 0 1 2 3 131 4 5 6 7 132 8 9 10 11 133 12 13 14 15 135 The elements in this vector or matrix are 32-bit unsigned integers. 137 The algorithm name is "ChaCha". "ChaCha20" is a specific instance 138 where 20 "rounds" (or 80 quarter rounds - see Section 2.1) are used. 139 Other variations are defined, with 8 or 12 rounds, but in this 140 document we only describe the 20-round ChaCha, so the names "ChaCha" 141 and "ChaCha20" will be used interchangeably. 143 2. The Algorithms 145 The subsections below describe the algorithms used and the AEAD 146 construction. 148 2.1. The ChaCha Quarter Round 150 The basic operation of the ChaCha algorithm is the quarter round. It 151 operates on four 32-bit unsigned integers, denoted a, b, c, and d. 152 The operation is as follows (in C-like notation): 153 o a += b; d ^= a; d <<<= 16; 154 o c += d; b ^= c; b <<<= 12; 155 o a += b; d ^= a; d <<<= 8; 156 o c += d; b ^= c; b <<<= 7; 157 Where "+" denotes integer addition without carry, "^" denotes a 158 bitwise XOR, and "<<< n" denotes an n-bit left rotation (towards the 159 high bits). 161 For example, let's see the add, XOR and roll operations from the 162 first line with sample numbers: 163 o b = 0x01020304 164 o a = 0x11111111 165 o d = 0x01234567 166 o a = a + b = 0x11111111 + 0x01020304 = 0x12131415 167 o d = d ^ a = 0x01234567 ^ 0x12131415 = 0x13305172 168 o d = d<<<16 = 0x51721330 170 2.1.1. Test Vector for the ChaCha Quarter Round 172 For a test vector, we will use the same numbers as in the example, 173 adding something random for c. 174 o a = 0x11111111 175 o b = 0x01020304 176 o c = 0x9b8d6f43 177 o d = 0x01234567 179 After running a Quarter Round on these 4 numbers, we get these: 181 o a = 0xea2a92f4 182 o b = 0xcb1cf8ce 183 o c = 0x4581472e 184 o d = 0x5881c4bb 186 2.2. A Quarter Round on the ChaCha State 188 The ChaCha state does not have 4 integer numbers, but 16. So the 189 quarter round operation works on only 4 of them - hence the name. 190 Each quarter round operates on 4 pre-determined numbers in the ChaCha 191 state. We will denote by QUATERROUND(x,y,z,w) a quarter-round 192 operation on the numbers at indexes x, y, z, and w of the ChaCha 193 state when viewed as a vector. For example, if we apply 194 QUARTERROUND(1,5,9,13) to a state, this means running the quarter 195 round operation on the elements marked with an asterisk, while 196 leaving the others alone: 198 0 *a 2 3 199 4 *b 6 7 200 8 *c 10 11 201 12 *d 14 15 203 Note that this run of quarter round is part of what is called a 204 "column round". 206 2.2.1. Test Vector for the Quarter Round on the ChaCha state 208 For a test vector, we will use a ChaCha state that was generated 209 randomly: 211 Sample ChaCha State 213 879531e0 c5ecf37d 516461b1 c9a62f8a 214 44c20ef3 3390af7f d9fc690b 2a5f714c 215 53372767 b00a5631 974c541a 359e9963 216 5c971061 3d631689 2098d9d6 91dbd320 218 We will apply the QUARTERROUND(2,7,8,13) operation to this state. 219 For obvious reasons, this one is part of what is called a "diagonal 220 round": 222 After applying QUARTERROUND(2,7,8,13) 224 879531e0 c5ecf37d bdb886dc c9a62f8a 225 44c20ef3 3390af7f d9fc690b cfacafd2 226 e46bea80 b00a5631 974c541a 359e9963 227 5c971061 ccc07c79 2098d9d6 91dbd320 229 Note that only the numbers in positions 2, 7, 8, and 13 changed. 231 2.3. The ChaCha20 block Function 233 The ChaCha block function transforms a ChaCha state by running 234 multiple quarter rounds. 236 The inputs to ChaCha20 are: 237 o A 256-bit key, treated as a concatenation of 8 32-bit little- 238 endian integers. 239 o A 96-bit nonce, treated as a concatenation of 3 32-bit little- 240 endian integers. 241 o A 32-bit block count parameter, treated as a 32-bit little-endian 242 integer. 244 The output is 64 random-looking bytes. 246 The ChaCha algorithm described here uses a 256-bit key. The original 247 algorithm also specified 128-bit keys and 8- and 12-round variants, 248 but these are out of scope for this document. In this section we 249 describe the ChaCha block function. 251 Note also that the original ChaCha had a 64-bit nonce and 64-bit 252 block count. We have modified this here to be more consistent with 253 recommendations in section 3.2 of [RFC5116]. This limits the use of 254 a single (key,nonce) combination to 2^32 blocks, or 256 GB, but that 255 is enough for most uses. In cases where a single key is used by 256 multiple senders, it is important to make sure that they don't use 257 the same nonces. This can be assured by partitioning the nonce space 258 so that the first 32 bits are unique per sender, while the other 64 259 bits come from a counter. 261 The ChaCha20 state is initialized as follows: 262 o The first 4 words (0-3) are constants: 0x61707865, 0x3320646e, 263 0x79622d32, 0x6b206574. 264 o The next 8 words (4-11) are taken from the 256-bit key by reading 265 the bytes in little-endian order, in 4-byte chunks. 266 o Word 12 is a block counter. Since each block is 64-byte, a 32-bit 267 word is enough for 256 Gigabytes of data. 269 o Words 13-15 are a nonce, which should not be repeated for the same 270 key. The 13th word is the first 32 bits of the input nonce taken 271 as a little-endian integer, while the 15th word is the last 32 272 bits. 274 cccccccc cccccccc cccccccc cccccccc 275 kkkkkkkk kkkkkkkk kkkkkkkk kkkkkkkk 276 kkkkkkkk kkkkkkkk kkkkkkkk kkkkkkkk 277 bbbbbbbb nnnnnnnn nnnnnnnn nnnnnnnn 279 c=constant k=key b=blockcount n=nonce 281 ChaCha20 runs 20 rounds, alternating between "column" and "diagonal" 282 rounds. Each round is 4 quarter-rounds, and they are run as follows. 283 Rounds 1-4 are part of the "column" round, while 5-8 are part of the 284 "diagonal" round: 285 1. QUARTERROUND ( 0, 4, 8,12) 286 2. QUARTERROUND ( 1, 5, 9,13) 287 3. QUARTERROUND ( 2, 6,10,14) 288 4. QUARTERROUND ( 3, 7,11,15) 289 5. QUARTERROUND ( 0, 5,10,15) 290 6. QUARTERROUND ( 1, 6,11,12) 291 7. QUARTERROUND ( 2, 7, 8,13) 292 8. QUARTERROUND ( 3, 4, 9,14) 294 At the end of 20 rounds, the original input words are added to the 295 output words, and the result is serialized by sequencing the words 296 one-by-one in little-endian order. 298 2.3.1. Test Vector for the ChaCha20 Block Function 300 For a test vector, we will use the following inputs to the ChaCha20 301 block function: 302 o Key = 00:01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f:10:11:12:13: 303 14:15:16:17:18:19:1a:1b:1c:1d:1e:1f. The key is a sequence of 304 octets with no particular structure before we copy it into the 305 ChaCha state. 306 o Nonce = (00:00:00:09:00:00:00:4a:00:00:00:00) 307 o Block Count = 1. 309 After setting up the ChaCha state, it looks like this: 311 ChaCha State with the key set up. 313 61707865 3320646e 79622d32 6b206574 314 03020100 07060504 0b0a0908 0f0e0d0c 315 13121110 17161514 1b1a1918 1f1e1d1c 316 00000001 09000000 4a000000 00000000 318 After running 20 rounds (10 column rounds interleaved with 10 319 diagonal rounds), the ChaCha state looks like this: 321 ChaCha State after 20 rounds 323 837778ab e238d763 a67ae21e 5950bb2f 324 c4f2d0c7 fc62bb2f 8fa018fc 3f5ec7b7 325 335271c2 f29489f3 eabda8fc 82e46ebd 326 d19c12b4 b04e16de 9e83d0cb 4e3c50a2 328 Finally we add the original state to the result (simple vector or 329 matrix addition), giving this: 331 ChaCha State at the end of the ChaCha20 operation 333 e4e7f110 15593bd1 1fdd0f50 c47120a3 334 c7f4d1c7 0368c033 9aaa2204 4e6cd4c3 335 466482d2 09aa9f07 05d7c214 a2028bd9 336 d19c12b5 b94e16de e883d0cb 4e3c50a2 338 After we serialize the state, we get this: 340 Serialized Block: 341 000 10 f1 e7 e4 d1 3b 59 15 50 0f dd 1f a3 20 71 c4 .....;Y.P.... q. 342 016 c7 d1 f4 c7 33 c0 68 03 04 22 aa 9a c3 d4 6c 4e ....3.h.."....lN 343 032 d2 82 64 46 07 9f aa 09 14 c2 d7 05 d9 8b 02 a2 ..dF............ 344 048 b5 12 9c d1 de 16 4e b9 cb d0 83 e8 a2 50 3c 4e ......N......P.S. 797 Poly1305 r = 455e9a4057ab6080f47b42c052bac7b 798 Poly1305 s = ff53d53e7875932aebd9751073d6e10a 800 Keystream bytes: 801 9f:7b:e9:5d:01:fd:40:ba:15:e2:8f:fb:36:81:0a:ae: 802 c1:c0:88:3f:09:01:6e:de:dd:8a:d0:87:55:82:03:a5: 803 4e:9e:cb:38:ac:8e:5e:2b:b8:da:b2:0f:fa:db:52:e8: 804 75:04:b2:6e:be:69:6d:4f:60:a4:85:cf:11:b8:1b:59: 805 fc:b1:c4:5f:42:19:ee:ac:ec:6a:de:c3:4e:66:69:78: 806 8e:db:41:c4:9c:a3:01:e1:27:e0:ac:ab:3b:44:b9:cf: 807 5c:86:bb:95:e0:6b:0d:f2:90:1a:b6:45:e4:ab:e6:22: 808 15:38 810 Ciphertext: 811 000 d3 1a 8d 34 64 8e 60 db 7b 86 af bc 53 ef 7e c2|...4d.`.{...S.~. 812 016 a4 ad ed 51 29 6e 08 fe a9 e2 b5 a7 36 ee 62 d6|...Q)n......6.b. 813 032 3d be a4 5e 8c a9 67 12 82 fa fb 69 da 92 72 8b|=..^..g....i..r. 814 048 1a 71 de 0a 9e 06 0b 29 05 d6 a5 b6 7e cd 3b 36|.q.....)....~.;6 815 064 92 dd bd 7f 2d 77 8b 8c 98 03 ae e3 28 09 1b 58|...-w......(..X 816 080 fa b3 24 e4 fa d6 75 94 55 85 80 8b 48 31 d7 bc|..$...u.U...H1.. 817 096 3f f4 de f0 8e 4b 7a 9d e5 76 d2 65 86 ce c6 4b|?....Kz..v.e...K 818 112 61 16 |a. 820 AEAD Construction for Poly1305: 821 000 50 51 52 53 c0 c1 c2 c3 c4 c5 c6 c7 0c 00 00 00|PQRS............ 822 016 00 00 00 00 d3 1a 8d 34 64 8e 60 db 7b 86 af bc|.......4d.`.{... 823 032 53 ef 7e c2 a4 ad ed 51 29 6e 08 fe a9 e2 b5 a7|S.~....Q)n...... 824 048 36 ee 62 d6 3d be a4 5e 8c a9 67 12 82 fa fb 69|6.b.=..^..g....i 825 064 da 92 72 8b 1a 71 de 0a 9e 06 0b 29 05 d6 a5 b6|..r..q.....).... 826 080 7e cd 3b 36 92 dd bd 7f 2d 77 8b 8c 98 03 ae e3|~.;6...-w...... 827 096 28 09 1b 58 fa b3 24 e4 fa d6 75 94 55 85 80 8b|(..X..$...u.U... 828 112 48 31 d7 bc 3f f4 de f0 8e 4b 7a 9d e5 76 d2 65|H1..?....Kz..v.e 829 128 86 ce c6 4b 61 16 72 00 00 00 00 00 00 00 |...Ka.r....... 831 Tag: 832 18:fb:11:a5:03:1a:d1:3a:7e:3b:03:d4:6e:e3:a6:a7 834 3. Implementation Advice 836 Each block of ChaCha20 involves 16 move operations and one increment 837 operation for loading the state, 80 each of XOR, addition and Roll 838 operations for the rounds, 16 more add operations and 16 XOR 839 operations for protecting the plaintext. Section 2.3 describes the 840 ChaCha block function as "adding the original input words". This 841 implies that before starting the rounds on the ChaCha state, it is 842 copied aside only to be added in later. This would be correct, but 843 it saves a few operations to instead copy the state and do the work 844 on the copy. This way, for the next block you don't need to recreate 845 the state, but only to increment the block counter. This saves 846 approximately 5.5% of the cycles. 848 It is NOT RECOMMENDED to use a generic big number library such as the 849 one in OpenSSL for the arithmetic operations in Poly1305. Such 850 libraries use dynamic allocation to be able to handle any-sized 851 integer, but that flexibility comes at the expense of performance as 852 well as side-channel security. More efficient implementations that 853 run in constant time are available, one of them in DJB's own library, 854 NaCl ([NaCl]). A constant-time but not optimal approach would be to 855 naively implement the arithmetic operations for a 288-bit integers, 856 because even a naive implementation will not exceed 2^288 in the 857 multiplication of (acc+block) and r. An efficient constant-time 858 implementation can be found in the public domain library poly1305- 859 donna ([poly1305_donna]). 861 4. Security Considerations 863 The ChaCha20 cipher is designed to provide 256-bit security. 865 The Poly1305 authenticator is designed to ensure that forged messages 866 are rejected with a probability of 1-(n/(2^102)) for a 16n-byte 867 message, even after sending 2^64 legitimate messages, so it is SUF- 868 CMA in the terminology of [AE]. 870 Proving the security of either of these is beyond the scope of this 871 document. Such proofs are available in the referenced academic 872 papers. 874 The most important security consideration in implementing this draft 875 is the uniqueness of the nonce used in ChaCha20. Counters and LFSRs 876 are both acceptable ways of generating unique nonces, as is 877 encrypting a counter using a 64-bit cipher such as DES. Note that it 878 is not acceptable to use a truncation of a counter encrypted with a 879 128-bit or 256-bit cipher, because such a truncation may repeat after 880 a short time. 882 The Poly1305 key MUST be unpredictable to an attacker. Randomly 883 generating the key would fulfill this requirement, except that 884 Poly1305 is often used in communications protocols, so the receiver 885 should know the key. Pseudo-random number generation such as by 886 encrypting a counter is acceptable. Using ChaCha with a secret key 887 and a nonce is also acceptable. 889 The algorithms presented here were designed to be easy to implement 890 in constant time to avoid side-channel vulnerabilities. The 891 operations used in ChaCha20 are all additions, XORs, and fixed 892 rotations. All of these can and should be implemented in constant 893 time. Access to offsets into the ChaCha state and the number of 894 operations do not depend on any property of the key, eliminating the 895 chance of information about the key leaking through the timing of 896 cache misses. 898 For Poly1305, the operations are addition, multiplication and 899 modulus, all on >128-bit numbers. This can be done in constant time, 900 but a naive implementation (such as using some generic big number 901 library) will not be constant time. For example, if the 902 multiplication is performed as a separate operation from the modulus, 903 the result will some times be under 2^256 and some times be above 904 2^256. Implementers should be careful about timing side-channels for 905 Poly1305 by using the appropriate implementation of these operations. 907 5. IANA Considerations 909 There are no IANA considerations for this document. 911 6. Acknowledgements 913 ChaCha20 and Poly1305 were invented by Daniel J. Bernstein. The AEAD 914 construction and the method of creating the one-time poly1305 key 915 were invented by Adam Langley. 917 Thanks to Robert Ransom and Ilari Liusvaara for their helpful 918 comments and explanations. 920 7. References 922 7.1. Normative References 924 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 925 Requirement Levels", BCP 14, RFC 2119, March 1997. 927 [chacha] Bernstein, D., "ChaCha, a variant of Salsa20", Jan 2008. 929 [poly1305] 930 Bernstein, D., "The Poly1305-AES message-authentication 931 code", Mar 2005. 933 7.2. Informative References 935 [AE] Bellare, M. and C. Namprempre, "Authenticated Encryption: 936 Relations among notions and analysis of the generic 937 composition paradigm", 938 . 940 [FIPS-197] 941 National Institute of Standards and Technology, "Advanced 942 Encryption Standard (AES)", FIPS PUB 197, November 2001. 944 [FIPS-46] National Institute of Standards and Technology, "Data 945 Encryption Standard", FIPS PUB 46-2, December 1993, 946 . 948 [NaCl] Bernstein, D., Lange, T., and P. Schwabe, "NaCl: 949 Networking and Cryptography library", 950 . 952 [RFC4868] Kelly, S. and S. Frankel, "Using HMAC-SHA-256, HMAC-SHA- 953 384, and HMAC-SHA-512 with IPsec", RFC 4868, May 2007. 955 [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated 956 Encryption", RFC 5116, January 2008. 958 [RFC5996] Kaufman, C., Hoffman, P., Nir, Y., and P. Eronen, 959 "Internet Key Exchange Protocol Version 2 (IKEv2)", 960 RFC 5996, September 2010. 962 [agl-draft] 963 Langley, A. and W. Chang, "ChaCha20 and Poly1305 based 964 Cipher Suites for TLS", draft-agl-tls-chacha20poly1305-04 965 (work in progress), November 2013. 967 [poly1305_donna] 968 Floodyberry, A., "Poly1305-donna", 969 . 971 [standby-cipher] 972 McGrew, D., Grieco, A., and Y. Sheffer, "Selection of 973 Future Cryptographic Standards", 974 draft-mcgrew-standby-cipher (work in progress). 976 Appendix A. Additional Test Vectors 978 The sub-sections of this appendix contain more test vectors for the 979 algorithms in the sub-sections of Section 2. 981 A.1. The ChaCha20 Block Functions 982 Test Vector #1: 983 ============== 985 Key: 986 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 987 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 989 Nonce: 990 000 00 00 00 00 00 00 00 00 00 00 00 00 ............ 992 Block Counter = 0 994 ChaCha State at the end 995 ade0b876 903df1a0 e56a5d40 28bd8653 996 b819d2bd 1aed8da0 ccef36a8 c70d778b 997 7c5941da 8d485751 3fe02477 374ad8b8 998 f4b8436a 1ca11815 69b687c3 8665eeb2 1000 Keystream: 1001 000 76 b8 e0 ad a0 f1 3d 90 40 5d 6a e5 53 86 bd 28 v.....=.@]j.S..( 1002 016 bd d2 19 b8 a0 8d ed 1a a8 36 ef cc 8b 77 0d c7 .........6...w.. 1003 032 da 41 59 7c 51 57 48 8d 77 24 e0 3f b8 d8 4a 37 .AY|QWH.w$.?..J7 1004 048 6a 43 b8 f4 15 18 a1 1c c3 87 b6 69 b2 ee 65 86 jC.........i..e. 1006 Test Vector #2: 1007 ============== 1009 Key: 1010 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1011 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1013 Nonce: 1014 000 00 00 00 00 00 00 00 00 00 00 00 00 ............ 1016 Block Counter = 1 1018 ChaCha State at the end 1019 bee7079f 7a385155 7c97ba98 0d082d73 1020 a0290fcb 6965e348 3e53c612 ed7aee32 1021 7621b729 434ee69c b03371d5 d539d874 1022 281fed31 45fb0a51 1f0ae1ac 6f4d794b 1024 Keystream: 1025 000 9f 07 e7 be 55 51 38 7a 98 ba 97 7c 73 2d 08 0d ....UQ8z...|s-.. 1026 016 cb 0f 29 a0 48 e3 65 69 12 c6 53 3e 32 ee 7a ed ..).H.ei..S>2.z. 1027 032 29 b7 21 76 9c e6 4e 43 d5 71 33 b0 74 d8 39 d5 ).!v..NC.q3.t.9. 1028 048 31 ed 1f 28 51 0a fb 45 ac e1 0a 1f 4b 79 4d 6f 1..(Q..E....KyMo 1029 Test Vector #3: 1030 ============== 1032 Key: 1033 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1034 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 ................ 1036 Nonce: 1037 000 00 00 00 00 00 00 00 00 00 00 00 00 ............ 1039 Block Counter = 1 1041 ChaCha State at the end 1042 2452eb3a 9249f8ec 8d829d9b ddd4ceb1 1043 e8252083 60818b01 f38422b8 5aaa49c9 1044 bb00ca8e da3ba7b4 c4b592d1 fdf2732f 1045 4436274e 2561b3c8 ebdd4aa6 a0136c00 1047 Keystream: 1048 000 3a eb 52 24 ec f8 49 92 9b 9d 82 8d b1 ce d4 dd :.R$..I......... 1049 016 83 20 25 e8 01 8b 81 60 b8 22 84 f3 c9 49 aa 5a . %....`."...I.Z 1050 032 8e ca 00 bb b4 a7 3b da d1 92 b5 c4 2f 73 f2 fd ......;...../s.. 1051 048 4e 27 36 44 c8 b3 61 25 a6 4a dd eb 00 6c 13 a0 N'6D..a%.J...l.. 1053 Test Vector #4: 1054 ============== 1056 Key: 1057 000 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1058 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1060 Nonce: 1061 000 00 00 00 00 00 00 00 00 00 00 00 00 ............ 1063 Block Counter = 2 1065 ChaCha State at the end 1066 fb4dd572 4bc42ef1 df922636 327f1394 1067 a78dea8f 5e269039 a1bebbc1 caf09aae 1068 a25ab213 48a6b46c 1b9d9bcb 092c5be6 1069 546ca624 1bec45d5 87f47473 96f0992e 1071 Keystream: 1072 000 72 d5 4d fb f1 2e c4 4b 36 26 92 df 94 13 7f 32 r.M....K6&....2 1073 016 8f ea 8d a7 39 90 26 5e c1 bb be a1 ae 9a f0 ca ....9.&^........ 1074 032 13 b2 5a a2 6c b4 a6 48 cb 9b 9d 1b e6 5b 2c 09 ..Z.l..H.....[,. 1075 048 24 a6 6c 54 d5 45 ec 1b 73 74 f4 87 2e 99 f0 96 $.lT.E..st...... 1077 Test Vector #5: 1078 ============== 1080 Key: 1081 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1082 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1084 Nonce: 1085 000 00 00 00 00 00 00 00 00 00 00 00 02 ............ 1087 Block Counter = 0 1089 ChaCha State at the end 1090 374dc6c2 3736d58c b904e24a cd3f93ef 1091 88228b1a 96a4dfb3 5b76ab72 c727ee54 1092 0e0e978a f3145c95 1b748ea8 f786c297 1093 99c28f5f 628314e8 398a19fa 6ded1b53 1095 Keystream: 1096 000 c2 c6 4d 37 8c d5 36 37 4a e2 04 b9 ef 93 3f cd ..M7..67J.....?. 1097 016 1a 8b 22 88 b3 df a4 96 72 ab 76 5b 54 ee 27 c7 ..".....r.v[T.'. 1098 032 8a 97 0e 0e 95 5c 14 f3 a8 8e 74 1b 97 c2 86 f7 .....\....t..... 1099 048 5f 8f c2 99 e8 14 83 62 fa 19 8a 39 53 1b ed 6d _......b...9S..m 1101 A.2. ChaCha20 Encryption 1102 Test Vector #1: 1103 ============== 1105 Key: 1106 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1107 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1109 Nonce: 1110 000 00 00 00 00 00 00 00 00 00 00 00 00 ............ 1112 Initial Block Counter = 0 1114 Plaintext: 1115 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1116 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1117 032 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1118 048 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1120 Ciphertext: 1121 000 76 b8 e0 ad a0 f1 3d 90 40 5d 6a e5 53 86 bd 28 v.....=.@]j.S..( 1122 016 bd d2 19 b8 a0 8d ed 1a a8 36 ef cc 8b 77 0d c7 .........6...w.. 1123 032 da 41 59 7c 51 57 48 8d 77 24 e0 3f b8 d8 4a 37 .AY|QWH.w$.?..J7 1124 048 6a 43 b8 f4 15 18 a1 1c c3 87 b6 69 b2 ee 65 86 jC.........i..e. 1126 Test Vector #2: 1127 ============== 1129 Key: 1130 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1131 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 ................ 1133 Nonce: 1134 000 00 00 00 00 00 00 00 00 00 00 00 02 ............ 1136 Initial Block Counter = 1 1138 Plaintext: 1139 000 41 6e 79 20 73 75 62 6d 69 73 73 69 6f 6e 20 74 Any submission t 1140 016 6f 20 74 68 65 20 49 45 54 46 20 69 6e 74 65 6e o the IETF inten 1141 032 64 65 64 20 62 79 20 74 68 65 20 43 6f 6e 74 72 ded by the Contr 1142 048 69 62 75 74 6f 72 20 66 6f 72 20 70 75 62 6c 69 ibutor for publi 1143 064 63 61 74 69 6f 6e 20 61 73 20 61 6c 6c 20 6f 72 cation as all or 1144 080 20 70 61 72 74 20 6f 66 20 61 6e 20 49 45 54 46 part of an IETF 1145 096 20 49 6e 74 65 72 6e 65 74 2d 44 72 61 66 74 20 Internet-Draft 1146 112 6f 72 20 52 46 43 20 61 6e 64 20 61 6e 79 20 73 or RFC and any s 1147 128 74 61 74 65 6d 65 6e 74 20 6d 61 64 65 20 77 69 tatement made wi 1148 144 74 68 69 6e 20 74 68 65 20 63 6f 6e 74 65 78 74 thin the context 1149 160 20 6f 66 20 61 6e 20 49 45 54 46 20 61 63 74 69 of an IETF acti 1150 176 76 69 74 79 20 69 73 20 63 6f 6e 73 69 64 65 72 vity is consider 1151 192 65 64 20 61 6e 20 22 49 45 54 46 20 43 6f 6e 74 ed an "IETF Cont 1152 208 72 69 62 75 74 69 6f 6e 22 2e 20 53 75 63 68 20 ribution". Such 1153 224 73 74 61 74 65 6d 65 6e 74 73 20 69 6e 63 6c 75 statements inclu 1154 240 64 65 20 6f 72 61 6c 20 73 74 61 74 65 6d 65 6e de oral statemen 1155 256 74 73 20 69 6e 20 49 45 54 46 20 73 65 73 73 69 ts in IETF sessi 1156 272 6f 6e 73 2c 20 61 73 20 77 65 6c 6c 20 61 73 20 ons, as well as 1157 288 77 72 69 74 74 65 6e 20 61 6e 64 20 65 6c 65 63 written and elec 1158 304 74 72 6f 6e 69 63 20 63 6f 6d 6d 75 6e 69 63 61 tronic communica 1159 320 74 69 6f 6e 73 20 6d 61 64 65 20 61 74 20 61 6e tions made at an 1160 336 79 20 74 69 6d 65 20 6f 72 20 70 6c 61 63 65 2c y time or place, 1161 352 20 77 68 69 63 68 20 61 72 65 20 61 64 64 72 65 which are addre 1162 368 73 73 65 64 20 74 6f ssed to 1164 Ciphertext: 1165 000 a3 fb f0 7d f3 fa 2f de 4f 37 6c a2 3e 82 73 70 ...}../.O7l.>.sp 1166 016 41 60 5d 9f 4f 4f 57 bd 8c ff 2c 1d 4b 79 55 ec A`].OOW...,.KyU. 1167 032 2a 97 94 8b d3 72 29 15 c8 f3 d3 37 f7 d3 70 05 *....r)....7..p. 1168 048 0e 9e 96 d6 47 b7 c3 9f 56 e0 31 ca 5e b6 25 0d ....G...V.1.^.%. 1169 064 40 42 e0 27 85 ec ec fa 4b 4b b5 e8 ea d0 44 0e @B.'....KK....D. 1170 080 20 b6 e8 db 09 d8 81 a7 c6 13 2f 42 0e 52 79 50 ........./B.RyP 1171 096 42 bd fa 77 73 d8 a9 05 14 47 b3 29 1c e1 41 1c B..ws....G.)..A. 1172 112 68 04 65 55 2a a6 c4 05 b7 76 4d 5e 87 be a8 5a h.eU*....vM^...Z 1173 128 d0 0f 84 49 ed 8f 72 d0 d6 62 ab 05 26 91 ca 66 ...I..r..b..&..f 1174 144 42 4b c8 6d 2d f8 0e a4 1f 43 ab f9 37 d3 25 9d BK.m-....C..7.%. 1175 160 c4 b2 d0 df b4 8a 6c 91 39 dd d7 f7 69 66 e9 28 ......l.9...if.( 1176 176 e6 35 55 3b a7 6c 5c 87 9d 7b 35 d4 9e b2 e6 2b .5U;.l\..{5....+ 1177 192 08 71 cd ac 63 89 39 e2 5e 8a 1e 0e f9 d5 28 0f .q..c.9.^.....(. 1178 208 a8 ca 32 8b 35 1c 3c 76 59 89 cb cf 3d aa 8b 6c ..2.5.vC.. 1217 080 1a 55 32 05 57 16 ea d6 96 25 68 f8 7d 3f 3f 77 .U2.W....%h.}??w 1218 096 04 c6 a8 d1 bc d1 bf 4d 50 d6 15 4b 6d a7 31 b1 .......MP..Km.1. 1219 112 87 b5 8d fd 72 8a fa 36 75 7a 79 7a c1 88 d1 ....r..6uzyz... 1221 A.3. Poly1305 Message Authentication Code 1223 Notice how in test vector #2 r is equal to zero. The part of the 1224 Poly1305 algorithm where the accumulator is multiplied by r means 1225 that with r equal zero, the tag will be equal to s regardless of the 1226 content of the Text. Fortunately, all the proposed methods of 1227 generating r are such that getting this particular weak key is very 1228 unlikely. 1230 Test Vector #1: 1231 ============== 1233 One-time Poly1305 Key: 1234 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1235 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1237 Text to MAC: 1238 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1239 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1240 032 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1241 048 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1243 Tag: 1244 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1246 Test Vector #2: 1247 ============== 1249 One-time Poly1305 Key: 1250 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1251 016 36 e5 f6 b5 c5 e0 60 70 f0 ef ca 96 22 7a 86 3e 6.....`p...."z.> 1253 Text to MAC: 1254 000 41 6e 79 20 73 75 62 6d 69 73 73 69 6f 6e 20 74 Any submission t 1255 016 6f 20 74 68 65 20 49 45 54 46 20 69 6e 74 65 6e o the IETF inten 1256 032 64 65 64 20 62 79 20 74 68 65 20 43 6f 6e 74 72 ded by the Contr 1257 048 69 62 75 74 6f 72 20 66 6f 72 20 70 75 62 6c 69 ibutor for publi 1258 064 63 61 74 69 6f 6e 20 61 73 20 61 6c 6c 20 6f 72 cation as all or 1259 080 20 70 61 72 74 20 6f 66 20 61 6e 20 49 45 54 46 part of an IETF 1260 096 20 49 6e 74 65 72 6e 65 74 2d 44 72 61 66 74 20 Internet-Draft 1261 112 6f 72 20 52 46 43 20 61 6e 64 20 61 6e 79 20 73 or RFC and any s 1262 128 74 61 74 65 6d 65 6e 74 20 6d 61 64 65 20 77 69 tatement made wi 1263 144 74 68 69 6e 20 74 68 65 20 63 6f 6e 74 65 78 74 thin the context 1264 160 20 6f 66 20 61 6e 20 49 45 54 46 20 61 63 74 69 of an IETF acti 1265 176 76 69 74 79 20 69 73 20 63 6f 6e 73 69 64 65 72 vity is consider 1266 192 65 64 20 61 6e 20 22 49 45 54 46 20 43 6f 6e 74 ed an "IETF Cont 1267 208 72 69 62 75 74 69 6f 6e 22 2e 20 53 75 63 68 20 ribution". Such 1268 224 73 74 61 74 65 6d 65 6e 74 73 20 69 6e 63 6c 75 statements inclu 1269 240 64 65 20 6f 72 61 6c 20 73 74 61 74 65 6d 65 6e de oral statemen 1270 256 74 73 20 69 6e 20 49 45 54 46 20 73 65 73 73 69 ts in IETF sessi 1271 272 6f 6e 73 2c 20 61 73 20 77 65 6c 6c 20 61 73 20 ons, as well as 1272 288 77 72 69 74 74 65 6e 20 61 6e 64 20 65 6c 65 63 written and elec 1273 304 74 72 6f 6e 69 63 20 63 6f 6d 6d 75 6e 69 63 61 tronic communica 1274 320 74 69 6f 6e 73 20 6d 61 64 65 20 61 74 20 61 6e tions made at an 1275 336 79 20 74 69 6d 65 20 6f 72 20 70 6c 61 63 65 2c y time or place, 1276 352 20 77 68 69 63 68 20 61 72 65 20 61 64 64 72 65 which are addre 1277 368 73 73 65 64 20 74 6f ssed to 1279 Tag: 1280 000 36 e5 f6 b5 c5 e0 60 70 f0 ef ca 96 22 7a 86 3e 6.....`p...."z.> 1281 Test Vector #3: 1282 ============== 1284 One-time Poly1305 Key: 1285 000 36 e5 f6 b5 c5 e0 60 70 f0 ef ca 96 22 7a 86 3e 6.....`p...."z.> 1286 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1288 Text to MAC: 1289 000 41 6e 79 20 73 75 62 6d 69 73 73 69 6f 6e 20 74 Any submission t 1290 016 6f 20 74 68 65 20 49 45 54 46 20 69 6e 74 65 6e o the IETF inten 1291 032 64 65 64 20 62 79 20 74 68 65 20 43 6f 6e 74 72 ded by the Contr 1292 048 69 62 75 74 6f 72 20 66 6f 72 20 70 75 62 6c 69 ibutor for publi 1293 064 63 61 74 69 6f 6e 20 61 73 20 61 6c 6c 20 6f 72 cation as all or 1294 080 20 70 61 72 74 20 6f 66 20 61 6e 20 49 45 54 46 part of an IETF 1295 096 20 49 6e 74 65 72 6e 65 74 2d 44 72 61 66 74 20 Internet-Draft 1296 112 6f 72 20 52 46 43 20 61 6e 64 20 61 6e 79 20 73 or RFC and any s 1297 128 74 61 74 65 6d 65 6e 74 20 6d 61 64 65 20 77 69 tatement made wi 1298 144 74 68 69 6e 20 74 68 65 20 63 6f 6e 74 65 78 74 thin the context 1299 160 20 6f 66 20 61 6e 20 49 45 54 46 20 61 63 74 69 of an IETF acti 1300 176 76 69 74 79 20 69 73 20 63 6f 6e 73 69 64 65 72 vity is consider 1301 192 65 64 20 61 6e 20 22 49 45 54 46 20 43 6f 6e 74 ed an "IETF Cont 1302 208 72 69 62 75 74 69 6f 6e 22 2e 20 53 75 63 68 20 ribution". Such 1303 224 73 74 61 74 65 6d 65 6e 74 73 20 69 6e 63 6c 75 statements inclu 1304 240 64 65 20 6f 72 61 6c 20 73 74 61 74 65 6d 65 6e de oral statemen 1305 256 74 73 20 69 6e 20 49 45 54 46 20 73 65 73 73 69 ts in IETF sessi 1306 272 6f 6e 73 2c 20 61 73 20 77 65 6c 6c 20 61 73 20 ons, as well as 1307 288 77 72 69 74 74 65 6e 20 61 6e 64 20 65 6c 65 63 written and elec 1308 304 74 72 6f 6e 69 63 20 63 6f 6d 6d 75 6e 69 63 61 tronic communica 1309 320 74 69 6f 6e 73 20 6d 61 64 65 20 61 74 20 61 6e tions made at an 1310 336 79 20 74 69 6d 65 20 6f 72 20 70 6c 61 63 65 2c y time or place, 1311 352 20 77 68 69 63 68 20 61 72 65 20 61 64 64 72 65 which are addre 1312 368 73 73 65 64 20 74 6f ssed to 1314 Tag: 1315 000 f3 47 7e 7c d9 54 17 af 89 a6 b8 79 4c 31 0c f0 .G~|.T.....yL1.. 1317 Test Vector #4: 1318 ============== 1320 One-time Poly1305 Key: 1321 000 1c 92 40 a5 eb 55 d3 8a f3 33 88 86 04 f6 b5 f0 ..@..U...3...... 1322 016 47 39 17 c1 40 2b 80 09 9d ca 5c bc 20 70 75 c0 G9..@+....\. pu. 1324 Text to MAC: 1325 000 27 54 77 61 73 20 62 72 69 6c 6c 69 67 2c 20 61 'Twas brillig, a 1326 016 6e 64 20 74 68 65 20 73 6c 69 74 68 79 20 74 6f nd the slithy to 1327 032 76 65 73 0a 44 69 64 20 67 79 72 65 20 61 6e 64 ves.Did gyre and 1328 048 20 67 69 6d 62 6c 65 20 69 6e 20 74 68 65 20 77 gimble in the w 1329 064 61 62 65 3a 0a 41 6c 6c 20 6d 69 6d 73 79 20 77 abe:.All mimsy w 1330 080 65 72 65 20 74 68 65 20 62 6f 72 6f 67 6f 76 65 ere the borogove 1331 096 73 2c 0a 41 6e 64 20 74 68 65 20 6d 6f 6d 65 20 s,.And the mome 1332 112 72 61 74 68 73 20 6f 75 74 67 72 61 62 65 2e raths outgrabe. 1334 Tag: 1335 000 45 41 66 9a 7e aa ee 61 e7 08 dc 7c bc c5 eb 62 EAf.~..a...|...b 1337 A.4. Poly1305 Key Generation Using ChaCha20 1339 Test Vector #1: 1340 ============== 1342 The key: 1343 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1344 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1346 The nonce: 1347 000 00 00 00 00 00 00 00 00 00 00 00 00 ............ 1349 Poly1305 one-time key: 1350 000 76 b8 e0 ad a0 f1 3d 90 40 5d 6a e5 53 86 bd 28 v.....=.@]j.S..( 1351 016 bd d2 19 b8 a0 8d ed 1a a8 36 ef cc 8b 77 0d c7 .........6...w.. 1353 Test Vector #2: 1354 ============== 1356 The key: 1357 000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 1358 016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 ................ 1360 The nonce: 1361 000 00 00 00 00 00 00 00 00 00 00 00 02 ............ 1363 Poly1305 one-time key: 1364 000 ec fa 25 4f 84 5f 64 74 73 d3 cb 14 0d a9 e8 76 ..%O._dts......v 1365 016 06 cb 33 06 6c 44 7b 87 bc 26 66 dd e3 fb b7 39 ..3.lD{..&f....9 1367 Test Vector #3: 1368 ============== 1370 The key: 1371 000 1c 92 40 a5 eb 55 d3 8a f3 33 88 86 04 f6 b5 f0 ..@..U...3...... 1372 016 47 39 17 c1 40 2b 80 09 9d ca 5c bc 20 70 75 c0 G9..@+....\. pu. 1374 The nonce: 1375 000 00 00 00 00 00 00 00 00 00 00 00 02 ............ 1377 Poly1305 one-time key: 1378 000 96 5e 3b c6 f9 ec 7e d9 56 08 08 f4 d2 29 f9 4b .^;...~.V....).K 1379 016 13 7f f2 75 ca 9b 3f cb dd 59 de aa d2 33 10 ae ..u..?..Y...3.. 1381 Authors' Addresses 1383 Yoav Nir 1384 Check Point Software Technologies Ltd. 1385 5 Hasolelim st. 1386 Tel Aviv 6789735 1387 Israel 1389 Email: ynir.ietf@gmail.com 1391 Adam Langley 1392 Google Inc 1394 Email: agl@google.com