{"action":"created","comment":{"url":"https://api.github.com/repos/pyca/cryptography/pulls/comments/42127382","id":42127382,"diff_hunk":"@@ -122,6 +122,43 @@ Elliptic Curve Signature Algorithms\n         :returns: A new instance of a :class:`EllipticCurvePublicKey`\n             provider.\n \n+Elliptic Curve Key Exchange algorithm\n+-------------------------------------\n+\n+.. class:: ECDH(algorithm)","path":"docs/hazmat/primitives/asymmetric/ec.rst","position":7,"original_position":7,"commit_id":"79b23a8d1dc0128c8d24989080bb9f27a826e487","original_commit_id":"1e60a859c7ec1a20039249ee5cb934010744903a","user":{"login":"ronf","id":1901085,"avatar_url":"https://avatars.githubusercontent.com/u/1901085?v=3","gravatar_id":"","url":"https://api.github.com/users/ronf","html_url":"https://github.com/ronf","followers_url":"https://api.github.com/users/ronf/followers","following_url":"https://api.github.com/users/ronf/following{/other_user}","gists_url":"https://api.github.com/users/ronf/gists{/gist_id}","starred_url":"https://api.github.com/users/ronf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronf/subscriptions","organizations_url":"https://api.github.com/users/ronf/orgs","repos_url":"https://api.github.com/users/ronf/repos","events_url":"https://api.github.com/users/ronf/events{/privacy}","received_events_url":"https://api.github.com/users/ronf/received_events","type":"User","site_admin":false},"body":"In the case of SSH, a KDF is used, but not directly on the shared key returned by the key exchange operation. Part of the reason for this is that several keys are generated, and so this shared key is hashed with other pieces of information to generate a unique key stream for each of the keys. That means the key exchange needs to return the raw key value to use in multiple KDF calls.\r\n\r\nPersonally, I'd rather see the KDF removed entirely here. In the case where you only need a single KDF the caller can always apply it on the key value that's returned, and that will give them more flexibility about how it is applied, allowing for things like the SSH use case where multiple KDFs are needed.","created_at":"2015-10-15T14:01:57Z","updated_at":"2015-10-15T14:01:57Z","html_url":"https://github.com/pyca/cryptography/pull/2398#discussion_r42127382","pull_request_url":"https://api.github.com/repos/pyca/cryptography/pulls/2398","_links":{"self":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/comments/42127382"},"html":{"href":"https://github.com/pyca/cryptography/pull/2398#discussion_r42127382"},"pull_request":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/2398"}}},"pull_request":{"url":"https://api.github.com/repos/pyca/cryptography/pulls/2398","id":47100273,"html_url":"https://github.com/pyca/cryptography/pull/2398","diff_url":"https://github.com/pyca/cryptography/pull/2398.diff","patch_url":"https://github.com/pyca/cryptography/pull/2398.patch","issue_url":"https://api.github.com/repos/pyca/cryptography/issues/2398","number":2398,"state":"open","locked":false,"title":"ECDH Exchange implementation","user":{"login":"simo5","id":8332609,"avatar_url":"https://avatars.githubusercontent.com/u/8332609?v=3","gravatar_id":"","url":"https://api.github.com/users/simo5","html_url":"https://github.com/simo5","followers_url":"https://api.github.com/users/simo5/followers","following_url":"https://api.github.com/users/simo5/following{/other_user}","gists_url":"https://api.github.com/users/simo5/gists{/gist_id}","starred_url":"https://api.github.com/users/simo5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simo5/subscriptions","organizations_url":"https://api.github.com/users/simo5/orgs","repos_url":"https://api.github.com/users/simo5/repos","events_url":"https://api.github.com/users/simo5/events{/privacy}","received_events_url":"https://api.github.com/users/simo5/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-08T00:41:46Z","updated_at":"2015-10-15T14:01:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d9e4692632c4cd5b48517367514734a85557aa8","assignee":null,"milestone":{"url":"https://api.github.com/repos/pyca/cryptography/milestones/12","html_url":"https://github.com/pyca/cryptography/milestones/Eleventh%20Release","labels_url":"https://api.github.com/repos/pyca/cryptography/milestones/12/labels","id":1189721,"number":12,"title":"Eleventh Release","description":"","creator":{"login":"reaperhulk","id":161495,"avatar_url":"https://avatars.githubusercontent.com/u/161495?v=3","gravatar_id":"","url":"https://api.github.com/users/reaperhulk","html_url":"https://github.com/reaperhulk","followers_url":"https://api.github.com/users/reaperhulk/followers","following_url":"https://api.github.com/users/reaperhulk/following{/other_user}","gists_url":"https://api.github.com/users/reaperhulk/gists{/gist_id}","starred_url":"https://api.github.com/users/reaperhulk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reaperhulk/subscriptions","organizations_url":"https://api.github.com/users/reaperhulk/orgs","repos_url":"https://api.github.com/users/reaperhulk/repos","events_url":"https://api.github.com/users/reaperhulk/events{/privacy}","received_events_url":"https://api.github.com/users/reaperhulk/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":19,"state":"open","created_at":"2015-07-01T21:03:39Z","updated_at":"2015-10-14T04:33:03Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/pyca/cryptography/pulls/2398/commits","review_comments_url":"https://api.github.com/repos/pyca/cryptography/pulls/2398/comments","review_comment_url":"https://api.github.com/repos/pyca/cryptography/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pyca/cryptography/issues/2398/comments","statuses_url":"https://api.github.com/repos/pyca/cryptography/statuses/79b23a8d1dc0128c8d24989080bb9f27a826e487","head":{"label":"simo5:ECDHexchange","ref":"ECDHexchange","sha":"79b23a8d1dc0128c8d24989080bb9f27a826e487","user":{"login":"simo5","id":8332609,"avatar_url":"https://avatars.githubusercontent.com/u/8332609?v=3","gravatar_id":"","url":"https://api.github.com/users/simo5","html_url":"https://github.com/simo5","followers_url":"https://api.github.com/users/simo5/followers","following_url":"https://api.github.com/users/simo5/following{/other_user}","gists_url":"https://api.github.com/users/simo5/gists{/gist_id}","starred_url":"https://api.github.com/users/simo5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simo5/subscriptions","organizations_url":"https://api.github.com/users/simo5/orgs","repos_url":"https://api.github.com/users/simo5/repos","events_url":"https://api.github.com/users/simo5/events{/privacy}","received_events_url":"https://api.github.com/users/simo5/received_events","type":"User","site_admin":false},"repo":{"id":34753046,"name":"cryptography","full_name":"simo5/cryptography","owner":{"login":"simo5","id":8332609,"avatar_url":"https://avatars.githubusercontent.com/u/8332609?v=3","gravatar_id":"","url":"https://api.github.com/users/simo5","html_url":"https://github.com/simo5","followers_url":"https://api.github.com/users/simo5/followers","following_url":"https://api.github.com/users/simo5/following{/other_user}","gists_url":"https://api.github.com/users/simo5/gists{/gist_id}","starred_url":"https://api.github.com/users/simo5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simo5/subscriptions","organizations_url":"https://api.github.com/users/simo5/orgs","repos_url":"https://api.github.com/users/simo5/repos","events_url":"https://api.github.com/users/simo5/events{/privacy}","received_events_url":"https://api.github.com/users/simo5/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simo5/cryptography","description":"cryptography is a package designed to expose cryptographic primitives and recipes to Python developers.","fork":true,"url":"https://api.github.com/repos/simo5/cryptography","forks_url":"https://api.github.com/repos/simo5/cryptography/forks","keys_url":"https://api.github.com/repos/simo5/cryptography/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simo5/cryptography/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simo5/cryptography/teams","hooks_url":"https://api.github.com/repos/simo5/cryptography/hooks","issue_events_url":"https://api.github.com/repos/simo5/cryptography/issues/events{/number}","events_url":"https://api.github.com/repos/simo5/cryptography/events","assignees_url":"https://api.github.com/repos/simo5/cryptography/assignees{/user}","branches_url":"https://api.github.com/repos/simo5/cryptography/branches{/branch}","tags_url":"https://api.github.com/repos/simo5/cryptography/tags","blobs_url":"https://api.github.com/repos/simo5/cryptography/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simo5/cryptography/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simo5/cryptography/git/refs{/sha}","trees_url":"https://api.github.com/repos/simo5/cryptography/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simo5/cryptography/statuses/{sha}","languages_url":"https://api.github.com/repos/simo5/cryptography/languages","stargazers_url":"https://api.github.com/repos/simo5/cryptography/stargazers","contributors_url":"https://api.github.com/repos/simo5/cryptography/contributors","subscribers_url":"https://api.github.com/repos/simo5/cryptography/subscribers","subscription_url":"https://api.github.com/repos/simo5/cryptography/subscription","commits_url":"https://api.github.com/repos/simo5/cryptography/commits{/sha}","git_commits_url":"https://api.github.com/repos/simo5/cryptography/git/commits{/sha}","comments_url":"https://api.github.com/repos/simo5/cryptography/comments{/number}","issue_comment_url":"https://api.github.com/repos/simo5/cryptography/issues/comments{/number}","contents_url":"https://api.github.com/repos/simo5/cryptography/contents/{+path}","compare_url":"https://api.github.com/repos/simo5/cryptography/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simo5/cryptography/merges","archive_url":"https://api.github.com/repos/simo5/cryptography/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simo5/cryptography/downloads","issues_url":"https://api.github.com/repos/simo5/cryptography/issues{/number}","pulls_url":"https://api.github.com/repos/simo5/cryptography/pulls{/number}","milestones_url":"https://api.github.com/repos/simo5/cryptography/milestones{/number}","notifications_url":"https://api.github.com/repos/simo5/cryptography/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simo5/cryptography/labels{/name}","releases_url":"https://api.github.com/repos/simo5/cryptography/releases{/id}","created_at":"2015-04-28T20:04:21Z","updated_at":"2015-04-28T20:04:28Z","pushed_at":"2015-10-15T03:34:49Z","git_url":"git://github.com/simo5/cryptography.git","ssh_url":"git@github.com:simo5/cryptography.git","clone_url":"https://github.com/simo5/cryptography.git","svn_url":"https://github.com/simo5/cryptography","homepage":"https://cryptography.io/","size":31366,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pyca:master","ref":"master","sha":"af3ea78c9ad85cc0688797eb0da8f828812f3f49","user":{"login":"pyca","id":5615737,"avatar_url":"https://avatars.githubusercontent.com/u/5615737?v=3","gravatar_id":"","url":"https://api.github.com/users/pyca","html_url":"https://github.com/pyca","followers_url":"https://api.github.com/users/pyca/followers","following_url":"https://api.github.com/users/pyca/following{/other_user}","gists_url":"https://api.github.com/users/pyca/gists{/gist_id}","starred_url":"https://api.github.com/users/pyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyca/subscriptions","organizations_url":"https://api.github.com/users/pyca/orgs","repos_url":"https://api.github.com/users/pyca/repos","events_url":"https://api.github.com/users/pyca/events{/privacy}","received_events_url":"https://api.github.com/users/pyca/received_events","type":"Organization","site_admin":false},"repo":{"id":11939484,"name":"cryptography","full_name":"pyca/cryptography","owner":{"login":"pyca","id":5615737,"avatar_url":"https://avatars.githubusercontent.com/u/5615737?v=3","gravatar_id":"","url":"https://api.github.com/users/pyca","html_url":"https://github.com/pyca","followers_url":"https://api.github.com/users/pyca/followers","following_url":"https://api.github.com/users/pyca/following{/other_user}","gists_url":"https://api.github.com/users/pyca/gists{/gist_id}","starred_url":"https://api.github.com/users/pyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyca/subscriptions","organizations_url":"https://api.github.com/users/pyca/orgs","repos_url":"https://api.github.com/users/pyca/repos","events_url":"https://api.github.com/users/pyca/events{/privacy}","received_events_url":"https://api.github.com/users/pyca/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pyca/cryptography","description":"cryptography is a package designed to expose cryptographic primitives and recipes to Python developers.","fork":false,"url":"https://api.github.com/repos/pyca/cryptography","forks_url":"https://api.github.com/repos/pyca/cryptography/forks","keys_url":"https://api.github.com/repos/pyca/cryptography/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyca/cryptography/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyca/cryptography/teams","hooks_url":"https://api.github.com/repos/pyca/cryptography/hooks","issue_events_url":"https://api.github.com/repos/pyca/cryptography/issues/events{/number}","events_url":"https://api.github.com/repos/pyca/cryptography/events","assignees_url":"https://api.github.com/repos/pyca/cryptography/assignees{/user}","branches_url":"https://api.github.com/repos/pyca/cryptography/branches{/branch}","tags_url":"https://api.github.com/repos/pyca/cryptography/tags","blobs_url":"https://api.github.com/repos/pyca/cryptography/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyca/cryptography/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyca/cryptography/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyca/cryptography/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyca/cryptography/statuses/{sha}","languages_url":"https://api.github.com/repos/pyca/cryptography/languages","stargazers_url":"https://api.github.com/repos/pyca/cryptography/stargazers","contributors_url":"https://api.github.com/repos/pyca/cryptography/contributors","subscribers_url":"https://api.github.com/repos/pyca/cryptography/subscribers","subscription_url":"https://api.github.com/repos/pyca/cryptography/subscription","commits_url":"https://api.github.com/repos/pyca/cryptography/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyca/cryptography/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyca/cryptography/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyca/cryptography/issues/comments{/number}","contents_url":"https://api.github.com/repos/pyca/cryptography/contents/{+path}","compare_url":"https://api.github.com/repos/pyca/cryptography/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyca/cryptography/merges","archive_url":"https://api.github.com/repos/pyca/cryptography/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyca/cryptography/downloads","issues_url":"https://api.github.com/repos/pyca/cryptography/issues{/number}","pulls_url":"https://api.github.com/repos/pyca/cryptography/pulls{/number}","milestones_url":"https://api.github.com/repos/pyca/cryptography/milestones{/number}","notifications_url":"https://api.github.com/repos/pyca/cryptography/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyca/cryptography/labels{/name}","releases_url":"https://api.github.com/repos/pyca/cryptography/releases{/id}","created_at":"2013-08-07T02:23:38Z","updated_at":"2015-10-14T14:02:01Z","pushed_at":"2015-10-15T03:34:50Z","git_url":"git://github.com/pyca/cryptography.git","ssh_url":"git@github.com:pyca/cryptography.git","clone_url":"https://github.com/pyca/cryptography.git","svn_url":"https://github.com/pyca/cryptography","homepage":"https://cryptography.io/","size":46595,"stargazers_count":840,"watchers_count":840,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":201,"mirror_url":null,"open_issues_count":91,"forks":201,"open_issues":91,"watchers":840,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/2398"},"html":{"href":"https://github.com/pyca/cryptography/pull/2398"},"issue":{"href":"https://api.github.com/repos/pyca/cryptography/issues/2398"},"comments":{"href":"https://api.github.com/repos/pyca/cryptography/issues/2398/comments"},"review_comments":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/2398/comments"},"review_comment":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/2398/commits"},"statuses":{"href":"https://api.github.com/repos/pyca/cryptography/statuses/79b23a8d1dc0128c8d24989080bb9f27a826e487"}}}}