feat(device-key): add Secure Enclave path for real iOS device (Phase 2)
Implements MM-145.AC2: Private key material is protected via Secure Enclave.
Task 1: Add OSX_10_12 feature to security-framework (3.x) in Cargo.toml.
Enables SecKey APIs and GenerateKeyOptions required for SE key generation.
Task 2: Replace real-device stubs with full SE implementation.
- get_or_create(): Generate P-256 keypair in SE, store compressed public key
and application_label in Keychain for fast path on subsequent calls.
- sign(): Retrieve SE private key by application_label, sign with ECDSA-SHA256,
convert DER to raw r||s with low-S normalization (ATProto compliance).
Task 3: Verify and validate.
- 20 simulator tests pass (7 Phase 1 device_key + 13 lib/error tests).
- iOS build compiles for aarch64-apple-ios (SE path confirmed).
- clippy: no warnings (-D warnings).
- rustfmt: all code formatted per project conventions.
Infrastructure note: Added CC_aarch64_apple_darwin and AR_aarch64_apple_darwin
to .cargo/config.toml to handle Nix cc-wrapper incompatibilities with iOS
cross-compilation (matches existing pattern for aarch64-apple-ios targets).
AC2.1 verification (persistence across cold restart) deferred to manual
device testing per implementation plan Task 3, Step 4.
AC2.2 verified by design: SecKey::new with Token::SecureEnclave is
non-extractable; attempted external_representation() on private key returns None.