Architecture
CoreExtendedNFC keeps CoreNFC at the transport edge. Card protocols, models, crypto helpers, and parsers are pure Swift logic.
Sources/CoreExtendedNFC/
├── Transport/ CoreNFC tag wrappers, NFCSessionManager, CoreNFC error mapping
├── Protocol/ ISO 14443, card ID + refinement, APDU + exchange, ASN.1, NDEF, errors
├── Cards/ Family-specific command, parser, reader, and dump logic
│ ├── MiFareUltralight/, NTAG/, NTAG424/, DESFire/, FeliCa/, ISO15693/, Type4/
│ ├── IndividualNumber/ Japanese My Number card
│ ├── Transit/ Japan IC, Edy, WAON, nanaco, Octopus, Singapore CEPAS, KS X 6924, T-Union
│ └── Passport/ PACE, BAC, Secure Messaging, AA, PA, data-group parsers (CA detection only)
├── Crypto/ AES-CMAC, ISO 9797 MAC, key derivation, padding, hashing, secret redaction
├── Concurrency/ Lock-protected shared state
├── Logger/ NFCLogger, log store, payload redaction
├── Models/ Card identity, dumps, NDEF, MRZ, passport, My Number
├── Resources/ Localized strings
└── Utilities/ Hex, bytes, parity, and small data helpers
| Layer | CoreNFC import |
|---|---|
Transport/ | yes |
Protocol/ | no |
Cards/ | no |
Models/ | no |
Crypto/ | no |
Logger/ | no |
Concurrency/ | no |
Utilities/ | no |
The package depends on openssl-spm. OpenSSL is imported only by the passport code (PACEHandler and OpenSSLPACECurve, ActiveAuthenticationVerifier, SODParser and its Passive Authentication extension) for elliptic-curve PACE, Active Authentication signatures, and CMS / certification path validation.