![]() Now that the original ChaCha20 key, nonces, constants and counter are all mixed up beyond recognition, simply substituting the 32-bit counter for the next 64-byte message and intending to re-use the matrices state would be a very bad idea. ![]() One example below taken from the RFC document. The reason being the keystream and the matrices (lookup tables) were already permutated and the original keymat would not be present in the keystream nor the matrices after finishing a ChaCha20 cryptographic function thus, naively replacing the 32-bit counter meant that the next 64 bytes of keystream and matrices would be very different. ![]() ![]() While I was contemplating on how to make my ChaCha20 implementation faster, I recalled your question asking me in the previous Squid section why I couldn’t simply replace the cryptographic counter ChaCha20 uses instead of taking the initializing of the entire cipher approach.Īfter much thought, the answer would be it would be impossible to simply replace a 32-bit counter only.
0 Comments
Leave a Reply. |