From 5cf42244f03de4fd54a4d6fa93307ddd21927904 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Mon, 24 Jul 2023 09:13:03 +0200 Subject: [PATCH] Add comment back in --- src/dtls13.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dtls13.c b/src/dtls13.c index e8a2947d8..1d810a872 100644 --- a/src/dtls13.c +++ b/src/dtls13.c @@ -274,6 +274,9 @@ static int Dtls13GetRnMask(WOLFSSL* ssl, const byte* ciphertext, byte* mask, if (c->chacha == NULL) return BAD_STATE_E; + /* assuming CIPHER[0..3] should be interpreted as little endian 32-bits + integer. The draft rfc isn't really clear on that. See sec 4.2.3 of + the draft. See also Section 2.3 of the Chacha RFC. */ ato32le(ciphertext, &counter); ret = wc_Chacha_SetIV(c->chacha, &ciphertext[4], counter);