Support encrypted .sideconf SideStore account files - #29
Open
thamerszx-source wants to merge 1 commit into
Open
thamerszx-source wants to merge 1 commit into
thamerszx-source wants to merge 1 commit into
Conversation
SideStore 2.0 changed its account export twice: the JSON keys were renamed
(`adiPB`/`local_user` -> `anisetteAdiBlob`/`anisetteIdentifier`), the Apple ID
password became optional, and the file is now written as an encrypted
`.sideconf` container instead of plain JSON. Importing such an export failed
with an opaque JSON decoding error.
SideStoreAccount now decodes both the legacy and the 2.0 key names and treats
the Apple ID password as optional. SideStoreConfigurationFile reads the
`.sideconf` container: a 16 byte salt followed by an AES-GCM sealed box, keyed
with PBKDF2-HMAC-SHA256 over the file password (10 000 iterations, 32 bytes),
matching SideStore's own ImportExport.swift and scripts/sideconf/decrypt_sideconf.py.
The file type is detected by attempting to parse the payload as JSON rather
than by sniffing the first byte, since a container whose salt happens to start
with "{" would otherwise be misread as a legacy export.
In Settings, the importer now accepts .sideconf files, prompts for the file
password when the payload is encrypted, and reports distinct errors for a wrong
password, a missing field and a malformed file. When the export omits the Apple
ID password, the confirmation says so instead of implying the account is ready
to sign in.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Owner
|
Thanks, however since the sidestore 0.6.4 is still under rapid development, the format of exported account might change at anytime. We might add support for encrypted sidestore account after a stable version is released. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SideStore 2.0 changed its account export twice: the JSON keys were renamed (
adiPB/local_user->anisetteAdiBlob/anisetteIdentifier), the Apple ID password became optional, and the file is now written as an encrypted.sideconfcontainer instead of plain JSON. Importing such an export failed with an opaque JSON decoding error.SideStoreAccount now decodes both the legacy and the 2.0 key names and treats the Apple ID password as optional. SideStoreConfigurationFile reads the
.sideconfcontainer: a 16 byte salt followed by an AES-GCM sealed box, keyed with PBKDF2-HMAC-SHA256 over the file password (10 000 iterations, 32 bytes), matching SideStore's own ImportExport.swift and scripts/sideconf/decrypt_sideconf.py.The file type is detected by attempting to parse the payload as JSON rather than by sniffing the first byte, since a container whose salt happens to start with "{" would otherwise be misread as a legacy export.
In Settings, the importer now accepts .sideconf files, prompts for the file password when the payload is encrypted, and reports distinct errors for a wrong password, a missing field and a malformed file. When the export omits the Apple ID password, the confirmation says so instead of implying the account is ready to sign in.
FULLY CLAUDE GENERATED COMMIT, I TESTED IT.