Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

tink-crypto/tink-java
main @ 58d74c2
2
Fixes
0
CVEs
MEDIUM
Peak severity
Highlights
Cryptographic Issues: 1 prior fix. Scrutinize any change in this area.
InsecureNonceChaCha20Poly1305Base.java: most-fixed (1 issue). Treat as high-risk during review.
0 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Cryptographic Issues: Incorrect ByteBuffer limit tracking during encryption can cause MAC tags to be calculated over wrong segments of the buffer, leading to invalid ciphertext or authentications. Future modifications to buffer limits or offsets must preserve exact length tracking.
Timing Attack: Standard byte array comparison operator usage in MAC verification paths allows timing-based side-channel attacks to reconstruct valid MAC tags. All verification steps must use constant-time comparisons.