Item attribute keys and values
Specify the attributes of keychain items.
Overview
In addition to the data that you want to store, keychain items also have attributes that allow you to find them later and that allow you to control how the data is used or shared.
You specify attributes as the keys and values of a dictionary. The available attribute keys are listed below. Typically, the corresponding value is a string, a number, or some other basic type, as given in each key description. In a few cases, the value comes instead from a list of a known constants. These predefined attribute values are also listed below, grouped according to the key that they serve.
Topics
General Item Attribute Keys
kSecAttrAccesskSecAttrAccessControlkSecAttrAccessiblekSecAttrAccessGroupkSecAttrSynchronizablekSecAttrCreationDatekSecAttrModificationDatekSecAttrDescriptionkSecAttrCommentkSecAttrCreatorkSecAttrTypekSecAttrLabelkSecAttrIsInvisiblekSecAttrIsNegativekSecAttrSyncViewHintkSecAttrPersistantReferencekSecAttrPersistentReferencekSecUseUserIndependentKeychain
Password Attribute Keys
kSecAttrAccountkSecAttrServicekSecAttrGenerickSecAttrSecurityDomainkSecAttrServerkSecAttrProtocolkSecAttrAuthenticationTypekSecAttrPortkSecAttrPath
Certificate Attribute Keys
kSecAttrSubjectkSecAttrIssuerkSecAttrSerialNumberkSecAttrSubjectKeyIDkSecAttrPublicKeyHashkSecAttrCertificateTypekSecAttrCertificateEncoding
Cryptographic Key Attribute Keys
kSecAttrKeyClasskSecAttrApplicationLabelkSecAttrApplicationTagkSecAttrKeyTypekSecAttrPRFkSecAttrSaltkSecAttrRoundskSecAttrKeySizeInBitskSecAttrEffectiveKeySizekSecAttrTokenID
Cryptographic Key Usage Attribute Keys
kSecAttrIsPermanentkSecAttrIsSensitivekSecAttrIsExtractablekSecAttrCanEncryptkSecAttrCanDecryptkSecAttrCanDerivekSecAttrCanSignkSecAttrCanVerifykSecAttrCanWrapkSecAttrCanUnwrap
Protocol Values
kSecAttrProtocolFTPkSecAttrProtocolFTPAccountkSecAttrProtocolHTTPkSecAttrProtocolIRCkSecAttrProtocolNNTPkSecAttrProtocolPOP3kSecAttrProtocolSMTPkSecAttrProtocolSOCKSkSecAttrProtocolIMAPkSecAttrProtocolLDAPkSecAttrProtocolAppleTalkkSecAttrProtocolAFPkSecAttrProtocolTelnetkSecAttrProtocolSSHkSecAttrProtocolFTPSkSecAttrProtocolHTTPSkSecAttrProtocolHTTPProxykSecAttrProtocolHTTPSProxykSecAttrProtocolFTPProxykSecAttrProtocolSMBkSecAttrProtocolRTSPkSecAttrProtocolRTSPProxykSecAttrProtocolDAAPkSecAttrProtocolEPPCkSecAttrProtocolIPPkSecAttrProtocolNNTPSkSecAttrProtocolLDAPSkSecAttrProtocolTelnetSkSecAttrProtocolIMAPSkSecAttrProtocolIRCSkSecAttrProtocolPOP3S
Authentication Type Values
kSecAttrAuthenticationTypeNTLMkSecAttrAuthenticationTypeMSNkSecAttrAuthenticationTypeDPAkSecAttrAuthenticationTypeRPAkSecAttrAuthenticationTypeHTTPBasickSecAttrAuthenticationTypeHTTPDigestkSecAttrAuthenticationTypeHTMLFormkSecAttrAuthenticationTypeDefault
Key Class Values
Key Type Values
kSecAttrKeyTypeRSAkSecAttrKeyTypeDSAkSecAttrKeyTypeAESkSecAttrKeyTypeDESkSecAttrKeyType3DESkSecAttrKeyTypeRC4kSecAttrKeyTypeRC2kSecAttrKeyTypeCASTkSecAttrKeyTypeECDSAkSecAttrKeyTypeECkSecAttrKeyTypeECSECPrimeRandom
Synchronizability Values
Token ID Values
Accessibility Values
kSecAttrAccessibleWhenPasscodeSetThisDeviceOnlykSecAttrAccessibleWhenUnlockedThisDeviceOnlykSecAttrAccessibleWhenUnlockedkSecAttrAccessibleAfterFirstUnlockThisDeviceOnlykSecAttrAccessibleAfterFirstUnlockkSecAttrAccessibleAlwaysThisDeviceOnlykSecAttrAccessibleAlways
Pseudorandom Function Values
kSecAttrPRFHmacAlgSHA1kSecAttrPRFHmacAlgSHA224kSecAttrPRFHmacAlgSHA256kSecAttrPRFHmacAlgSHA384kSecAttrPRFHmacAlgSHA512