Skip to content

Update to ed25519-dalek 3, zip 9.1, base64 0.23 (0.3.0) - #66

Open
jqnatividad wants to merge 5 commits into
Kijewski:mainfrom
jqnatividad:ed25519-dalek-3
Open

jqnatividad wants to merge 5 commits into
Kijewski:mainfrom
jqnatividad:ed25519-dalek-3

Conversation

@jqnatividad

@jqnatividad jqnatividad commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Updates zipsign's dependencies to their current major versions and adds the project's first automated test. Because zipsign-api re-exports ed25519-dalek types, this is a breaking release: 0.2.2 → 0.3.0 for both zipsign-api and zipsign.

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

  • ed25519-dalek 2 → 3 (breaking for API users)
    • zipsign-api re-exports SigningKey, VerifyingKey, Signature and SignatureError. These now come from ed25519-dalek 3, so code that uses them with signature/ed25519 2.x traits needs updating.
    • The only code change: 3.0's Sha512 (sha2 0.11) no longer implements std::io::Write, so Prehash now feeds the digest via Digest::update.
    • MSRV (1.88) and edition (2024) already meet 3.0's requirements (1.85 / 2024).
  • zip 9 → 9.1, unreserved feature dropped. zip 9.1.0 fixed raw_copy_file rejecting Info-ZIP's 0x7875 extra field (raw_copy_file fails on Info-ZIP archives (0x7875 extra field) without the unreserved feature zip-rs/zip2#1077). That fix makes the workaround from Update to zip v9 #65 unnecessary.
  • base64 0.22 → 0.23.1, default features off (std only). base64 is only used for the tar signature block (about 100 bytes). The new default-on simd-unsafe feature would gain nothing there and would add unsafe code to a signing tool's dependency tree.
  • getrandom >= 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 in api/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:

    • .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 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.
    • An Info-ZIP archive with the 0x7875 extra field signs, verifies and unsigns without 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-features and cargo fmt --check are clean. Each zipsign-api feature ({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

jqnatividad and others added 4 commits October 25, 2026 08:29
* 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>
@jqnatividad jqnatividad changed the title Update to ed25519-dalek v3, drop zip unreserved feature Update to ed25519-dalek 3, zip 9.1, base64 0.23 (0.3.0) Oct 25, 2026
The 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant