<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Thank you for the reply.<br></div><div><br data-mce-bogus="1"></div><div>This behavior was asked to us by ANSSI (French Cybersecurity agency) so it might make some sense but I'm no expert on the subject.<br data-mce-bogus="1"></div><div>However they also told us that wrapping should not happen so returning FALSE is surely good enough.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thank you,</div><div>Jean-François<br data-mce-bogus="1"></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>De: </b>"Tobias Brunner" <tobias@strongswan.org><br><b>À: </b>"jean-francois hren" <jean-francois.hren@stormshield.eu>, "dev" <dev@lists.strongswan.org><br><b>Envoyé: </b>Jeudi 17 Octobre 2019 14:09:29<br><b>Objet: </b>Re: [strongSwan-dev] PRF+ and wrapping<br></div><div><br></div><div data-marker="__QUOTED_TEXT__">Hi Jean-Francois,<br><br>> In 'src/libstrongswan/crypto/prf_plus.c:get_bytes()' if 'this->counter'<br>> wraps, the feature is disabled.<br><br>Yes, it just switches to the non-counter mode (IKEv1 variant).<br><br>> The RFC says " The prf+ function is not defined beyond 255 times the<br>> size of the prf function output." however when wrapping occurs, we can<br>> set 'this->counter' to 0x01 since the behavior is not defined anyway.<br>> What do you think ?<br><br>What exactly would the benefit be of that (compared to the current<br>behavior)?<br><br>To be honest, I'd actually prefer if get_bytes() just returned FALSE<br>once it wrapped.<br><br>Regards,<br>Tobias<br></div></div></body></html>