Correct §7.7 adversarial-keys guidance and export ErrBlockOverflow - #14
Merged
Conversation
Block routing is unkeyed, so a random globalSeed does not mitigate adversarial keys as the spec claimed, and PreHash (unkeyed xxHash3-128) is not a defense either. Document the actual availability risk and prescribe a secret-keyed upstream transform (SipHash/HMAC) for adversary-influenced keys. Note the same in the README pre-hashing section. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Egmh6b54gbmrVTZ6CXxTUa
tamirms
force-pushed
the
docs/security-adversarial-keys
branch
from
August 17, 2026 13:51
e0a3e4f to
6723f41
Compare
Copilot stopped reviewing on behalf of
tamirms due to an error
August 17, 2026 13:51
Re-export sherr.ErrBlockOverflow so consumers can errors.Is on it — e.g. to rebuild a skewed/adversarial key set with a different routing transform instead of treating the overflow as fatal. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Egmh6b54gbmrVTZ6CXxTUa
tamirms
added a commit
that referenced
this pull request
Aug 26, 2026
Addresses review feedback on #14. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tamirms
added a commit
that referenced
this pull request
Aug 26, 2026
…racy Shorter, one-idea sentences per review on #14; correct the unsorted-mode overflow wording (the per-block cap is enforced at merge, not a temp-file region overflow). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tamirms
force-pushed
the
docs/security-adversarial-keys
branch
from
August 26, 2026 06:26
846f43b to
710aa76
Compare
tamirms
added a commit
that referenced
this pull request
Aug 26, 2026
…racy Shorter, one-idea sentences per review on #14; drop the inaccurate unsorted-mode temp-file overflow wording (the per-block cap is a format-level limit that raises ErrBlockOverflow in both modes). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tamirms
force-pushed
the
docs/security-adversarial-keys
branch
from
August 26, 2026 06:28
710aa76 to
78107bc
Compare
tamirms
added a commit
that referenced
this pull request
Aug 26, 2026
…racy Shorter, one-idea sentences per review on #14; drop the inaccurate unsorted-mode temp-file overflow wording (the per-block cap is a format-level limit that raises ErrBlockOverflow in both modes). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tamirms
force-pushed
the
docs/security-adversarial-keys
branch
from
August 26, 2026 06:29
78107bc to
decab8d
Compare
tamirms
added a commit
that referenced
this pull request
Aug 26, 2026
…racy Shorter, one-idea sentences per review on #14; remove jargon (not keyed / unkeyed / grind / fails closed / probabilistic filter); drop the inaccurate unsorted-mode temp-file overflow wording (the per-block cap raises ErrBlockOverflow in both modes); present the SipHash/HMAC mitigation as clear alternatives. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tamirms
force-pushed
the
docs/security-adversarial-keys
branch
from
August 26, 2026 06:34
decab8d to
1e5b810
Compare
tamirms
added a commit
that referenced
this pull request
Aug 26, 2026
…racy Shorter, one-idea sentences per review on #14; remove jargon (not keyed / unkeyed / grind / fails closed / probabilistic filter); drop the inaccurate unsorted-mode temp-file overflow wording (the per-block cap raises ErrBlockOverflow in both modes); present the SipHash/HMAC mitigation as clear alternatives. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tamirms
force-pushed
the
docs/security-adversarial-keys
branch
from
August 26, 2026 06:37
1e5b810 to
9ef8278
Compare
…racy Shorter, one-idea sentences per review on #14; remove jargon (not keyed / unkeyed / grind / fails closed / probabilistic filter); drop the inaccurate unsorted-mode temp-file overflow wording (the per-block cap raises ErrBlockOverflow in both modes); present the SipHash/HMAC mitigation as clear alternatives. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tamirms
force-pushed
the
docs/security-adversarial-keys
branch
from
August 26, 2026 06:38
9ef8278 to
ec99ea8
Compare
karthikiyer56
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related changes for the adversarial-keys finding.
1. Docs — correct §7.7. Block routing is unkeyed;
globalSeeddoes not participate in routing, so the previously-documented "randomglobalSeed" mitigation is ineffective.PreHash(unkeyed xxHash3-128) is likewise not an adversarial defense. §7.7 now states this and prescribes a secret-keyed upstream transform (SipHash/HMAC) for adversary-influenced keys; thePreHash,WithGlobalSeed, and README docs are aligned.2. API — export
ErrBlockOverflow. Re-exportsherr.ErrBlockOverflowasstreamhash.ErrBlockOverflowso consumers canerrors.Ison it — e.g. to rebuild a skewed/adversarial key set with a different (secret-keyed) routing transform instead of treating the overflow as fatal. Previously the sentinel lived only in the internalsherrpackage, forcing consumers to string-match the error message.No behavior change to construction or query; docs + one new exported sentinel.