Commit Graph
9 Commits
Author SHA1 Message Date
fenleon ebabd37aef NAC sign closed: full validation stamp computes pure-code from inputs; README updated
The tail threshold cipher and pre-init region closed via empirical fit
against the 270 checkpointed rounds — pure-Python model (no emulator, no
captures) reproduces sig16 and the full 517-B stamp byte-exact (verify
20/20, independently re-verified). Spec rev 30 residue line corrected;
README: anisette chain now includes the NAC mint (Kotlin signature port
next).
2026-10-08 18:18:18 +02:00
fenleon 6e50bf6602 NAC mint (C5): pear_aes + blob/framing decoded byte-exact; Kotlin PearAes/NacMerge/NacValidation; spec rev 30
- pear_aes white-box (9-round CBC, custom whitening/final maps, establish_key
  T-transform) byte-exact vs 3 live runs; domergestep2 21/21; key_establishment
  EstablishKeyResponse wire pinned.
- Full 517-B validation stamp computes byte-exact from (cert, session, rng_pad,
  body, rand16); SignState::sign structurally decoded (stages 1-9 hand-verified,
  tail cipher checkpointed) — the capture-free tail transcription is the one
  open residue; mint(sig16) takes the signature as a parameter.
- Kotlin: generated PearTablesData/PearTables (base64 table image), PearAes,
  NacMerge, NacValidation; 206 tests green (synthetic vectors, no Apple bytes).
- Spec rev 30; method/findings in gitignored registration/dev/clearadi/captures/.
2026-10-08 07:14:50 +02:00
fenleon 77b9819de7 ClearADI cpim tail closed: X = SHA-256(encout || sig(trailing[0:16]) || const) — wire fully pinned
Two further live provisioning runs (gdb_prov8/9) close the last three
TODO(capture) items of the cpim:

- X (the 32-byte tail group) = SHA-256(encout || spim_map_signature(
  trailing[0:16]) || fixed 24-byte filler), written to the wire byte-exact;
  verified against both runs.
- The signature input is the spim trailing's first 16 bytes (server
  material, varies per session) — the earlier 'constant block' reading was
  a stale session's value; the signature model matches the live output
  exactly.
- The 12-byte plaintext tail is 12 fresh RNG bytes (same thread-RNG pool
  construction as the IV).
- trailing[0:16] and the sig/digest 'nowhere on the wire' mystery resolved:
  both ride transitively through X.

Kotlin: CpimShaTailSeal (the pinned production seal) wired as the provider
default; doc comments updated; one synthetic-vector test. Spec rev 29.
195 tests green.
2026-10-07 18:13:23 +02:00
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 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 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 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
fenleon d6a3b515f9 Spec: restructure revision history into its own section; scrub workspace-internal paths 2026-09-29 08:16:03 +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