Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Vendor: Apple · https://developer.apple.com/documentation/cryptokit/secureenclave · Last reviewed 2026-12-05 · History

Summary

  • Security framework: the Secure Enclave key type documented is NIST P-256 only, signatures and ECDH key agreement; kSecAttrTokenIDSecureEnclave exists since iOS 9.0 and macOS 10.12.12
  • CryptoKit SecureEnclave: P256 since iOS 13.0 and macOS 10.15; MLKEM768, MLKEM1024, MLDSA65 and MLDSA87 since 26.0 on every platform, all pure, with no hybrid type.3456
  • ML-KEM is key encapsulation and ML-DSA is signature; Apple says the ML-DSA API “can be used to build post-quantum hybrid signatures at the application code level”.7
  • No Apple document found ties these key types to passkeys, SSH or Apple Pay (checked 2026-12-05); App Attest keys are in the Secure Enclave with no algorithm named.89
  • No setting to disable P-256 Secure Enclave keys is documented; the app chooses the type (checked 2026-12-05).

The Security framework article says the Secure Enclave “works only with NIST P-256 elliptic curve keys”; no ML-KEM or ML-DSA SecKey type is documented (checked 2026-12-05).110

Key types

API Type Job Kind Since
SecKey, kSecAttrTokenIDSecureEnclave kSecAttrKeyTypeECSECPrimeRandom, 256 bits signature, ECDH classical, ECDSA P-256 iOS 9.0, iPadOS 9.0, macOS 10.12, tvOS 9.0, watchOS 2.0, visionOS 1.02
CryptoKit SecureEnclave.P256 Signing, KeyAgreement signature, ECDH classical iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.035
CryptoKit SecureEnclave.MLKEM768 PrivateKey key encapsulation pure 26.04
CryptoKit SecureEnclave.MLKEM1024 PrivateKey key encapsulation pure 26.04
CryptoKit SecureEnclave.MLDSA65 PrivateKey signature pure 26.06
CryptoKit SecureEnclave.MLDSA87 PrivateKey signature pure 26.06
  • “26.0” applies to iOS, iPadOS, Mac Catalyst, macOS, tvOS, visionOS and watchOS as listed in the documentation.46
  • MLKEM768.PrivateKey has generate(), publicKey, dataRepresentation and decapsulate(_:); MLDSA65.PrivateKey has publicKey and signature(for:), also with a context: argument.46
  • The SecureEnclave namespace lists no ML-DSA-44, no X-Wing type, no P-384 and no Curve25519 type (checked 2026-12-05).3
  • SecureEnclave.isAvailable reports whether the device supports Secure Enclave access.3

Security framework restrictions

  • Hardware: “Only iOS devices with an A7 or later processor, or a Mac with the Touch Bar and Touch ID or with an M1 or later processor support this feature.”1
  • “Can’t encode preexisting keys. You must use the Secure Enclave to create the keys.”1
  • The privateKeyUsage access control flag is needed for signing; without it key generation succeeds but signing fails.1

Uses built on it

Use What Apple documents State
Passkeys The supporting-passkeys page names no algorithm or Secure Enclave (checked 2026-12-05); see WebAuthn8 not documented
SSH keys No Apple developer page on Secure Enclave SSH keys found (checked 2026-12-05); see SSH not documented
App Attest “The device automatically stores the associated private key in the Secure Enclave”; algorithm not named9 not documented
Apple Pay No first-party page was fetched (checked 2026-12-05) not documented

Hybrid use

  • WWDC25 session 314: “The ML-DSA API can be used to build post-quantum hybrid signatures at the application code level.”7
  • The same session says X-Wing and ML-DSA “both … have Secure Enclave support”, but the SecureEnclave namespace documents no X-Wing type (checked 2026-12-05).37
  • See Apple platforms for the non-Secure-Enclave CryptoKit types XWingMLKEM768X25519, MLKEM768 and MLDSA65.

Vendor commitments

  • None dated for the Secure Enclave or keychain (checked 2026-12-05); see Apple.

References

  1. Apple Developer Documentation, “Protecting keys with the Secure Enclave”. https://developer.apple.com/documentation/security/protecting-keys-with-the-secure-enclave (accessed 2026-12-05; read from https://developer.apple.com/tutorials/data/documentation/security/protecting-keys-with-the-secure-enclave.json) ↩ ↩2 ↩3 ↩4 ↩5

  2. Apple Developer Documentation, kSecAttrTokenIDSecureEnclave. https://developer.apple.com/documentation/security/ksecattrtokenidsecureenclave (accessed 2026-12-05; availability from the matching JSON under developer.apple.com/tutorials/data/documentation/security/) and kSecAttrKeyTypeECSECPrimeRandom, same path with the lowercase name. ↩ ↩2

  3. Apple Developer Documentation, CryptoKit SecureEnclave. https://developer.apple.com/documentation/cryptokit/secureenclave (accessed 2026-12-05; JSON at https://developer.apple.com/tutorials/data/documentation/cryptokit/secureenclave.json) ↩ ↩2 ↩3 ↩4 ↩5

  4. Apple Developer Documentation, SecureEnclave.MLKEM768, SecureEnclave.MLKEM1024 and their PrivateKey. https://developer.apple.com/documentation/cryptokit/secureenclave/mlkem768 (accessed 2026-12-05; JSON files under https://developer.apple.com/tutorials/data/documentation/cryptokit/secureenclave/) ↩ ↩2 ↩3 ↩4 ↩5

  5. Apple Developer Documentation, SecureEnclave.P256. https://developer.apple.com/documentation/cryptokit/secureenclave/p256 (accessed 2026-12-05; matching JSON path) ↩ ↩2

  6. Apple Developer Documentation, SecureEnclave.MLDSA65, SecureEnclave.MLDSA87 and their PrivateKey. https://developer.apple.com/documentation/cryptokit/secureenclave/mldsa65 (accessed 2026-12-05; JSON files under the same data path) ↩ ↩2 ↩3 ↩4 ↩5

  7. Apple Developer, WWDC25 session 314, “Get ahead with quantum-secure cryptography”. https://developer.apple.com/videos/play/wwdc2025/314/ (accessed 2026-12-05) ↩ ↩2 ↩3

  8. Apple Developer Documentation, “Supporting passkeys”. https://developer.apple.com/documentation/authenticationservices/supporting-passkeys (accessed 2026-12-05; JSON has no mention of Secure Enclave, ES256, P-256 or quantum) ↩ ↩2

  9. Apple Developer Documentation, “Establishing your app’s integrity”. https://developer.apple.com/documentation/devicecheck/establishing-your-app-s-integrity (accessed 2026-12-05) ↩ ↩2

  10. Apple Developer Documentation, Security framework key type values. https://developer.apple.com/documentation/security/item-attribute-keys-and-values (accessed 2026-12-05; the key types listed are RSA, DSA, AES, DES, 3DES, RC4, RC2, CAST, ECDSA, EC and ECSECPrimeRandom) ↩


Edit: Apple Secure Enclave

If you give an email address it is recorded publicly as the author of the commit, and GitHub will link the commit to your account if that address belongs to one.

Edits are reviewed before they appear. By submitting you release your contribution under CC BY-SA 4.0. Read the editorial guidelines first.

This site uses Just the Docs, a documentation theme for Jekyll.