Enumeration Case

kSecAccessControlPrivateKeyUsage

Enable a private key to be used in signing a block of data or verifying a signed block.

Declaration

kSecAccessControlPrivateKeyUsage = 1u << 30

Discussion

This option can be combined with any other access control flags.

You typically use this constraint when you create a key pair and store the private key inside a device’s Secure Enclave (by specifying the kSecAttrTokenID attribute with a value of kSecAttrTokenIDSecureEnclave). This makes the private key available for use in signing and verification tasks that happen inside the Secure Enclave with calls to the SecKeyRawSign and SecKeyRawVerify functions. An attempt to use this constraint while generating a key pair outside the Secure Enclave fails. Similarly, an attempt to sign a block with a private key generated without this constraint inside the Secure Enclave fails.

See Also

Additional Options

kSecAccessControlApplicationPassword

Option to use an application-provided password for data encryption key generation.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software