diff --git a/04-onion-routing.md b/04-onion-routing.md index 9fdf357..8d0f343 100644 --- a/04-onion-routing.md +++ b/04-onion-routing.md @@ -509,11 +509,11 @@ The construction returns a single 1366-byte packet along with the first receivin The packet construction is performed in the reverse order of the route, i.e. the last hop's operations are applied first. -The packet is initialized with 1366 _random_ bytes derived from a CSPRNG +The packet is initialized with 1300 _random_ bytes derived from a CSPRNG (ChaCha20). The _pad_ key referenced above is used to extract additional random bytes from a ChaCha20 stream, using it as a CSPRNG for this purpose. Once the `paddingKey` has been obtained, ChaCha20 is used with an all zero nonce, to -generate 1366 random bytes. Those random bytes are then used as the starting +generate 1300 random bytes. Those random bytes are then used as the starting state of the mix-header to be created. A filler is generated (see [Filler Generation](#filler-generation)) using the diff --git a/bolt04/onion-test-v0.json b/bolt04/onion-test-v0.json index bf59320..66755f4 100644 --- a/bolt04/onion-test-v0.json +++ b/bolt04/onion-test-v0.json @@ -47,7 +47,7 @@ "payload": "0404040404040404000000000000000400000004000000000000000000000000", "rhokey": "034e18b8cc718e8af6339106e706c52d8df89e2b1f7e9142d996acf88df8799b", "mukey": "8e45e5c61c2b24cb6382444db6698727afb063adecd72aada233d4bf273d975a", - "hmac": "16d4553c6084b369073d259381bb5b02c16bb2c590bbd9e69346cf7ebd563229 + "hmac": "16d4553c6084b369073d259381bb5b02c16bb2c590bbd9e69346cf7ebd563229" } ] },