summaryrefslogtreecommitdiff
path: root/chachapoly.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chachapoly.cpp')
-rw-r--r--chachapoly.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/chachapoly.cpp b/chachapoly.cpp
index 6d4d395e..8daff99d 100644
--- a/chachapoly.cpp
+++ b/chachapoly.cpp
@@ -8,6 +8,12 @@
NAMESPACE_BEGIN(CryptoPP)
+// RekeyCipherAndMac is heavier-weight than we like. The Authenc framework was
+// predicated on BlcokCiphers, where the key and key schedule could be
+// calculated independent of the IV being used. However, the ChaCha and
+// ChaCha20Poly1305 construction cannot disgorge key setup and IV. Even a
+// simple Resync() forces us to regenerate the initial state for both
+// ChaCha20 and Poly1305.
void ChaCha20Poly1305_Base::RekeyCipherAndMac(const byte *userKey, size_t keylength, const NameValuePairs &params)
{
// Derive MAC key