css: relocate the CSS bus-auth into freemkv-unlock; all 3 unlockers wired

Stage 3: the CSS bus-authentication (the challenge-response that sets the
drive's ASF=1 to unlock scrambled-sector reads, plus crypt_key + the CSS
tables) moves out of libfreemkv into the self-contained src/css module, with
its own error type. CssUnlocker impls crate::Unlocker — matches DiscKind::Css,
self-guards against a non-DVD profile, runs the bus-auth, and returns an empty
Unlocked (CSS yields no VID/bus key; the keyless Stevenson descramble stays in
libfreemkv). The keyless descramble (lfsr/stevenson) is NOT moved — that's
content decryption, the consumer's job.

all_unlockers() now returns [LibreDrive, AacsCert, CssUnlocker] — the entire
unlock layer is built. libfreemkv rewires onto it in stage 4. 89 tests pass.
This commit is contained in:
Matthew Jackson
2026-06-29 19:36:28 -07:00
parent 22130bfe12
commit 02d50664ff
4 changed files with 1048 additions and 2 deletions
+2 -2
View File
@@ -13,8 +13,8 @@
pub mod scsi;
mod aacs;
mod css;
mod ld;
// mod css; // stage 3 — CSS bus-auth
use scsi::ScsiTransport;
@@ -121,6 +121,6 @@ pub fn all_unlockers() -> Vec<Box<dyn Unlocker>> {
vec![
Box::new(ld::LibreDrive::new()),
Box::new(aacs::AacsCert::new()),
// Box::new(css::Css::new()), // stage 3
Box::new(css::CssUnlocker::new()),
]
}