Context
Surfaced by reviewer agy in the PR #78 RAS review (run 20260611T202510-1a7eb9b7ffe39194a54be7f5, cluster C-003) and adjudicated out of scope for that PR: the declaration predates PR #78 (unchanged diff context), every current use is read-only (hmac.Equal/bytes.Equal/fuzz seeds), and PR #78 actually reduced exposure by deleting the clone(identityEncoding) failure-return convention. Filed as the suggested follow-up hygiene item per maintainer direction.
Current state
crypto.go:23:
var identityEncoding = make([]byte, pointSize)
A mutable package-level slice holding the canonical identity encoding. An accidental in-package write (or test contamination) would corrupt every identity comparison. No such write exists today.
Proposed change
var identityEncoding [pointSize]byte
with identityEncoding[:] at comparison/clone sites. Internal-only; no API, protocol, or behavior change. Note a package-level array still does not prevent in-package mutation — this is hygiene that shrinks the accident surface, not a security boundary.
Scheduling constraint
Optional, maintainer's call. If done at all, batch it with other internal churn before the consolidated post-implementation evidence refresh (Phase 3), so the refreshed evidence covers it and no extra refresh is triggered.
🤖 Generated with Claude Code
Context
Surfaced by reviewer
agyin the PR #78 RAS review (run20260611T202510-1a7eb9b7ffe39194a54be7f5, cluster C-003) and adjudicated out of scope for that PR: the declaration predates PR #78 (unchanged diff context), every current use is read-only (hmac.Equal/bytes.Equal/fuzz seeds), and PR #78 actually reduced exposure by deleting theclone(identityEncoding)failure-return convention. Filed as the suggested follow-up hygiene item per maintainer direction.Current state
crypto.go:23:A mutable package-level slice holding the canonical identity encoding. An accidental in-package write (or test contamination) would corrupt every identity comparison. No such write exists today.
Proposed change
with
identityEncoding[:]at comparison/clone sites. Internal-only; no API, protocol, or behavior change. Note a package-level array still does not prevent in-package mutation — this is hygiene that shrinks the accident surface, not a security boundary.Scheduling constraint
Optional, maintainer's call. If done at all, batch it with other internal churn before the consolidated post-implementation evidence refresh (Phase 3), so the refreshed evidence covers it and no extra refresh is triggered.
🤖 Generated with Claude Code