I am struggling for some time now to find out details around how software encryption (on an app for example) works on a mobile device. I am especially interested in how the device manages the key used to encrypt given data. Is that key also encrypted with something and how it is protected. I imagine that at some point the encryption keys are encrypted with the user's unlock/PIN or something but I just assume. I would appreciate your thoughts or directions as to where I could find that. Thanks.