MattJackson
ce8ddb48bb
DriveProfile with all per-drive fields, drive.rs uses init() as single entry
...
DriveProfile now has every field traced from firmware:
- drive_signature, unlock_init_value, unlock_response_size_minus_init
- ld_microcode (base64, ~1888B firmware payload)
- hardware_register_a_cdb, hardware_register_b_cdb (10B pre-built CDBs)
- drive_nominal_speed_cdb (12B calibration speed)
- speed_zone_table (28B), speed_calc_table (25B)
drive.rs simplified:
- open() calls init() instead of unlock()
- init() is the ONLY entry point — handles full dispatch sequence internally
- Removed read_config, read_register, maintain_speed, read_sectors from public API
- Added set_read_speed() for per-zone speed during content reads
- disc.rs updated to call init() instead of unlock()
Compiles clean, all tests pass.
2026-04-08 20:15:25 -07:00
MattJackson
da0eeae6a7
AACS 2.0: P-256 curve, SHA-256 ECDSA, bus decryption pipeline
...
- Added P-256/secp256r1 curve constants
- Added AACS 2.0 LA public key for drive cert verification
- Implemented P-256 ECDSA sign/verify (SHA-256)
- Implemented P-256 ECDH for bus key derivation
- Added aacs2_authenticate() entry point (falls back to AACS 1.0)
- Extended HostCert with optional v2 credentials
- Added sha2 dependency
- Added keydb updater (HTTP GET via raw TCP, zip/gzip extraction)
- 4 new P-256 tests: generator, order, ECDSA, ECDH — all passing
- 32 total tests passing
2026-04-07 21:30:09 -07:00
MattJackson
ca732d57e7
Bump to v0.4.1
2026-04-07 21:01:31 -07:00
MattJackson
2bea69c7d9
Release v0.4.0: labels rewrite, eject, capture fix
2026-04-07 20:35:11 -07:00
MattJackson
237528b385
Add macOS SCSI support via IOKit SCSITaskDeviceInterface
...
IOKit backend for macOS optical drives. Accepts BSD device paths
(/dev/disk2), walks IORegistry to find authoring device, sends
SCSI commands through SCSITaskDeviceInterface COM vtable.
2026-04-07 13:15:06 -07:00
MattJackson
5fa6b064da
Remove standalone binaries — functionality lives in freemkv CLI and tests
...
Deleted:
- freemkv_info.rs — duplicate of freemkv drive-info CLI command
- freemkv_test.rs — duplicate of bdemu capture-disc
- aacs_test.rs — covered by inline #[test] functions (31 tests)
libfreemkv is a library. CLI tools belong in the freemkv repo.
Dev/debug tools belong in (internal).
2026-04-07 12:34:10 -07:00
MattJackson
9825db82aa
AACS complete: Unit_Key_RO.inf parser, disc hash, MKB processing, resolve chain
...
- Unit_Key_RO.inf: proper parser matching libaacs format (uk_pos, stride,
AACS1 48-byte / AACS2 64-byte key spacing, title→CPS unit mapping)
- Disc hash: SHA1 of Unit_Key_RO.inf for KEYDB lookup
- MKB processing: processing keys + subdiff records + cvalues → media key
(verify media key record with 12-byte zero check)
- Content Certificate parser: detect AACS version + bus encryption flag
- resolve_keys(): full 3-path chain:
1. disc hash → KEYDB → VUK (fast, 99% of discs)
2. KEYDB media key + VID → VUK
3. MKB + processing keys → media key → VUK
- setup_aacs() now reads Unit_Key_RO.inf + Content Cert from disc via UDF
- 31 tests passing
2026-04-07 11:13:20 -07:00
MattJackson
985d00f0a4
AACS 2.0 full pipeline: handshake, bus key, decrypt, transparent API
...
- aacs.rs: content decryption (AES-CBC aligned units, bus decrypt, VUK
derivation, unit key decrypt). 11 tests including synthetic roundtrip.
- aacs_handshake.rs: SCSI authentication (ECDH on AACS 160-bit curve,
ECDSA sign/verify, AES-CMAC, bus key derivation, read_data_key).
14 tests including EC order, ECDH shared secret, cert verification.
- disc.rs: transparent API — Disc::scan() detects AACS, authenticates,
derives keys internally. ContentReader decrypts on the fly. App never
sees AACS details.
- error.rs: AacsError (E7000) variant
BF v12 complete: 284 unique matches from 8 AWS instances.
2026-04-06 20:40:52 -07:00
MattJackson
37ee573014
Add JAR parser: extract audio/subtitle labels from BD-J menus
...
Scans BDMV/JAR/*.jar class files for track label patterns:
eng_MLP_ → TrueHD, eng_ADES_US_ → Descriptive Audio (US)
dan_PGStream4 → Danish subtitles
Solves the "3x AC-3 English" problem — we identify Descriptive Audio, commentary, compatibility tracks.
Future: set MKV "visual impaired" flag automatically during mux.
Local only — needs more disc samples to validate before publishing.
2026-04-06 16:09:30 -07:00
MattJackson
dd0f49fa3d
v0.3.0: disc format parsers (UDF 2.50, MPLS, CLPI), typed stream API
2026-04-06 15:50:56 -07:00
MattJackson
509cdf6ea7
v0.2.1: update crates.io README, version check in release CI
2026-04-06 12:19:39 -07:00
MattJackson
3a0ea29cf7
v0.2.0: Chipset architecture, platform-agnostic SCSI, no gatekeeping
...
Breaking changes from v0.1.2:
- PlatformType enum removed, replaced by Chipset (MediaTek, Renesas)
- DriveProfile.platform removed, replaced by .chipset + .unlock_mode + .unlock_buf_id
- DriveProfile.supported field removed — no gatekeeping
- ReadinessStatus enum removed
- DriveMatch enum removed
- SgIoTransport::open() replaced by scsi::open() (platform-agnostic)
- profiles.json: "program" field replaced by "chipset" + "unlock_mode" + "unlock_buf_id"
New:
- scsi::open() with cfg gates for Linux/macOS/Windows
- Compiles on macOS (stub returns platform-not-supported)
- libc dependency conditional on Linux only
2026-04-06 11:41:26 -07:00
MattJackson
ddcb614777
v0.1.2: 206 supported drives (was 141)
...
Fixed firmware database unpacker offset bug — recovered 65 additional drives.
All code.files verified: identical code (676 bytes), variable data.
Signature at offset 0x35C confirmed correct for all 8 code sizes.
mt1959_a (mode=1, buf=0x44): 65 drives
mt1959_b (mode=2, buf=0x77): 141 drives
2026-04-06 10:42:12 -07:00
MattJackson
4f0303dcc9
v0.1.1: clean profiles, SPC-4/MMC-6 field names
2026-04-06 10:00:13 -07:00
MattJackson
b9ea1d29dd
libfreemkv v0.1.0 — Open source 4K UHD / Blu-ray / DVD drive library
...
Features:
- Open drive identification via SPC-4 INQUIRY + MMC-6 GET CONFIGURATION
- 141 supported drives with bundled profiles
- MT1959 platform: unlock, calibrate, raw sector reads
- DriveSpeed enum: BD1x-BD12x, DVD1x-DVD16x
- Field names follow SPC-4 §6.4.2 and MMC-6 §5.3.10 standards
- No proprietary fingerprints — open matching by SCSI fields
- Zero config: profiles compiled into binary
Tested on real hardware: HL-DT-ST BD-RE BU40N 1.03
2026-04-06 10:00:00 -07:00