<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoTokenKit",
  "identifier" : "/documentation/CryptoTokenKit/TKTokenKeychainKey/keyType",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CryptoTokenKit"
    ],
    "preciseIdentifier" : "c:objc(cs)TKTokenKeychainKey(py)keyType"
  },
  "title" : "keyType"
}
-->

# keyType

The type of the key. Currently, only <doc://com.apple.documentation/documentation/Security/kSecAttrKeyTypeRSA> and `kSecAttrKeyTypeECSECPrimeRandom` are supported values.

```
var keyType: String { get set }
```

## Discussion

This property is equivalent to the `kSecAttrKeyType` type attribute.

---

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)