Commit Graph
17 Commits
Author SHA1 Message Date
fenleon 21eefe3846 ClearADI: live-capture corrections — ProvisionedData mapping, PTM layout, cpim outer message
One real OpenBubbles provisioning run under gdb (5 attempts, method + dumps in
registration/dev/clearadi/captures/WIRE-NOTES.md) pins what the previous
session left TODO(capture):

- ProvisionedData = {metadata Vec (400 B = decrypt out[4:404], len u32 BE at
  out[0]), client_secret = RNG draw 2, mid = RNG draw 3, flavor u8}; the finish
  gate is the decrypt output's out[408:440] == draw1 echo (not out[0:32])
- PTM = [u32 BE 4][seed 16][u32 BE payloadLen][payload][tail]; the decrypt
  chain seed rides in the PTM itself (finish 17f2557 rcx = ptm[4:20], live)
- cpim = a 276-byte OUTER message [u32be(5)][iv 16][u32be(160)][encout 160]
  [X 32][u32be(52)][u32be(4)][Y 52] over the 160-byte plaintext
  [len][encsec(rng2)][len][rng1][blob=mid][arg9=-2 BE][unix-seconds BE]
  [u32be(1)][12 B]; arg9 = -2 live-confirmed
- the encrypt IV is 16 plain RNG bytes (the 'IV from Spim trailing fields'
  reading was the thread-RNG pool, not the Spim)
- the spim carries 99 trailing bytes (the <=23-B cap was a probe artifact) and
  trailing[16:76] relays verbatim as the wire tail's Y group
- spim_map_signature args are (rdi=in, rsi=out) and neither its output nor the
  SHA-256(encout) digest appears on the wire — the 'two 256-bit tail fields'
  reading is falsified
- decryptPTM's math model round-trips the live PTM byte-exact (gate echo found
  at out[408])

Remaining TODO(capture): the X 32-byte group's source, the 12-byte plaintext
tail, the spim trailing's first 16 bytes. Kotlin ClearAdiFraming /
ClearAnisetteProvider restructured to the live shapes; README updated.

194 tests green (:registration:test).
2026-10-07 17:03:53 +02:00
fenleon 1b38580ad7 README: ADI anisette chain reimplemented natively; table provenance documented 2026-10-07 14:43:24 +02:00
fenleon 0c9b41e7c2 ClearADI: wire-level anisette provider — OTP derivation, provisioning, framing
Clean-room transcription of the OpenBubbles ADI white-box (unstripped Linux
.so), byte-exact against gdb-oracle vectors:

- ClearAdiOtp/ClearAdiTables: gen_otp (IOS) / gen_otp_ios (Mac) OTP ciphers,
  gen_code 2FA (SHA-1 over the 60-byte secret), 28-byte X-Apple-I-MD frame
- ClearAdiProvision: init_session, encrypt/encsec, spim_map_signature, decryptPtm
- ClearAdiFraming: asm-pinned Spim/Cpim/Ptm framing + ProvisionedData (0x78)
- ClearAnisetteProvider: GSA lookup/start/finish provisioning flow, anisette
  header map, state persistence seam
- .rodata tables embedded as base64 source (ClearAdiTablesData) — no
  Apple-derived binaries in the repo; raw bins stay untracked for dev cross-checks
- docs: spec rev 27 (OTP derivation + framing facts); unpinned wire details
  TODO(capture)

192 tests green (:registration:test).
2026-10-07 14:29:39 +02:00
fenleon 3ced0f3803 README: registration is live-validated (spec rev 26) 2026-10-05 01:00:14 +02:00
fenleon 970155a9f0 Simplify README 2026-10-05 00:57:26 +02:00
fenleon 7f960dbdfc Live-session port (2026-10-02→04): the packed courier codec (C19 closed — ALPN apns-pack-v1:4096:4096 negotiated live, packed chain anchors at the Apple Server Authentication CA intermediate, no TLS client cert on that path), the <Protocol>-span extraction for wrapped activation responses, the accepted Albert shapes (DeviceCertRequest as <data>(base64(PEM)), three-cert FairPlayCertChain), kebab-case sign-in response + client-id parsing, fresh anisette per SRP run and per 2FA call (the 434/-22421 fixes), the GSA postdata liveness client (fired AFTER the delegate sign-in, ptkn + hb-token binding), and the validation-stamp replay guard (one mint = one device record — the 409's true root cause); nullable next-hbi was already end-to-end 2026-10-05 00:22:45 +02:00
fenleon 2efd4d0f19 Add sponsor links 2026-10-04 10:28:30 +02:00
fenleon 322e24c6d2 Registration: PET fallback to the spd token map (the live-confirmed post-2FA delivery channel — the header was absent on that path); sign-in failures carry the response error shape 2026-09-29 13:25:15 +02:00
fenleon 9e00f95e3b Registration: live-verified GSA facts — au inside Status, caller-side trusted-device push (no re-trigger on validate), fresh-anisette requirement on the delegate sign-in; fixtures updated (spec rev 25) 2026-09-29 13:20:23 +02:00
fenleon e2075458b4 Spec rev 25: first live GSA login — au in Status, PET via post-2FA spd token map, trusted-device push semantics, one-time anisette, 409 ICLOUD_UNSUPPORTED_DEVICE refusal shape 2026-09-29 13:15:00 +02:00
FENN d876a9af87 Update README.md 2026-09-29 08:28:13 +02:00
FENN edd80a7e37 Update README.md 2026-09-29 08:26:59 +02:00
FENN 1c2bb0957d Update README.md 2026-09-29 08:25:23 +02:00
fenleon d6a3b515f9 Spec: restructure revision history into its own section; scrub workspace-internal paths 2026-09-29 08:16:03 +02:00
FENN 008788c408 Update README.md 2026-09-29 08:07:34 +02:00
fenleon 48d50b1b36 Add Ko-fi + GitHub Sponsors funding (FUNDING.yml + README header art) 2026-09-29 07:56:05 +02:00
fenleon bc00fa2c3d Open Madrid: clean-room Kotlin implementation of Apple's madrid (iMessage) protocol
Engine modules: :codec (binary+XML plists), :courier (APNs push client),
:ids (identity lookup), :crypto (the encryption envelope), :registration
(GSA login, albert activation, renewal), :engine (integration + live
drift probes). 344 offline tests; capture-fixture known-answer vectors
for the parsers; live unauthenticated probes validated against Apple.

The bundled FairPlay identity is a synthetic placeholder — Apple-derived
material is user-staged, never shipped. Apache-2.0.
2026-09-29 00:04:00 +02:00