Commit Graph

6 Commits

Author SHA1 Message Date
A ashkan@beigi.net
e054cc69c3 Add make_profile.py dev/ops CLI (generate + inspect)
scripts/make_profile.py generates a profile (v2 JSON or SAIP DER) from config.yaml
to a file or stdout, or decodes and summarizes an existing SAIP profile via
--inspect. Tests: +5 (build v2/saip, custom ids, main generate/inspect); 98 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 02:48:32 +00:00
A ashkan@beigi.net
a5fc9a3e91 SAIP: add PE-MF personalizing EF.ICCID
Prepend a PE-MF (referencing the MF "created by default" template,
OID 2.23.143.1.2.1) that personalizes EF.ICCID, so the profile sequence is now
header -> MF(EF.ICCID) -> USIM(EF.IMSI) -> AKA(Ki/OPc) -> End. 93 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 02:46:33 +00:00
A ashkan@beigi.net
470498bf07 SAIP: add PE-USIM with EF.IMSI + full-sequence decoder
The SAIP profile now personalizes EF.IMSI via a PE-USIM referencing the standard
"created by default" USIM template (OID 2.23.143.1.2.4), so the package carries
ICCID + IMSI + Ki/OPc. IMSI content uses the existing TS 31.102 enc_imsi.

Add decode_saip_profile(): splits the concatenated ProfileElements by DER TLV
boundaries and decodes each (asn1tools decodes only one value at a time).

Tests: full-sequence decode ([header, usim, akaParameter, end]) and IMSI-in-USIM
round-trip; 93 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 02:44:12 +00:00
A ashkan@beigi.net
b88fe4eed1 Add real SGP.22 SAIP profile generation (optional)
New server/saip_profile.py encodes a DER ProfileElement sequence (ProfileHeader
with ICCID + Milenage AKA parameters carrying Ki/OPc) using asn1tools against
the official PE_Definitions SAIP ASN.1 schema. It locates the schema from an
installed osmocom pySim (or SAIP_ASN_PATH) via find_spec WITHOUT importing
pySim's Python package, so it avoids the pyscard/smpp card-reader stack — the
only runtime dep is asn1tools.

Selectable via profile.format ("v2" default | "saip"); the app falls back to
profile-package-v2 with a warning when SAIP prerequisites are absent. IMSI and
other EFs (USIM-template PEs) are the documented next layer.

Add requirements-saip.txt, pytest.ini (silence asn1tools warnings), README and
config updates. Tests: +6 (encode/round-trip/credentials, app emit + fallback);
92 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 02:35:54 +00:00
A ashkan@beigi.net
fd5f650861 Write operational README
Replace the placeholder README with a full operational guide: architecture,
user flow, quick start, config table, API reference (token profile URLs,
admin-token-gated export), profile-package-v2 format, Pi/Android deployment,
core sync, security notes, testing, and project layout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 02:16:49 +00:00
Aash
f4af2193da Initial commit 2026-07-01 01:40:49 -04:00