A CSS DVD whose main title was mis-detected as unencrypted (the up-front crack scanned the largest cell first and starved its budget in that cell's clear prefix) muxed scrambled sectors as plaintext at exit 0. CSS leaves the pack/PES header clear, so an un-descrambled sector muxes as a structurally-valid but corrupt PES packet with zero loss reported. decrypt_keys_for_title resolves a DVD title's CSS key two ways: - Fast path: reuse the scan's cracked key when its crack_span covers this title's VTS (no re-read; on a live drive no second bus-auth). - Crack: on a detection miss or a different VTS, crack from the title's OWN extents in a SINGLE scan in natural PLAYBACK ORDER (never largest-first). One scan = one CSS-locked early-bail, so a locked title is not re-hammered per cell against a live drive (hard rule #2); the 50k-sector budget is the same accepted bound the disc-wide scan uses. Cracked -> key; Unencrypted -> clear; ScrambledUncracked -> hard-fail. ensure_title_decryptable hard-fails an uncrackable DVD title even when detection missed, and passes a title that resolved its OWN valid key regardless of the disc-wide css_error. descramble_region is unchanged from v1.5.1 (validated-key seed). Also rename the unlocker report's DVD entry CSS -> DVD. Bump 1.5.2.
79 lines
2.9 KiB
TOML
79 lines
2.9 KiB
TOML
[package]
|
|
name = "libfreemkv"
|
|
version = "1.5.2"
|
|
edition = "2024"
|
|
rust-version = "1.86"
|
|
license = "MIT"
|
|
description = "Open source raw disc access library for optical drives"
|
|
repository = "https://github.com/freemkv/libfreemkv"
|
|
keywords = ["bluray", "uhd", "optical", "scsi", "disc"]
|
|
categories = ["hardware-support", "multimedia"]
|
|
# Keep internal AI-instruction / private notes out of the published crate.
|
|
exclude = ["CLAUDE.md"]
|
|
# OFF crates.io: libfreemkv git-deps freemkv-unlock (firmware, never published),
|
|
# so libfreemkv itself can only be consumed by git tag. Clients git-tag-pin it.
|
|
publish = false
|
|
|
|
[profile.release]
|
|
lto = "thin"
|
|
codegen-units = 1
|
|
|
|
[dependencies]
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
sha1 = "0.10"
|
|
sha2 = "0.10"
|
|
aes = "0.8"
|
|
cbc = "0.1"
|
|
# Interim path dep for local cross-repo dev; the release script re-pins this to
|
|
# `{ git = ".../freemkv-unlock", tag = "vX.Y.Z" }` before tagging libfreemkv (so
|
|
# the released tag resolves freemkv-unlock from git, not a sibling path).
|
|
freemkv-unlock = { git = "https://github.com/freemkv/freemkv-unlock", tag = "v1.5.1" }
|
|
num-bigint = "0.4"
|
|
num-traits = "0.2"
|
|
num-integer = "0.1"
|
|
rand = "0.8"
|
|
cmac = "0.7"
|
|
zip = { version = "2", default-features = false, features = ["deflate"] }
|
|
base64 = "0.22.1"
|
|
# Read-only XML DOM parser (pure Rust, forbid(unsafe_code), entity-expansion
|
|
# bounded). Parses the HD-DVD Advanced-Content playlist `ADV_OBJ/VPLST000.XPL`
|
|
# — untrusted disc bytes — into authoritative titles/clips/chapters. A real
|
|
# parser, not a hand-rolled scanner: the XPL is genuine XML (comments, varied
|
|
# attribute order, self-closing tags).
|
|
roxmltree = "0.20"
|
|
# Trace-level instrumentation for Disc::copy + SgIoTransport::execute. Permitted
|
|
# under CLAUDE.md ("Acceptable strings: debug/trace logging"). Consumers (autorip)
|
|
# wire a tracing subscriber and pipe events into the JSONL debug log.
|
|
tracing = "0.1"
|
|
# Bounded MPSC channel with kernel-wakeup send_timeout. Used by `io::pipeline`
|
|
# so the halt-aware send/finish loops can BLOCK on consumer drain instead of
|
|
# polling — the 50 ms poll cadence of the previous mpsc-based impl capped mux
|
|
# throughput at ~1 MB/s (0.21.7).
|
|
crossbeam-channel = "0.5"
|
|
# Persistent work-stealing thread pool for parallel AACS unit
|
|
# decryption. Per-call std::thread::scope spawned fresh OS threads
|
|
# and that overhead dominated for typical batch sizes (60 units).
|
|
# rayon's global pool initialises once on first use.
|
|
rayon = "1"
|
|
# SIMD-accelerated bytestring search. Drives the HEVC/H.264 start-code
|
|
# scan in `mux::codec::h264::find_start_code` — naive byte-by-byte
|
|
# walk is ~500 MB/s single-thread on x86_64; memchr's vectorised
|
|
# `memmem::find` for the 3-byte `00 00 01` needle hits ~5 GB/s on
|
|
# AVX2-capable hosts.
|
|
memchr = "2"
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
libc = "0.2"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
libc = "0.2"
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
|
|
[[bench]]
|
|
name = "sgio_read"
|
|
harness = false
|
|
|