Repository navigation
Run the tests against go-age 1.4.0 - #150
Merged
Merged
Conversation
go-age 1.4.0's age-keygen makes a post-quantum key unless told otherwise, and the test took the key for an X25519 one. Each kind is now asked for by name (-pq=false, -pq), and the default is read as whichever it is. The test also checks what it did not before: that the recipient AgeSharp works out from the key is the public key age-keygen wrote beside it.
Released on 2026-12-01. TODO.md lists what the release changed for a library and where AgeSharp stands on each; the differences are left as open decisions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #150 +/- ##
=======================================
Coverage 97.65% 97.65%
=======================================
Files 77 77
Lines 5064 5064
Branches 692 692
=======================================
Hits 4945 4945
Misses 73 73
Partials 46 46
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
go-age v1.4.0 was released on 2026-12-01. This moves CI to it, fixes the one test it breaks, and records what the release changed for a library. No library code changes.
The test
age-keygenin 1.4.0 makes a post-quantum key unless told otherwise (-pq=false), and one interop test took the key for an X25519 one. AgeSharp read the key correctly; only the assertion was out of date.The test is now a theory over three cases:
-pq=false,-pq, and no flag, where the key is read as whichever kind it is. It also checks something it did not before: the recipient AgeSharp works out from the key equals the# public key:lineage-keygenwrote beside it. No other test runsage-keygen.Both suites pass against 1.4.0 locally, in the default and the portable build (1,176 vectors; 1,717 unit tests, 3 skipped). I did not run them against 1.3.2; that both flags exist there is from reading its usage text. CI ran all four jobs with
AGE_VERSION: 1.4.0.What 1.4.0 changed, and where AgeSharp stands
From the diff
v1.3.2..v1.4.0of go-age (20 commits). CLI-only changes are left out: the post-quantum warnings, the output-file check, the man pages.Already the same
armor: a line is bounded when reading (1228921). 64 MiB without a newline is refused before 1 MiB is read.Age/Format/ArmorLineFramer.cs:46refuses a line over 1,024 bytes. Checked with go-age's own test input, with and without the begin line: refused after 4,096 bytes read.plugin: control characters in a plugin's error are replaced (620b91b).Age/Recipients/PluginRecipient.cs:135andPluginIdentity.cs:156write them out throughUntrustedText.Escape.plugin: control characters in a plugin's message are replaced in the terminal UI, not in the client (620b91b).Age/Plugin/PluginPrompts.cs:62), andIPluginCallbackstells the host to replace them.agessh: the recipients have aStringmethod, the authorized_keys line without a comment (c602496).SshRsaRecipient.cs:35andSshEd25519Recipient.cs:31return the same form.internal/stream: the reader reuses one output buffer instead of allocating one per chunk (69eda84). Allocation only, no change in behaviour.Age/Crypto/DecryptStream.cs:207tells a final chunk by reading one byte ahead, so it never tries a chunk twice.)Different (left as they are; listed in TODO.md as open decisions)
p256tagv2andmlkem768p256tagv2, whose tag is computed from the whole hash of the whole recipient, and never the legacy ones. AgeSharp writes the legacyp256tagandmlkem768p256tag(Age/Recipients/AgeProtocol.cs:17-21,TaggedStanza.cs:43), whose tag uses four bytes of the hash, so files to one recipient can be linked by trying 2^32 values. Files AgeSharp writes stay readable by identities that know the legacy stanzas.BuildHeader(Age/Recipients.cs:353) has no such check. Checked: encrypting to 1,025 recipients succeeds, and reading the file then fails withheader contains more than 1024 recipient stanzas.postquantumbeside its random label. AgeSharp'sPassphrasedeclares none (Age/Recipients/Passphrase.cs:26). No file differs, since a passphrase is never mixed with another recipient; it matters to code that reads labels.age.ParsePostQuantumRecipientsandtag.ParseHybridRecipientand deprecates the functions that make or parse non-post-quantum recipients. AgeSharp has neither. Both would be public API.\nand\ton one line (Age/UntrustedText.cs:58-66).age-keygennow start from post-quantum keys. AgeSharp's README starts from X25519 (README.md:73).docs/FEATURE_COMPARISON.mdstill describes go-age 1.3.2, as of its date.