Security context

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

pyca/pynacl
main @ 676db55
7
Fixes
0
CVEs
HIGH
Peak severity
57.1%
Coverage
Highlights
Auth Bypass: 1 prior fix. Scrutinize any change in this area.
nacl/hash.py: most-fixed (1 issue). Treat as high-risk during review.
3 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: The use of bare assert statements to check cryptographic operation status codes can lead to validation bypasses if python is run with optimization flags (-O), which strips asserts. This has been remediated by replacing asserts with non-optimizable verification functions.
Auth Bypass: Insufficent validation of small-order points in Ed25519 subgroup membership checks allowed invalid points to be processed, potentially undermining signature authenticity.
Side-Channel Attack: Comparing cryptographic keys using standard equality operators introduces timing variations that can leak key information. Ensuring constant-time comparison via libsodium's native memory comparison prevents these timing side-channels.