Skip to content

feat(handler): add apple encrypted archive handler - #1617

Open
elektrischermoench wants to merge 1 commit into
onekey-sec:mainfrom
elektrischermoench:feat/handler-aea
Open

feat(handler): add apple encrypted archive handler#1617
elektrischermoench wants to merge 1 commit into
onekey-sec:mainfrom
elektrischermoench:feat/handler-aea

Conversation

@elektrischermoench

Copy link
Copy Markdown
Contributor

Adds a handler for Apple Encrypted Archive files (magic AEA1). Parses the auth-data TLV fields to locate the WKMS FCS key URL, fetches the session key via HPKE (P-256 / HKDF-SHA256 / AES-256-GCM), and decrypts the payload using the python-aea library. Files without embedded WKMS fields are skipped with a warning.

New dependencies: python-aea, pyhpke, asn1crypto, requests.

@elektrischermoench elektrischermoench added this to the Big Apple milestone Sep 1, 2026
@elektrischermoench elektrischermoench added format:vendor Custom vendor format enhancement New feature or request python Pull requests that update Python code format:archive labels Sep 1, 2026
@elektrischermoench
elektrischermoench force-pushed the feat/handler-aea branch 2 times, most recently from d2e706c to 685f5f0 Compare September 1, 2026 07:26
Adds a handler for Apple Encrypted Archive files (magic AEA1). Parses
the auth-data TLV fields to locate the WKMS FCS key URL, fetches the
session key via HPKE (P-256 / HKDF-SHA256 / AES-256-GCM), and
decrypts the payload using the python-aea library. Files without
embedded WKMS fields are skipped with a warning.

pyhpke, python-aea and its pyliblzfse dependency are not in nixpkgs, so
they are built from PyPI in overlay.nix.

python-aea uses enum.StrEnum without declaring a Python version bound,
which breaks the whole CLI on the 3.10 we still support. It is therefore
declared as a 3.11+ dependency and imported lazily, so on 3.10 archives
are still identified, only not decrypted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request format:archive format:vendor Custom vendor format python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant