{"action":"created","issue":{"url":"https://api.github.com/repos/open-keychain/open-keychain/issues/1393","labels_url":"https://api.github.com/repos/open-keychain/open-keychain/issues/1393/labels{/name}","comments_url":"https://api.github.com/repos/open-keychain/open-keychain/issues/1393/comments","events_url":"https://api.github.com/repos/open-keychain/open-keychain/issues/1393/events","html_url":"https://github.com/open-keychain/open-keychain/issues/1393","id":92427534,"number":1393,"title":"yubikey pin/admin pin thoughts","user":{"login":"Valodim","id":27813,"avatar_url":"https://avatars.githubusercontent.com/u/27813?v=3","gravatar_id":"","url":"https://api.github.com/users/Valodim","html_url":"https://github.com/Valodim","followers_url":"https://api.github.com/users/Valodim/followers","following_url":"https://api.github.com/users/Valodim/following{/other_user}","gists_url":"https://api.github.com/users/Valodim/gists{/gist_id}","starred_url":"https://api.github.com/users/Valodim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valodim/subscriptions","organizations_url":"https://api.github.com/users/Valodim/orgs","repos_url":"https://api.github.com/users/Valodim/repos","events_url":"https://api.github.com/users/Valodim/events{/privacy}","received_events_url":"https://api.github.com/users/Valodim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/open-keychain/open-keychain/labels/discussion","name":"discussion","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-01T16:28:56Z","updated_at":"2015-07-02T11:57:06Z","closed_at":null,"body":"warning, wall of text incoming :hurtrealbad: \r\n\r\nso, one important part of yubikey workflows is how we handle pin and admin pin. dominik and I discussed this, but we'd like to hear more thoughts on this if anyone cares (ping @josecastillo and @jas4711)\r\n\r\nso, a couple of general thoughts first:\r\n- usability, usability, usability. this is the prime directive.\r\n- we want to provide a truly complete solution for yubikeys at some point, the user should not have to do any part of the workflow with gpg\r\n- use of default pins (123456 or 12345678 admin) is unacceptable\r\n- 6 digits is the minimum length for pins, 8 for admin pins ([click](https://github.com/Yubico/ykneo-openpgp/blob/master/applet/src/openpgpcard/OpenPGPApplet.java#L78))\r\n- no pin is required for setup if we do a factory reset\r\n- (for the record) even though they are called \"pins\", technically any password can be used. we will stick to numeric pins though\r\n\r\nfollowing these thoughts, here's the workflow we came up with:\r\n- in the yubikey creation wizard, the yubikey will first be factory reset. this follows a \"might as well\" logic, since we don't care about special scenarios like only changing specific subkeys\r\n- we will then set the pin and admin pin to generated ones with 6 respectively 10 digits. (it makes no sense to ask the user to input their own here)\r\n- the first 6 digits of the admin pin are the same as the regular pin(!!)\r\n- the user will be asked to write down the admin pin, and in the next dialog asked to input both pins for verification\r\n\r\nthe idea here is that from a security point of view, the admin pin has strictly more privileges than the regular pin, and can be used to brute force the regular pin. if an attacker finds the written down admin pin he gains no useful information by also knowing the regular pin at that point. on the other hand, the user will have written down the regular pin implicitly, which helps remembering it later, and allows the user to look it up if they forget instead of being required to change it.\r\n\r\na thought along the way was that 4 digit pins would actually suffice since 6 digits are already hard to remember and three attempts rule out brute forcing, but this is not something we can do due to the required minimum of 6 digits."},"comment":{"url":"https://api.github.com/repos/open-keychain/open-keychain/issues/comments/118009136","html_url":"https://github.com/open-keychain/open-keychain/issues/1393#issuecomment-118009136","issue_url":"https://api.github.com/repos/open-keychain/open-keychain/issues/1393","id":118009136,"user":{"login":"Valodim","id":27813,"avatar_url":"https://avatars.githubusercontent.com/u/27813?v=3","gravatar_id":"","url":"https://api.github.com/users/Valodim","html_url":"https://github.com/Valodim","followers_url":"https://api.github.com/users/Valodim/followers","following_url":"https://api.github.com/users/Valodim/following{/other_user}","gists_url":"https://api.github.com/users/Valodim/gists{/gist_id}","starred_url":"https://api.github.com/users/Valodim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valodim/subscriptions","organizations_url":"https://api.github.com/users/Valodim/orgs","repos_url":"https://api.github.com/users/Valodim/repos","events_url":"https://api.github.com/users/Valodim/events{/privacy}","received_events_url":"https://api.github.com/users/Valodim/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T11:57:06Z","updated_at":"2015-07-02T11:57:06Z","body":"I have another question: I thought I read that some resellers preset pins and send them to the customer together with the yubikey, similar to SIM card pins. I can't find the source where I read that so I'm not sure, can you confirm or deny this?"}}