JMR-devandClaude Opus 4.8 259bb4d6fa Update dependencies to latest versions
Bump dependency requirements to their current latest and migrate the code for
the breaking API changes; refresh Cargo.lock for the rest.

Notable version bumps:
* zip 2 -> 8, quick-xml 0.37 -> 0.40, toml 0.8 -> 1
* windows 0.58 -> 0.62, winreg 0.52 -> 0.56
* RustCrypto: aes 0.8 -> 0.9, cbc 0.1 -> 0.2, sha1/sha2 0.10 -> 0.11,
  md-5 0.10 -> 0.11, ctr 0.9 -> 0.10, hmac 0.12 -> 0.13, pbkdf2 0.12 -> 0.13

Code migrations:
* quick-xml 0.40: BytesText::unescape() -> xml10_content();
  Attribute::unescape_value() -> normalized_value(XmlVersion::Implicit1_0)
* windows 0.62: LocalFree now takes Option<HLOCAL>
* cipher 0.5 (aes 0.9 / cbc 0.2): BlockEncryptMut/BlockDecryptMut ->
  BlockModeEncrypt/BlockModeDecrypt; encrypt_padded_mut/decrypt_padded_mut ->
  encrypt_padded/decrypt_padded

Held back deliberately: rand stays 0.8 because the latest rsa (0.9) still needs
an rand_core 0.6 RNG for keygen, which rand 0.9+ no longer provides. rsa pinning
the older RustCrypto generation also leaves a couple of duplicate transitive
versions (digest 0.10/0.11, crypto-common 0.1/0.2) — harmless.

Verified: 46 tests pass, clippy + rustfmt clean, and a real ADEPT EPUB still
decrypts end-to-end (DPAPI key extraction + RSA/AES) to a valid DRM-free file.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 20:27:43 -05:00
2026-06-24 20:13:08 -05:00

DRMLibre

A standalone, single-binary command-line tool (written in Rust, no runtime dependencies) for removing DRM from Amazon Kindle and Adobe Digital Editions ebooks. The decryption logic is ported from DeDRM_tools; DRMLibre is therefore licensed GPL-3.0-or-later. See CREDITS.md.

Use DRMLibre only on books you own, to exercise your own rights (format shifting, backup, accessibility). Respect the law in your jurisdiction.

Status

Under active development. Supported / planned formats:

Capability Status
Adobe ADEPT EPUB (+ hardening, B&N PassHash, font de-obfuscation) ✅ done
Kindle MOBI / AZW / AZW3 ✅ done
Adobe key auto-extraction from installed ADE (Windows, DPAPI) ✅ done
Kindle-for-PC key (.kinf) / Android / macOS auto-extraction planned
Kindle KFX-ZIP planned
Adobe PDF, Kindle Topaz, eReader, Kobo, LCP out of scope

On Windows with Adobe Digital Editions activated, ADEPT EPUBs decrypt with no extra arguments — the key is extracted from the local install and cached in the config for later offline use.

Usage

drmlibre remove <files...> [options]   # remove DRM
drmlibre passhash ...                   # generate/extract Adobe/B&N PassHashes
drmlibre config                         # summarize keys in the config file

Common remove options: -o/--output, --outputdir, -f/--force, --overwrite, --serial, --pid, --key, --passphrase, --android-backup, --config (default ./drmlibre.toml).

Examples:

# Adobe EPUB, using an exported Adobe key:
drmlibre remove "My Book.epub" --key adobe.der -o "My Book (no DRM).epub"

# Kindle eInk book, using the device serial:
drmlibre remove "My Book.azw" --serial 0123456789ABCDEF

Architecture

A Cargo workspace:

  • crates/drmlibre-core — the UI-agnostic engine (format detection, key management, decryptors). No printing or process exits; everything is a Result and progress goes through tracing. This is what a future GUI links.
  • crates/drmlibre-cli — the drmlibre binary (argument parsing, file I/O policy, exit codes).

Building

cargo build --release      # binary at target/release/drmlibre
cargo test                 # run the test suite
S
Description
Standalone single-binary Rust CLI to remove DRM from Amazon Kindle and Adobe Digital Editions ebooks (GPLv3).
Readme GPL-3.0
130 KiB
Languages
Rust 100%