keys: read damage is never a key failure; legacy key API removed

Damaged AACS units are holed, blanked and counted on every path instead
of stopping with E7013; failed batch partners fall back to side reads
and a wrong FMTS key is judged per key. ResolvedKeySet is the only AACS
decrypt door; a raw whole-disc reader never decrypts and refuses titles
with no stream folder (E6003) or a piece no held key opens (E7032).
This commit is contained in:
Matthew Jackson
2026-09-29 17:20:43 -07:00
parent 25fd393c04
commit 1d78420366
51 changed files with 2461 additions and 8541 deletions
-15
View File
@@ -545,21 +545,6 @@ fn batch_count_max_batch_sizes() {
}
}
#[test]
fn scan_encrypted_resolves_no_keys() {
// A UDF image with an /AACS directory: the lookup-free scan detects
// encryption and captures inputs, but resolves NO key on its own — a
// caller applies one later via Disc::decrypt_with.
let mut reader = MockSectorReader::new();
build_udf_with_aacs_dir(&mut reader);
let disc = Disc::scan_image(&mut reader, 1000, &ScanOptions::default()).unwrap();
// No unit keys without an external key (the mock has no Unit_Key_RO.inf to
// capture, so the keyless state isn't even built) — either way, no keys.
assert!(matches!(disc.decrypt_keys(), libfreemkv::DecryptKeys::None));
}
#[test]
fn aacs_dir_alone_marks_the_disc_encrypted_and_reports_the_capture_error() {
// Detection is an OR over `/AACS` and `/BDMV/AACS`. This fixture carries