Repository navigation
Update to ed25519-dalek 3, zip 9.1, base64 0.23 (0.3.0) - #66
Open
jqnatividad wants to merge 5 commits into
Open
jqnatividad wants to merge 5 commits into
jqnatividad wants to merge 5 commits into
Conversation
* ed25519-dalek 2.0 -> 3.0. Its `Sha512` (sha2 0.11) no longer implements `io::Write`, so `Prehash` feeds the digest via `Digest::update`. Signatures and keys are compatible with 0.2.x in both directions. * zipsign-api re-exports ed25519-dalek types, so this is a breaking change: bump zipsign-api and zipsign to 0.3.0. * Require zip 9.1 and drop the `unreserved` feature. zip 9.1 fixed `raw_copy_file` rejecting Info-ZIP's 0x7875 extra field (zip-rs/zip2#1077). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixtures in api/tests/fixtures/cross-version/ were signed by the zipsign 0.2.2 CLI (ed25519-dalek 2) with a throwaway test-only key. The test checks that: * .zip and .tar.gz files signed by 0.2.2 still verify, * detached signatures and signed .tar.gz output are byte-identical to 0.2.2's (ed25519 is deterministic, so 0.2.2 verifies ours), and * an Info-ZIP archive with the 0x7875 extra field signs, verifies and unsigns without zip's `unreserved` feature. Passes on both main (ed25519-dalek 2.2) and this branch (3.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
base64 is only used to encode/decode the tar signature block (about 100 bytes), so the new default-on `simd-unsafe` feature gains nothing and would only add unsafe code to a signing tool's dependency tree. Disable default features and keep `std`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The `>= 0.3.0, < 0.5.0` range already resolved to 0.4, which zip and tempfile also use, so state it explicitly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
unreserved featureThe fixtures are signed byte-for-byte. On Windows, `core.autocrlf` converted `message.txt` to CRLF on checkout, so the detached-signature test signed different bytes and failed. Mark the fixtures `-text`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 25, 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.
Updates zipsign's dependencies to their current major versions and adds the project's first automated test. Because
zipsign-apire-exports ed25519-dalek types, this is a breaking release: 0.2.2 → 0.3.0 for bothzipsign-apiandzipsign.Signatures and keys are unchanged. Files and keys from 0.2.x work with 0.3.0, and the reverse. The new test checks this.
Dependency updates
zipsign-apire-exportsSigningKey,VerifyingKey,SignatureandSignatureError. These now come from ed25519-dalek 3, so code that uses them withsignature/ed255192.x traits needs updating.Sha512(sha2 0.11) no longer implementsstd::io::Write, soPrehashnow feeds the digest viaDigest::update.unreservedfeature dropped. zip 9.1.0 fixedraw_copy_filerejecting Info-ZIP's 0x7875 extra field (raw_copy_file fails on Info-ZIP archives (0x7875 extra field) without theunreservedfeature zip-rs/zip2#1077). That fix makes the workaround from Update to zip v9 #65 unnecessary.stdonly). base64 is only used for the tar signature block (about 100 bytes). The new default-onsimd-unsafefeature would gain nothing there and would add unsafe code to a signing tool's dependency tree.>= 0.3, < 0.5→0.4. The range already resolved to 0.4, which zip and tempfile also use, so the requirement now says so.All other dependencies (clap, tempfile, thiserror, normalize-path, pretty-error-debug) already allow their latest releases.
Testing
New
api/tests/cross_version.rs. Its fixtures inapi/tests/fixtures/cross-version/were signed by the 0.2.2 CLI (ed25519-dalek 2) with a throwaway test-only key. The test checks that:.zipand.tar.gzfiles signed by 0.2.2 still verify..tar.gzoutput are byte-identical to 0.2.2's. Ed25519 signing is deterministic, so this also proves 0.2.2 verifies files signed by 0.3.0. The tar check also covers the base64-encoded signature block.unreserved.It passes on both
main(ed25519-dalek 2.2) and this branch (3.0). The fixtures are included in the published crate.cargo build,cargo clippy --all-targets --all-featuresandcargo fmt --checkare clean. Eachzipsign-apifeature ({sign,unsign,verify}-{zip,tar}) builds on its own.I also checked by hand with the 0.2.2 and 0.3.0 CLI builds: keys generated by either version work with the other, and a wrong key is rejected.
🤖 Generated with Claude Code