keyproof: data-free unit_key_opens predicate (gated feature)

Add `aacs::content::unit_key_opens(unit, key, format) -> bool` behind a new
non-default `keyproof` feature — one bit (key right/wrong), never plaintext —
for a private offline key-resolver (kdb). BD-TS per-packet fast reject, with a
decrypt_unit + is_clean fallback for PS/odd units. A not(keyproof)-gated
compile_fail door in keys/public_api_cannot_decrypt_aacs pins its absence by
default, so the default public API still cannot decrypt AACS (KU §2.2). Also
expose test_util::encrypt_unit alongside decrypt_unit for consumer fixtures.
Equivalence test pins the fast path to decrypt_unit + is_clean. Version left to
the release owner.
This commit is contained in:
Matthew Jackson
2026-10-07 10:17:23 -07:00
parent c0be981300
commit 33155eb9bf
6 changed files with 176 additions and 1 deletions
+6
View File
@@ -56,6 +56,12 @@ rip = [
# `test-util`: `libfreemkv::test_util` fixtures for consumers' tests (dev-dependency
# only; never in a release build). Implies the rip tree the fixtures build on.
test-util = ["rip"]
# `keyproof`: exposes `aacs::content::unit_key_opens` — a data-free key→content
# ORACLE (one bit, never plaintext) for a PRIVATE offline key-resolver (kdb).
# NOT in `default`, so the open public API still cannot decrypt AACS (KU §2.2;
# the `keys::public_api_cannot_decrypt_aacs` guard pins its absence by default).
# Needs the `rip` crypto tree (`aes`).
keyproof = ["rip"]
[dependencies]
serde = { version = "1", features = ["derive"], optional = true }