{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/18121","labels_url":"https://api.github.com/repos/owncloud/core/issues/18121/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/18121/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/18121/events","html_url":"https://github.com/owncloud/core/pull/18121","id":99636940,"number":18121,"title":"use password hash to encrypt private key","user":{"login":"schiesbn","id":1589737,"avatar_url":"https://avatars.githubusercontent.com/u/1589737?v=3","gravatar_id":"","url":"https://api.github.com/users/schiesbn","html_url":"https://github.com/schiesbn","followers_url":"https://api.github.com/users/schiesbn/followers","following_url":"https://api.github.com/users/schiesbn/following{/other_user}","gists_url":"https://api.github.com/users/schiesbn/gists{/gist_id}","starred_url":"https://api.github.com/users/schiesbn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schiesbn/subscriptions","organizations_url":"https://api.github.com/users/schiesbn/orgs","repos_url":"https://api.github.com/users/schiesbn/repos","events_url":"https://api.github.com/users/schiesbn/events{/privacy}","received_events_url":"https://api.github.com/users/schiesbn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/3%20-%20To%20Review","name":"3 - To Review","color":"ededed"},{"url":"https://api.github.com/repos/owncloud/core/labels/app:encryption","name":"app:encryption","color":"02d7e1"},{"url":"https://api.github.com/repos/owncloud/core/labels/enhancement","name":"enhancement","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/37","html_url":"https://github.com/owncloud/core/milestones/8.2-current","labels_url":"https://api.github.com/repos/owncloud/core/milestones/37/labels","id":993629,"number":37,"title":"8.2-current","description":"","creator":{"login":"craigpg","id":160667,"avatar_url":"https://avatars.githubusercontent.com/u/160667?v=3","gravatar_id":"","url":"https://api.github.com/users/craigpg","html_url":"https://github.com/craigpg","followers_url":"https://api.github.com/users/craigpg/followers","following_url":"https://api.github.com/users/craigpg/following{/other_user}","gists_url":"https://api.github.com/users/craigpg/gists{/gist_id}","starred_url":"https://api.github.com/users/craigpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigpg/subscriptions","organizations_url":"https://api.github.com/users/craigpg/orgs","repos_url":"https://api.github.com/users/craigpg/repos","events_url":"https://api.github.com/users/craigpg/events{/privacy}","received_events_url":"https://api.github.com/users/craigpg/received_events","type":"User","site_admin":false},"open_issues":636,"closed_issues":291,"state":"open","created_at":"2015-02-24T16:19:37Z","updated_at":"2015-08-07T14:04:31Z","due_on":"2015-10-20T04:00:00Z","closed_at":null},"comments":6,"created_at":"2015-08-07T12:15:23Z","updated_at":"2015-08-07T14:12:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/18121","html_url":"https://github.com/owncloud/core/pull/18121","diff_url":"https://github.com/owncloud/core/pull/18121.diff","patch_url":"https://github.com/owncloud/core/pull/18121.patch"},"body":"use password hash instead of the plain password to encrypt the private key as discussed with @LukasReschke .\r\n\r\nWhat should be tested:\r\n- setup ownCloud with master\r\n- enable encryption\r\n- create recovery key (private recovery key shouldn't have \"keyFormat\" in the header)\r\n- re-login (user should have a private key which doesn't contain \"keyFormat\" in the header)\r\n- upload a encrypted file\r\n- switch to this branch\r\n- create a new user (new user should have a private key which has \"keyFormat:hash\" in the header)\r\n- check if both the new user and the old one can create new files and read existing ons\r\n- change recovery key password (new key should have  \"keyFormat:hash\" in the header)\r\n- the old user changes his password in his personal settings (updated private key should have  \"keyFormat:hash\" in the header) and he should still be able to read/write his files after re-login\r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/128710728","html_url":"https://github.com/owncloud/core/pull/18121#issuecomment-128710728","issue_url":"https://api.github.com/repos/owncloud/core/issues/18121","id":128710728,"user":{"login":"bantu","id":189375,"avatar_url":"https://avatars.githubusercontent.com/u/189375?v=3","gravatar_id":"","url":"https://api.github.com/users/bantu","html_url":"https://github.com/bantu","followers_url":"https://api.github.com/users/bantu/followers","following_url":"https://api.github.com/users/bantu/following{/other_user}","gists_url":"https://api.github.com/users/bantu/gists{/gist_id}","starred_url":"https://api.github.com/users/bantu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bantu/subscriptions","organizations_url":"https://api.github.com/users/bantu/orgs","repos_url":"https://api.github.com/users/bantu/repos","events_url":"https://api.github.com/users/bantu/events{/privacy}","received_events_url":"https://api.github.com/users/bantu/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T14:12:06Z","updated_at":"2015-08-07T14:12:06Z","body":"@LukasReschke From the point of interacting crypto primitives this is much better and proper indeed.\r\n\r\nPlease note that you already depend on phpseclib and there is PBKDF2 support in it via the setPassword() method on Crypt objects. https://github.com/phpseclib/phpseclib/blob/2.0/phpseclib/Crypt/Base.php#L536"}}