{"action":"created","comment":{"url":"https://api.github.com/repos/pyca/cryptography/pulls/comments/90760228","pull_request_review_id":11279714,"id":90760228,"diff_hunk":"@@ -192,12 +192,18 @@ def test_encode_point():\n         16\n     )\n     pn = ec.EllipticCurvePublicNumbers(x, y, ec.SECP256R1())\n-    data = pn.encode_point()\n-    assert data == binascii.unhexlify(\n+\n+    uncompressed = pn.encode_point()\n+    assert uncompressed == binascii.unhexlify(\n         \"04233ea3b0027127084cd2cd336a13aeef69c598d8af61369a36454a17c6c22ae\"\n         \"c3ea2c10a84153862be4ec82940f0543f9ba866af9751a6ee79d38460b35f442e\"\n     )\n \n+    compressed = pn.encode_point(compress=True)\n+    assert compressed == binascii.unhexlify(\n+        \"02233ea3b0027127084cd2cd336a13aeef69c598d8af61369a36454a17c6c22aec\"","path":"tests/hazmat/primitives/test_ec.py","position":15,"original_position":15,"commit_id":"7061baa07d0fa13bdd91e078b6ee32b811015ea2","original_commit_id":"74691e35c4cb253f7a6ffe2c77de1ce966e95e72","user":{"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},"body":"Okay, looking at 2.3.3 I see that there are two procedures for determining the bit value that depend on the type of field. The code in this patch accounts for 2.2.1, which assumes that all supported curves are prime finite fields. cryptography also supports curves like `sect233r1` (aka NIST B-233), which is a finite field `F2m`. This code does not appear to handle that case?","created_at":"2016-12-03T16:26:22Z","updated_at":"2016-12-03T16:26:22Z","html_url":"https://github.com/pyca/cryptography/pull/3287#discussion_r90760228","pull_request_url":"https://api.github.com/repos/pyca/cryptography/pulls/3287","_links":{"self":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/comments/90760228"},"html":{"href":"https://github.com/pyca/cryptography/pull/3287#discussion_r90760228"},"pull_request":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/3287"}}},"pull_request":{"url":"https://api.github.com/repos/pyca/cryptography/pulls/3287","id":95361150,"html_url":"https://github.com/pyca/cryptography/pull/3287","diff_url":"https://github.com/pyca/cryptography/pull/3287.diff","patch_url":"https://github.com/pyca/cryptography/pull/3287.patch","issue_url":"https://api.github.com/repos/pyca/cryptography/issues/3287","number":3287,"state":"open","locked":false,"title":"add support for encoding points to...","user":{"login":"ofek","id":9677399,"avatar_url":"https://avatars.githubusercontent.com/u/9677399?v=3","gravatar_id":"","url":"https://api.github.com/users/ofek","html_url":"https://github.com/ofek","followers_url":"https://api.github.com/users/ofek/followers","following_url":"https://api.github.com/users/ofek/following{/other_user}","gists_url":"https://api.github.com/users/ofek/gists{/gist_id}","starred_url":"https://api.github.com/users/ofek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofek/subscriptions","organizations_url":"https://api.github.com/users/ofek/orgs","repos_url":"https://api.github.com/users/ofek/repos","events_url":"https://api.github.com/users/ofek/events{/privacy}","received_events_url":"https://api.github.com/users/ofek/received_events","type":"User","site_admin":false},"body":"the standard compressed format as described in [SEC 1 v2.0](http://www.secg.org/sec1-v2.pdf) section 2.3.3.","created_at":"2016-11-26T04:53:00Z","updated_at":"2016-12-03T16:26:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc31e163c518b36d7fda82b42170bb9a6a336ba8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pyca/cryptography/pulls/3287/commits","review_comments_url":"https://api.github.com/repos/pyca/cryptography/pulls/3287/comments","review_comment_url":"https://api.github.com/repos/pyca/cryptography/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pyca/cryptography/issues/3287/comments","statuses_url":"https://api.github.com/repos/pyca/cryptography/statuses/7061baa07d0fa13bdd91e078b6ee32b811015ea2","head":{"label":"ofek:compressed-pubkey-encoding","ref":"compressed-pubkey-encoding","sha":"7061baa07d0fa13bdd91e078b6ee32b811015ea2","user":{"login":"ofek","id":9677399,"avatar_url":"https://avatars.githubusercontent.com/u/9677399?v=3","gravatar_id":"","url":"https://api.github.com/users/ofek","html_url":"https://github.com/ofek","followers_url":"https://api.github.com/users/ofek/followers","following_url":"https://api.github.com/users/ofek/following{/other_user}","gists_url":"https://api.github.com/users/ofek/gists{/gist_id}","starred_url":"https://api.github.com/users/ofek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofek/subscriptions","organizations_url":"https://api.github.com/users/ofek/orgs","repos_url":"https://api.github.com/users/ofek/repos","events_url":"https://api.github.com/users/ofek/events{/privacy}","received_events_url":"https://api.github.com/users/ofek/received_events","type":"User","site_admin":false},"repo":{"id":74804479,"name":"cryptography","full_name":"ofek/cryptography","owner":{"login":"ofek","id":9677399,"avatar_url":"https://avatars.githubusercontent.com/u/9677399?v=3","gravatar_id":"","url":"https://api.github.com/users/ofek","html_url":"https://github.com/ofek","followers_url":"https://api.github.com/users/ofek/followers","following_url":"https://api.github.com/users/ofek/following{/other_user}","gists_url":"https://api.github.com/users/ofek/gists{/gist_id}","starred_url":"https://api.github.com/users/ofek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ofek/subscriptions","organizations_url":"https://api.github.com/users/ofek/orgs","repos_url":"https://api.github.com/users/ofek/repos","events_url":"https://api.github.com/users/ofek/events{/privacy}","received_events_url":"https://api.github.com/users/ofek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ofek/cryptography","description":"cryptography is a package designed to expose cryptographic primitives and recipes to Python developers.","fork":true,"url":"https://api.github.com/repos/ofek/cryptography","forks_url":"https://api.github.com/repos/ofek/cryptography/forks","keys_url":"https://api.github.com/repos/ofek/cryptography/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ofek/cryptography/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ofek/cryptography/teams","hooks_url":"https://api.github.com/repos/ofek/cryptography/hooks","issue_events_url":"https://api.github.com/repos/ofek/cryptography/issues/events{/number}","events_url":"https://api.github.com/repos/ofek/cryptography/events","assignees_url":"https://api.github.com/repos/ofek/cryptography/assignees{/user}","branches_url":"https://api.github.com/repos/ofek/cryptography/branches{/branch}","tags_url":"https://api.github.com/repos/ofek/cryptography/tags","blobs_url":"https://api.github.com/repos/ofek/cryptography/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ofek/cryptography/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ofek/cryptography/git/refs{/sha}","trees_url":"https://api.github.com/repos/ofek/cryptography/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ofek/cryptography/statuses/{sha}","languages_url":"https://api.github.com/repos/ofek/cryptography/languages","stargazers_url":"https://api.github.com/repos/ofek/cryptography/stargazers","contributors_url":"https://api.github.com/repos/ofek/cryptography/contributors","subscribers_url":"https://api.github.com/repos/ofek/cryptography/subscribers","subscription_url":"https://api.github.com/repos/ofek/cryptography/subscription","commits_url":"https://api.github.com/repos/ofek/cryptography/commits{/sha}","git_commits_url":"https://api.github.com/repos/ofek/cryptography/git/commits{/sha}","comments_url":"https://api.github.com/repos/ofek/cryptography/comments{/number}","issue_comment_url":"https://api.github.com/repos/ofek/cryptography/issues/comments{/number}","contents_url":"https://api.github.com/repos/ofek/cryptography/contents/{+path}","compare_url":"https://api.github.com/repos/ofek/cryptography/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ofek/cryptography/merges","archive_url":"https://api.github.com/repos/ofek/cryptography/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ofek/cryptography/downloads","issues_url":"https://api.github.com/repos/ofek/cryptography/issues{/number}","pulls_url":"https://api.github.com/repos/ofek/cryptography/pulls{/number}","milestones_url":"https://api.github.com/repos/ofek/cryptography/milestones{/number}","notifications_url":"https://api.github.com/repos/ofek/cryptography/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ofek/cryptography/labels{/name}","releases_url":"https://api.github.com/repos/ofek/cryptography/releases{/id}","deployments_url":"https://api.github.com/repos/ofek/cryptography/deployments","created_at":"2016-11-26T04:29:23Z","updated_at":"2016-11-26T04:29:31Z","pushed_at":"2016-12-03T16:01:32Z","git_url":"git://github.com/ofek/cryptography.git","ssh_url":"git@github.com:ofek/cryptography.git","clone_url":"https://github.com/ofek/cryptography.git","svn_url":"https://github.com/ofek/cryptography","homepage":"https://cryptography.io/","size":34391,"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":"495f21a9c61befd4a61054dd1b6080164a7400e9","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}","deployments_url":"https://api.github.com/repos/pyca/cryptography/deployments","created_at":"2013-08-07T02:23:38Z","updated_at":"2016-12-01T23:34:49Z","pushed_at":"2016-12-03T16:01:34Z","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":40172,"stargazers_count":1248,"watchers_count":1248,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":322,"mirror_url":null,"open_issues_count":72,"forks":322,"open_issues":72,"watchers":1248,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/3287"},"html":{"href":"https://github.com/pyca/cryptography/pull/3287"},"issue":{"href":"https://api.github.com/repos/pyca/cryptography/issues/3287"},"comments":{"href":"https://api.github.com/repos/pyca/cryptography/issues/3287/comments"},"review_comments":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/3287/comments"},"review_comment":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/3287/commits"},"statuses":{"href":"https://api.github.com/repos/pyca/cryptography/statuses/7061baa07d0fa13bdd91e078b6ee32b811015ea2"}}}}
{"actor":{"display_login":"reaperhulk"}}