[L-5] Crypto nits: serial modulo bias, digit-only stored-serial decimal misread (~5e-7), undocumented OCSP 'good' for expired, SHA-384 responses with P-256 key #35
Labels
No labels
architecture
code-quality
correctness
critical
docs
high
low
medium
ops
performance
privacy
security
tests
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
antrapol/CA-MDID-eMudhra#35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
First serial byte uses
rem(byte, 0x7F) + 1(slight modulo bias — residues 0-1 occur 3/256 vs 2/256); an all-digit stored serial is interpreted as decimal (prob ≈5e-7 per cert; primary path re-derives from the cert payload so it's a fallback issue); OCSP answersgoodfor expired records (RFC-permissible but undocumented to relying parties); OCSP signs SHA-384 responses with a P-256 responder key.Evidence
lib/mdid_ws/cert_management/cert_serial_number.ex:18-19, 114-131lib/mdid_ws/cert_management/ocsp_responder.ex:179-183, 210-211Impact
Negligible individually; worth fixing while touching the modules.
Fix
Line numbers refer to the initial import commit
282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).