<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/kSecAttrTokenIDSecureEnclave",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@kSecAttrTokenIDSecureEnclave"
  },
  "title" : "kSecAttrTokenIDSecureEnclave"
}
-->

# kSecAttrTokenIDSecureEnclave

Specifies an item should be stored in the device’s Secure Enclave.

```
let kSecAttrTokenIDSecureEnclave: CFString
```

## Discussion

The only keychain items supported by the Secure Enclave are 256-bit elliptic curve private keys (those that have key type [`kSecAttrKeyTypeEC`](/documentation/Security/kSecAttrKeyTypeEC)). Such keys must be generated directly on the Secure Enclave using the [`SecKeyGeneratePair(_:_:_:)`](/documentation/Security/SecKeyGeneratePair(_:_:_:)) function with the [`kSecAttrTokenID`](/documentation/Security/kSecAttrTokenID) key set to [`kSecAttrTokenIDSecureEnclave`](/documentation/Security/kSecAttrTokenIDSecureEnclave) in the parameters dictionary.

> Important:
> It is not possible to import pre-existing keys into the Secure Enclave.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)