Keychain entries of a 3rd party app are protected according their 'protection class'. For example, assigning the class 'kSecAttrAccessibleWhenUnlocked' to a keychain entry means that the entry is only accessible when the device is unlocked.
Regarding this scenario, I have the following questions:
- Am I right in assuming that the sandbox principle within iOS ensures that each 3rd party app is only allowed to access keychain entries which were created by this app?
Does iOS automatically decrypt all keychain entries with that protection class as soon as the device gets unlocked (i.e. without that the app that owns this entry actually asks for access)?
If yes is the answer to the above questions, would this mean that on a jailbroken device, a malicious application (i.e. trojan) could read EVERY keychain entry while the device is unlocked? (No sandbox on a jailbroken device means access to every keychain entry and keychain entries are in plaintext when the device is unlocked).
Thanks in advance.