Fixes a crash when verifying a crafted VOPRF or ARC proof. #488
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.44) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 213 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.321
Real PR Conversation Timeline
1 comments
"Review active on #488"
general
weight: 0.35
simonjbeaumont
Checklist
Motivation:
A crafted proof can crash the verifier. An all-zero proof is enough to trigger it
The verifier recomputes the commitment
s A + c Band serializes it into the challenge transcript. If that point is the identity there is no encoding, so thetry!inOpenSSLCurvePoint.compressedRepresentationtraps withEC_R_POINT_AT_INFINITYThis is reachable from both sides:
P384._VOPRF.PublicKey.finalizewith a proof from the server, andP256._ARCV1.PrivateKey.verifywith a presentation from the clientModifications:
OPRFGroupElement.oprfRepresentationa throwing getter ({ get throws }) so the identity's lack of an encoding is part of the existing APItryin the DLEQ and ZKP challenge transcripts, so these proofs are rejectedOPRF.composeFinalizeContextand the internal ARCserialize(ciphersuite:)functions now throwResult:
These proofs now throw instead of crashing. No public API change.
The new tests crash on
mainand pass with this change. The fullCryptoExtrasTestssuite passes on macOS.Valid proofs aren't affected. An honest prover only produces the identity with negligible probability, and RFC 9497 already treats serializing the identity as an error.
Fixes #487