Repository navigation
fix!: refuse text sealing keys, and offer only ECDHE AES-GCM under TLS 1.2 - #689
Merged
Merged
Conversation
Pairwise keys refused a key made entirely of printable text (a passphrase, or a hex or base64 key passed without decoding it), but the other sealers, token sets, CIBA sessions and the session and interaction cookies, accepted one and sealed everything under a key with far less entropy than 32 random bytes. sealkeys.Check, which every sealer uses, now refuses such a key, and pairwise's own copy of the check is gone. A random key is all printable with probability about 4e-14. Test fixtures that used text keys now end in a non-printable byte. UPGRADING.md has a section. BREAKING CHANGE: client.NewTokenSetSealer, client.NewBackchannelSessionSealer, client/sessioncookie and server/interactioncookie refuse a key made entirely of printable text. Generate keys with crypto/rand and decode an encoded key before passing it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FAPI-CIBA §7.9 (as FAPI 1.0 Part 2 §8.5) permits only the ECDHE AES-GCM cipher suites under TLS 1.2. NewClient's transport offered Go's defaults, CBC suites included, and HardeningOf refused only the suites Go itself calls insecure. The transport now offers exactly the four ECDHE AES-GCM suites under TLS 1.2 (Go has no DHE suites, the other two the specs list); TLS 1.3 is unaffected. HardeningOf counts a transport as hardened only while its TLS 1.2 suites are some of those four, so adding a CBC suite, or clearing the list back to Go's defaults, makes it unhardened. UPGRADING.md has a section. BREAKING CHANGE: a fapihttp.NewClient client no longer connects to a server that offers, under TLS 1.2, only cipher suites other than the four ECDHE AES-GCM ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.



Batch H of the 2026-10-18 review: L8 and L14, as decided. Both are breaking. Each has a section under
## v0.58.0in UPGRADING.md.L8: sealing keys must not be text
The gap: pairwise keys refused a key made entirely of printable text (a passphrase, or a hex or base64 key passed without decoding). The other sealers accepted one and sealed everything under it:
client/sessioncookie;server/interactioncookie.The fix:
sealkeys.Check, which every sealer uses, now refuses such a key, and pairwise's own copy of the check is gone.L14: outbound TLS 1.2 cipher suites
The spec: FAPI-CIBA §7.9 (as FAPI 1.0 Part 2 §8.5) permits only the ECDHE AES-GCM suites under TLS 1.2.
fapihttp.NewClientoffered Go's defaults, CBC included.The fix:
HardeningOfcounts a transport as hardened only while its TLS 1.2 suites are some of those four. Adding a CBC suite, or clearing the list back to Go's defaults, makes it unhardened.Behaviour change: a server offering only CBC suites under TLS 1.2 is no longer reachable through a
NewClientclient.Testing
sealkeyscases for a passphrase and an undecoded hex key;HardeningOfrefuses an added CBC suite and cleared defaults, and accepts a subset of the permitted suites.go vet,go test ./..., andgo test -raceon Go 1.26.9 for the affected packages;crypto/rand.🤖 Generated with Claude Code