---
title: kSecAttrKeySizeInBits
framework: security
role: symbol
role_heading: Global Variable
path: security/ksecattrkeysizeinbits
---

# kSecAttrKeySizeInBits

A key whose value indicates the number of bits in a cryptographic key.

## Declaration

```swift
let kSecAttrKeySizeInBits: CFString
```

## Mentioned in

Generating New Cryptographic Keys

## Discussion

Discussion The corresponding value is of type CFNumber and indicates the total number of bits in this cryptographic key.
