{"action":"created","comment":{"url":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/comments/33866983","id":33866983,"diff_hunk":"@@ -427,6 +435,34 @@ of {{RFC7515}}.  If the value of a \"nonce\" header parameter is not\n valid according to this encoding, then the verifier MUST reject the\n JWS as malformed.\n \n+## Key Agreement\n+\n+Certain elements of the protocol will require the establishment of a shared secret between the client and the server, in such a way that an entity observing the ACME protocol cannot derive the secret.  In these cases, we use a simple ECDH key exchange, based on the system used by CMS {{RFC5753}}:\n+\n+* Inputs:\n+  * Client-generated key pair\n+  * Server-generated key pair\n+  * Length of the shared secret to be derived\n+  * Label\n+* Perform the ECDH primitive operation to obtain Z (Section 3.3.1 of {{SEC1}})\n+* Select a hash algorithm according to the curve being used:\n+  * For \"P-256\", use SHA-256\n+  * For \"P-384\", use SHA-384\n+  * For \"P-512\", use SHA-512\n+* Derive the shared secret value using the KDF in Section 3.6.1 of {{SEC1}} using Z and the selected hash algorithm, and with the UTF-8 encoding of the label as the SharedInfo value","path":"draft-barnes-acme.md","position":67,"original_position":67,"commit_id":"d15e3df61f73f196c1ad0290d5a90d17eb7479df","original_commit_id":"d15e3df61f73f196c1ad0290d5a90d17eb7479df","user":{"login":"bifurcation","id":75597,"avatar_url":"https://avatars.githubusercontent.com/u/75597?v=3","gravatar_id":"","url":"https://api.github.com/users/bifurcation","html_url":"https://github.com/bifurcation","followers_url":"https://api.github.com/users/bifurcation/followers","following_url":"https://api.github.com/users/bifurcation/following{/other_user}","gists_url":"https://api.github.com/users/bifurcation/gists{/gist_id}","starred_url":"https://api.github.com/users/bifurcation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bifurcation/subscriptions","organizations_url":"https://api.github.com/users/bifurcation/orgs","repos_url":"https://api.github.com/users/bifurcation/repos","events_url":"https://api.github.com/users/bifurcation/events{/privacy}","received_events_url":"https://api.github.com/users/bifurcation/received_events","type":"User","site_admin":false},"body":"Scaling the hash seemed to match other existing precedent, e.g., [Suite B](https://www.nsa.gov/ia/programs/suiteb_cryptography/):\r\n\r\n> Curve P-256 for SECRET ... Curve P-384 for TOP SECRET ...\r\n> SHA-256 for SECRET ... SHA-384 for TOP SECRET ...\r\n\r\nUnless you have a reason *not* to scale the hash, I'm going to keep it as is.\r\n\r\nIt is 521.","created_at":"2015-07-03T14:22:35Z","updated_at":"2015-07-03T14:22:35Z","html_url":"https://github.com/letsencrypt/acme-spec/pull/169#discussion_r33866983","pull_request_url":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/169","_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/comments/33866983"},"html":{"href":"https://github.com/letsencrypt/acme-spec/pull/169#discussion_r33866983"},"pull_request":{"href":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/169"}}},"pull_request":{"url":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/169","id":39106571,"html_url":"https://github.com/letsencrypt/acme-spec/pull/169","diff_url":"https://github.com/letsencrypt/acme-spec/pull/169.diff","patch_url":"https://github.com/letsencrypt/acme-spec/pull/169.patch","issue_url":"https://api.github.com/repos/letsencrypt/acme-spec/issues/169","number":169,"state":"open","locked":false,"title":"Re-add token-based and contact-based recovery","user":{"login":"bifurcation","id":75597,"avatar_url":"https://avatars.githubusercontent.com/u/75597?v=3","gravatar_id":"","url":"https://api.github.com/users/bifurcation","html_url":"https://github.com/bifurcation","followers_url":"https://api.github.com/users/bifurcation/followers","following_url":"https://api.github.com/users/bifurcation/following{/other_user}","gists_url":"https://api.github.com/users/bifurcation/gists{/gist_id}","starred_url":"https://api.github.com/users/bifurcation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bifurcation/subscriptions","organizations_url":"https://api.github.com/users/bifurcation/orgs","repos_url":"https://api.github.com/users/bifurcation/repos","events_url":"https://api.github.com/users/bifurcation/events{/privacy}","received_events_url":"https://api.github.com/users/bifurcation/received_events","type":"User","site_admin":false},"body":"This PR re-adds contact- and token-based recovery in ways that are (1) MitM resistant, and (2) more compatible with RESTification.  As a side-effect, it adds a key agreement method that we will probably re-use in the redesigned DNS challenge.","created_at":"2015-07-02T17:26:48Z","updated_at":"2015-07-03T14:22:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29cb31d57a8443bb2d62c3268dbb82ba81aca17a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/169/commits","review_comments_url":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/169/comments","review_comment_url":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/letsencrypt/acme-spec/issues/169/comments","statuses_url":"https://api.github.com/repos/letsencrypt/acme-spec/statuses/d15e3df61f73f196c1ad0290d5a90d17eb7479df","head":{"label":"letsencrypt:recover-reg","ref":"recover-reg","sha":"d15e3df61f73f196c1ad0290d5a90d17eb7479df","user":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"repo":{"id":25449702,"name":"acme-spec","full_name":"letsencrypt/acme-spec","owner":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/letsencrypt/acme-spec","description":"ACME Specification","fork":false,"url":"https://api.github.com/repos/letsencrypt/acme-spec","forks_url":"https://api.github.com/repos/letsencrypt/acme-spec/forks","keys_url":"https://api.github.com/repos/letsencrypt/acme-spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/letsencrypt/acme-spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/letsencrypt/acme-spec/teams","hooks_url":"https://api.github.com/repos/letsencrypt/acme-spec/hooks","issue_events_url":"https://api.github.com/repos/letsencrypt/acme-spec/issues/events{/number}","events_url":"https://api.github.com/repos/letsencrypt/acme-spec/events","assignees_url":"https://api.github.com/repos/letsencrypt/acme-spec/assignees{/user}","branches_url":"https://api.github.com/repos/letsencrypt/acme-spec/branches{/branch}","tags_url":"https://api.github.com/repos/letsencrypt/acme-spec/tags","blobs_url":"https://api.github.com/repos/letsencrypt/acme-spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/letsencrypt/acme-spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/letsencrypt/acme-spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/letsencrypt/acme-spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/letsencrypt/acme-spec/statuses/{sha}","languages_url":"https://api.github.com/repos/letsencrypt/acme-spec/languages","stargazers_url":"https://api.github.com/repos/letsencrypt/acme-spec/stargazers","contributors_url":"https://api.github.com/repos/letsencrypt/acme-spec/contributors","subscribers_url":"https://api.github.com/repos/letsencrypt/acme-spec/subscribers","subscription_url":"https://api.github.com/repos/letsencrypt/acme-spec/subscription","commits_url":"https://api.github.com/repos/letsencrypt/acme-spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/letsencrypt/acme-spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/letsencrypt/acme-spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/letsencrypt/acme-spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/letsencrypt/acme-spec/contents/{+path}","compare_url":"https://api.github.com/repos/letsencrypt/acme-spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/letsencrypt/acme-spec/merges","archive_url":"https://api.github.com/repos/letsencrypt/acme-spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/letsencrypt/acme-spec/downloads","issues_url":"https://api.github.com/repos/letsencrypt/acme-spec/issues{/number}","pulls_url":"https://api.github.com/repos/letsencrypt/acme-spec/pulls{/number}","milestones_url":"https://api.github.com/repos/letsencrypt/acme-spec/milestones{/number}","notifications_url":"https://api.github.com/repos/letsencrypt/acme-spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/letsencrypt/acme-spec/labels{/name}","releases_url":"https://api.github.com/repos/letsencrypt/acme-spec/releases{/id}","created_at":"2014-10-20T03:43:00Z","updated_at":"2015-07-02T21:19:53Z","pushed_at":"2015-07-02T22:19:48Z","git_url":"git://github.com/letsencrypt/acme-spec.git","ssh_url":"git@github.com:letsencrypt/acme-spec.git","clone_url":"https://github.com/letsencrypt/acme-spec.git","svn_url":"https://github.com/letsencrypt/acme-spec","homepage":null,"size":1500,"stargazers_count":805,"watchers_count":805,"language":"Makefile","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":68,"mirror_url":null,"open_issues_count":28,"forks":68,"open_issues":28,"watchers":805,"default_branch":"master"}},"base":{"label":"letsencrypt:master","ref":"master","sha":"3616378cce145a6161ac09636311ed785d22fefe","user":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"repo":{"id":25449702,"name":"acme-spec","full_name":"letsencrypt/acme-spec","owner":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/letsencrypt/acme-spec","description":"ACME Specification","fork":false,"url":"https://api.github.com/repos/letsencrypt/acme-spec","forks_url":"https://api.github.com/repos/letsencrypt/acme-spec/forks","keys_url":"https://api.github.com/repos/letsencrypt/acme-spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/letsencrypt/acme-spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/letsencrypt/acme-spec/teams","hooks_url":"https://api.github.com/repos/letsencrypt/acme-spec/hooks","issue_events_url":"https://api.github.com/repos/letsencrypt/acme-spec/issues/events{/number}","events_url":"https://api.github.com/repos/letsencrypt/acme-spec/events","assignees_url":"https://api.github.com/repos/letsencrypt/acme-spec/assignees{/user}","branches_url":"https://api.github.com/repos/letsencrypt/acme-spec/branches{/branch}","tags_url":"https://api.github.com/repos/letsencrypt/acme-spec/tags","blobs_url":"https://api.github.com/repos/letsencrypt/acme-spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/letsencrypt/acme-spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/letsencrypt/acme-spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/letsencrypt/acme-spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/letsencrypt/acme-spec/statuses/{sha}","languages_url":"https://api.github.com/repos/letsencrypt/acme-spec/languages","stargazers_url":"https://api.github.com/repos/letsencrypt/acme-spec/stargazers","contributors_url":"https://api.github.com/repos/letsencrypt/acme-spec/contributors","subscribers_url":"https://api.github.com/repos/letsencrypt/acme-spec/subscribers","subscription_url":"https://api.github.com/repos/letsencrypt/acme-spec/subscription","commits_url":"https://api.github.com/repos/letsencrypt/acme-spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/letsencrypt/acme-spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/letsencrypt/acme-spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/letsencrypt/acme-spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/letsencrypt/acme-spec/contents/{+path}","compare_url":"https://api.github.com/repos/letsencrypt/acme-spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/letsencrypt/acme-spec/merges","archive_url":"https://api.github.com/repos/letsencrypt/acme-spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/letsencrypt/acme-spec/downloads","issues_url":"https://api.github.com/repos/letsencrypt/acme-spec/issues{/number}","pulls_url":"https://api.github.com/repos/letsencrypt/acme-spec/pulls{/number}","milestones_url":"https://api.github.com/repos/letsencrypt/acme-spec/milestones{/number}","notifications_url":"https://api.github.com/repos/letsencrypt/acme-spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/letsencrypt/acme-spec/labels{/name}","releases_url":"https://api.github.com/repos/letsencrypt/acme-spec/releases{/id}","created_at":"2014-10-20T03:43:00Z","updated_at":"2015-07-02T21:19:53Z","pushed_at":"2015-07-02T22:19:48Z","git_url":"git://github.com/letsencrypt/acme-spec.git","ssh_url":"git@github.com:letsencrypt/acme-spec.git","clone_url":"https://github.com/letsencrypt/acme-spec.git","svn_url":"https://github.com/letsencrypt/acme-spec","homepage":null,"size":1500,"stargazers_count":805,"watchers_count":805,"language":"Makefile","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":68,"mirror_url":null,"open_issues_count":28,"forks":68,"open_issues":28,"watchers":805,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/169"},"html":{"href":"https://github.com/letsencrypt/acme-spec/pull/169"},"issue":{"href":"https://api.github.com/repos/letsencrypt/acme-spec/issues/169"},"comments":{"href":"https://api.github.com/repos/letsencrypt/acme-spec/issues/169/comments"},"review_comments":{"href":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/169/comments"},"review_comment":{"href":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/letsencrypt/acme-spec/pulls/169/commits"},"statuses":{"href":"https://api.github.com/repos/letsencrypt/acme-spec/statuses/d15e3df61f73f196c1ad0290d5a90d17eb7479df"}}}}