{"action":"created","issue":{"url":"https://api.github.com/repos/voisine/breadwallet/issues/134","labels_url":"https://api.github.com/repos/voisine/breadwallet/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/voisine/breadwallet/issues/134/comments","events_url":"https://api.github.com/repos/voisine/breadwallet/issues/134/events","html_url":"https://github.com/voisine/breadwallet/issues/134","id":54481112,"number":134,"title":"PIN storage enhancements","user":{"login":"hubert3","id":947995,"avatar_url":"https://avatars.githubusercontent.com/u/947995?v=3","gravatar_id":"","url":"https://api.github.com/users/hubert3","html_url":"https://github.com/hubert3","followers_url":"https://api.github.com/users/hubert3/followers","following_url":"https://api.github.com/users/hubert3/following{/other_user}","gists_url":"https://api.github.com/users/hubert3/gists{/gist_id}","starred_url":"https://api.github.com/users/hubert3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hubert3/subscriptions","organizations_url":"https://api.github.com/users/hubert3/orgs","repos_url":"https://api.github.com/users/hubert3/repos","events_url":"https://api.github.com/users/hubert3/events{/privacy}","received_events_url":"https://api.github.com/users/hubert3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2015-01-15T17:49:19Z","updated_at":"2015-05-07T20:30:21Z","closed_at":null,"body":"Rather than storing the 4 digits of the PIN in Keychain as a plaintext value, it would be more secure to store a hash of the PIN using a slow hash function like bcrypt or scrypt.\r\n\r\nA variable work factor could be used according to the speed of the device, so that hashing the PIN the user enters would take 0.5 - 1 second.\r\n\r\nThis would mean an attacker who's dumped keychain contents is not immediately able to recover the plaintext PIN value and it would take a couple of hours on average."},"comment":{"url":"https://api.github.com/repos/voisine/breadwallet/issues/comments/100009772","html_url":"https://github.com/voisine/breadwallet/issues/134#issuecomment-100009772","issue_url":"https://api.github.com/repos/voisine/breadwallet/issues/134","id":100009772,"user":{"login":"voisine","id":316879,"avatar_url":"https://avatars.githubusercontent.com/u/316879?v=3","gravatar_id":"","url":"https://api.github.com/users/voisine","html_url":"https://github.com/voisine","followers_url":"https://api.github.com/users/voisine/followers","following_url":"https://api.github.com/users/voisine/following{/other_user}","gists_url":"https://api.github.com/users/voisine/gists{/gist_id}","starred_url":"https://api.github.com/users/voisine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voisine/subscriptions","organizations_url":"https://api.github.com/users/voisine/orgs","repos_url":"https://api.github.com/users/voisine/repos","events_url":"https://api.github.com/users/voisine/events{/privacy}","received_events_url":"https://api.github.com/users/voisine/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T20:30:21Z","updated_at":"2015-05-07T20:30:21Z","body":"@eragmus it is not trivial to jailbreak a stolen phone that you cannot unlock. (and if you can unlock it, you don't need to jailbreak it, since many people use the same pin for breadwallet) A fake finger won't help you to jailbreak since a pin code is required at startup.\r\n\r\nAlso you can't require a pin to access items stored in the keychain. User presence can be either touch id or pin. There's no option provided to require pin only.\r\n\r\n@DavidStaron the keychain is encrypted with both the users pin and unique key specific to each device which is why it can't be trivially cracked offline if you get a filesystem dump. Unfortunately using a password doesn't appreciably improve security since an attacker can simply log keys/touches when the user enters their password into the infected device."}}