Commit message · Abeeujahdev: implement standard traits for ChaCha20-Poly1305 data types
Implement a comprehensive suite of common traits (Copy, Clone, Eq, Ord, Hash)
across chacha20_poly1305 cryptographic structures to improve API usability and integration with
standard library collections.
Changes
- Added Copy, Clone, PartialEq, Eq, PartialOrd, Ord, and Hash to:
- Poly1305
- Key
- Nonce
- U32x4
- State
- ChaCha20
- ChaCha20Poly1305
- Added Debug only to non-sensitive internal types (U32x4, State).
Security Note
The Debug trait was intentionally omitted for types holding sensitive data
(Key, Nonce, ChaCha20, etc.) to prevent accidental leakage of secret
keying values or internal cipher states through logging or unwraps.
90/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly
Why it was queuedsecond-pass: broader security terminology