---
title: kSecAttrKeyType
framework: security
role: symbol
role_heading: Global Variable
path: security/ksecattrkeytype
---

# kSecAttrKeyType

A key whose value indicates the item’s algorithm.

## Declaration

```swift
let kSecAttrKeyType: CFString
```

## Mentioned in

Generating New Cryptographic Keys

## Discussion

Discussion The corresponding value is of type CFNumber and indicates the algorithm associated with this cryptographic key. See Key Type Values for a list of valid values.
