I want the user to use their RSA private key via file sharing to store in my App's document directory. It is ok if the user has access to the RSA private key, but I don't want anyone else to have access to it. Is this a good idea and if not how can I get the user's to store his/her RSA private key in my App securely.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You need to use the keychain
to store sensitive information like private keys.
https://developer.apple.com/library/ios/documentation/Security/Conceptual/cryptoservices/KeyManagementAPIs/KeyManagementAPIs.html
Do not attempt to roll your own solution ... iOS has already done the hard work for you (~properly).
Using the keychain
will protect your data from other apps.
If you want to do this for OS X rather that iOS, then take a look at
https://developer.apple.com/library/ios/documentation/Security/Conceptual/keychainServConcepts/03tasks/tasks.html#//apple_ref/doc/uid/TP30000897-CH205-TP9