<!-- Canonical page: https://reversedwithai.com/p/apple-encrypted-archive-aea-40008c9d -->
Canonical page: https://reversedwithai.com/p/apple-encrypted-archive-aea-40008c9d

# Reverse engineering the Apple Encrypted Archive format for a fast Xcode extractor (xaea)

> A Rust extractor for Apple's .aea archives, with the format notes written against a real Xcode archive.

xaea unpacks Apple Encrypted Archives as used for Xcode downloads. The repository carries Claude co-author trailers and claude/ pull request branches, and its format notes record where a real Apple archive differs from the public spec.

## Key facts

- Target: Apple Encrypted Archive (AEA)
- Category: File formats
- Platform: macOS, Linux
- Models: Claude Sonnet 5.5
- Tools: Rust
- Outcome: Works
- Checks: Source available: yes; Repro steps: not reported; Real hardware: not reported; Verified by others: not reported
- Author: timsutton
- Added: 2026-11-20
- Updated: 2026-11-20
- Sources reviewed: 2026-11-20 (automated reviewer)

## What was done

xaea is a command line tool that extracts .aea (Apple Encrypted Archive) files, the container Apple now uses for Xcode distribution in the Xcode 27 beta era. It targets the unencrypted, signed profile 0 case. According to the README it verifies the container, the signing chain and every segment, and extracts a 2 GiB Xcode archive in about 10.6 seconds on an M3 Max, against 40 seconds for Apple's own archiveutil.

The format was worked out against a real Apple artifact. doc/FORMAT-NOTES.md lists four errata in the public specification, such as length prefixes that include their own four bytes, and records the layout of headers, MACs and clusters. A second note file documents the performance work and rejected experiments.

AI use is visible in the history: commits carry Claude Sonnet 5.5 co-author trailers and Claude-Session lines, and pull requests come from claude/ branches. Not every commit carries a trailer. The repository ships no Apple archive; the test fixture folder is empty and only the public Apple root certificate is included. Prebuilt macOS and Linux binaries are attached to releases.

## Human work and limitations

Only a few of the 89 commits carry an AI trailer, so the share of the format analysis done by Claude cannot be measured from the history. The README does not describe the working method.

## Reproduce it

Install a release binary or run cargo install --path . (Rust 1.87 or newer), then run xaea inspect and xaea extract on an .aea file you downloaded yourself.

## AI use in the original source

- "Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>" ([source](https://github.com/timsutton/xaea/commits.atom))

Excerpts checked against the source on 2026-11-20.

## Sources

- [Repository](https://github.com/timsutton/xaea)

Figures are reported by the author and not measured by this site, except the commit history. Entry drafted with AI from the linked sources and checked against them.

Cite as: timsutton (2026). Reverse engineering the Apple Encrypted Archive format for a fast Xcode extractor (xaea). Reversed with AI. https://reversedwithai.com/p/apple-encrypted-archive-aea-40008c9d
