Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is the private key stored ? #6

Closed
mwid2020 opened this issue Apr 23, 2020 · 5 comments
Closed

Where is the private key stored ? #6

mwid2020 opened this issue Apr 23, 2020 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@mwid2020
Copy link

Hi,
could you include in the description/documentation where the private keys are stored and how access to them is secured ? It's quite sensitive to upload a private key, without knowing where it is going ...

Great job anyway ! Thanks !

@lucanaef
Copy link
Owner

All the data is stored locally using Apple's native Core Data framework. Therefore the keys are stored encrypted and on your device only.

Does this clarify your question?

@lucanaef lucanaef self-assigned this Apr 25, 2020
@lucanaef lucanaef added the documentation Improvements or additions to documentation label Apr 25, 2020
@mwid2020
Copy link
Author

mwid2020 commented Apr 26, 2020

Yes, thanks. Good to add it to the documentation, as it is a central question for such an app.
--> I am no expert at all in iOS dev nor in security, but I came across this post: https://security.stackexchange.com/questions/147312/is-data-stored-in-core-data-on-ios-secure
and wonder if storing the private key in the keychain would be more appropriate ?

@mwid2020 mwid2020 changed the title Where is the pk stored ? Where is the private key stored ? Apr 26, 2020
@lucanaef
Copy link
Owner

I did consider storing the private keys in the iOS Keychain. What made me decide against it, is that Apple encourages users (maybe it's even the default?) to sync the Keychain via iCloud.
While this happens end-to-end encrypted, one cannot be certain that Apple doesn't (have to) have a master key.

(This is also the reason why there is currently no option to "remember" the passphrases for private keys.)

That said, I am open for discussion on this topic.

@mwid2020
Copy link
Author

Indeed, the 'weak' point will be if and when data is stored on iCloud, either the Keychain or CoreData database.
It would be interesting to compare how other crypto apps did address this (e.g. https://github.com/status-im).

@mwid2020
Copy link
Author

mwid2020 commented Apr 27, 2020

It seems that status-im they is using the Keychain and bind the keychain to the device, so to prevent that it can be accessed on iCloud at all:
https://github.com/status-im/status-react/blob/develop/src/status_im/utils/keychain/core.cljs
--> https://developer.apple.com/documentation/security/ksecattraccessiblewhenpasscodesetthisdeviceonly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants