Questions tagged [keychain]

A keychain is an encrypted container that holds passwords for multiple applications and secure services. Apple Inc. uses keychains as password management system in Mac OS and iOS.

Keychain is Apple Inc.'s password management system in Mac OS and iOS. It was introduced with Mac OS 8.6, and has been included in all subsequent versions of Mac OS, including Mac OS X. A Keychain can contain various types of data: passwords (for Websites, FTP servers, SSH accounts, network shares, wireless networks, groupware applications, encrypted disk images), private keys, certificates, and secure notes.

In Mac OS X, keychain files are stored in ~/Library/Keychains/, /Library/Keychains/, and /Network/Library/Keychains/, and the Keychain Access GUI application is located in the Utilities folder in the Applications folder. It is free, open source software released under the terms of the APSL. The command line equivalent of Keychain Access is /usr/bin/security. The keychain file(s) stores a variety of data fields including a title, URL, notes and password. Other than Secure Notes created with Keychain Access, only the password is encrypted, with Triple DES. The contents of Secure Notes are also encrypted.

Source: Keychain

1969 questions
36
votes
1 answer

Keychain: Item reported as errSecItemNotFound, but receive errSecDuplicateItem on addition

This issue has been bugging me for a while, and I hope someone has insight as to the cause of this. Essentially, I have a small percentage of users who are unable to save/update items to the keychain. The problematic flow of control is as…
WDUK
  • 18,870
  • 3
  • 64
  • 72
35
votes
5 answers

Keychain Query Always Returns errSecItemNotFound After Upgrading to iOS 13

I am storing passwords into the iOS keychain and later retrieving them to implement a "remember me" (auto-login) feature on my app. I implemented my own wrapper around the Security.framework functions (SecItemCopyMatching(), etc.), and it was…
Nicolas Miari
  • 16,006
  • 8
  • 81
  • 189
34
votes
2 answers

How to see the keychain for iphone simulator

I have developed an iPhone application in which I am encrypting and decrypting data using public and private key. I want to see this keys in the Keychain. I got the keychain entry for mac applications under Applications/utilities, but what is the…
Himanshu
  • 431
  • 1
  • 5
  • 6
32
votes
7 answers

Save and retrieve value via KeyChain

I'm trying to store an Integer and retrieve it using KeyChain. This is how I save it: func SaveNumberOfImagesTaken() { let key = "IMAGE_TAKEN" var taken = 10 let data = NSKeyedArchiver.archivedDataWithRootObject(taken) …
Roi Mulia
  • 5,626
  • 11
  • 54
  • 105
32
votes
6 answers

SecItemCopyMatching for Touch ID without passcode fallback

I am using SecItemCopyMatching to fetch a keychain item protected by Touch ID. However, if Touch ID unlocking fails (or the user selects "Enter Passcode"), I want to present my own PIN-entry UI. I do not want the user to be presented with the system…
jnic
  • 8,695
  • 3
  • 33
  • 47
32
votes
6 answers

+entityForName: nil is not a legal NSManagedObjectContext parameter searching for entity name 'Account''

I have tried a lot of options, but can't find the solution for this problem. I created a Core Data file and named the entity Account, Created an string attribute called username. Then edited the class of the entity to NSManagedObject, not sure if…
ferrojr
  • 339
  • 2
  • 4
  • 9
32
votes
3 answers

Can an iOS app read its own entitlements at runtime?

Can an iOS app discover, inspect, or otherwise read its own entitlements at runtime? Ideally, I could read the whole (processed) contents of my .entitlements file as a plist. Getting just the app identifier prefix would be an acceptable…
rgeorge
  • 7,385
  • 2
  • 31
  • 41
30
votes
11 answers

Is there a way to remove the authorization prompt from command-line instances of Instruments (Xcode)?

I am currently using Instruments via a bash script to initiate the command-line interface to start up runs of the Automation plug-in. With 4.2, this worked well enough, however with the upgrade to Xcode 4.3, I am now being prompted for an…
Darc
  • 696
  • 1
  • 6
  • 14
30
votes
2 answers

Remove private key from Mac OS X keychain using Terminal

I've imported a developer identity (certificate + private key) for iOS development to a keychain using the "security" Terminal application with the command security import identity.p12 -k -P This imports both items included…
Benjamin
  • 830
  • 1
  • 8
  • 16
30
votes
7 answers

Error saving in the keychain with iphone sdk

I use the Apple wraper for the keychain, and try to save a item on it (running in simulator, ios 4.1). I have not experience with the keychain before. I get this error: Couldn't add the Keychain Item. Error - 25299 In KeychainItemWrapper.m line…
mamcx
  • 15,916
  • 26
  • 101
  • 189
30
votes
1 answer

Save data in Keychain only accessible with Touch ID in Swift 3

I'm working on a peace of code that should do the following: Store some data in Keychain. Get the data only if a user authenticates with Touch ID or Pass Code. I watched the Keychain and Authentication with Touch ID presentation and understood the…
David Gatti
  • 3,576
  • 3
  • 33
  • 64
30
votes
4 answers

Slow app compilation with new Sierra update

When I updated my mac to macOS Sierra 10.12.1 time of running application on real device significantly increased. "Run custom script 'Embed Pods Frameworks'" and "Copy Swift standard libraries" take more then 30 minutes to build. Do someone face…
psu
  • 304
  • 3
  • 10
29
votes
7 answers

No valid iOS code signing keys found in keychain

I can Archive and Publish an app in debug mode, but when switched to App Mode i get the following error: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: No valid iOS code signing keys found in…
amun1000
  • 453
  • 1
  • 8
  • 18
29
votes
8 answers

iOS Keychain writing value results in error code -34018

I have an iOS application that stores some sensitive information in the keychain. While writing values into the keychain, I am getting error code -34018. I am currently using Apple's iOS KeyChainItemWrapper class. Both of the following lines of code…
Rohit Nisal
  • 291
  • 1
  • 3
  • 4
29
votes
7 answers

Can I access the keychain on the iPhone?

This question discusses encrypting data on the iPhone using the crypt() function. As an alternative, is there a keychain on the iPhone and if so, what code would I use to access it in order to store login details and then retrieve them for us in an…
davidmytton
  • 38,604
  • 37
  • 87
  • 93