mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-05-12 12:24:54 +00:00
5b40c01394
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.