Files
i2p.i2p/router
zzz 5b40c01394 Don't increment nonces within a CipherState unless the encryption/decryption operation succeeds
Adapted from https://github.com/rweather/noise-java/pull/18

Section 5.1 of the The Noise Protocol Framework, revision 34 states in the description for DecryptWithAd that:

If an authentication failure occurs in DECRYPT() then n is not incremented and an error is signaled to the caller.

But noise-java currently increments the nonce unconditionally.
This change defers incrementing the nonce until encryption/decryption operations actually succeed.
2025-04-06 10:47:47 -04:00
..
2011-02-27 16:24:11 +00:00
2024-01-28 12:09:10 +00:00