{"action":"created","comment":{"url":"https://api.github.com/repos/micahflee/onionshare/pulls/comments/217265616","pull_request_review_id":154935219,"id":217265616,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzI2NTYxNg==","diff_hunk":"@@ -0,0 +1,107 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"\n+OnionShare | https://onionshare.org/\n+\n+Copyright (C) 2017 Micah Lee <micah@micahflee.com>\n+\n+This program is free software: you can redistribute it and/or modify\n+it under the terms of the GNU General Public License as published by\n+the Free Software Foundation, either version 3 of the License, or\n+(at your option) any later version.\n+\n+This program is distributed in the hope that it will be useful,\n+but WITHOUT ANY WARRANTY; without even the implied warranty of\n+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+GNU General Public License for more details.\n+\n+You should have received a copy of the GNU General Public License\n+along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+\"\"\"\n+\n+import base64\n+import hashlib\n+import os\n+\n+import nacl.signing\n+\n+from Crypto.PublicKey import RSA\n+\n+from cryptography.hazmat.backends import default_backend\n+from cryptography.hazmat.primitives import serialization\n+from cryptography.hazmat.primitives.asymmetric import rsa\n+\n+\n+b = 256\n+\n+def bit(h, i):\n+    return (h[i // 8] >> (i % 8)) & 1\n+\n+\n+def encodeint(y):\n+    bits = [(y >> i) & 1 for i in range(b)]\n+    return b''.join([bytes([(sum([bits[i * 8 + j] << j for j in range(8)]))]) for i in range(b // 8)])\n+\n+\n+def H(m):\n+    return hashlib.sha512(m).digest()\n+\n+\n+def expandSK(sk):","path":"onionshare/onionkey.py","position":49,"original_position":49,"commit_id":"a61cde05085156c83ddd0d8464c929cc0adff240","original_commit_id":"a61cde05085156c83ddd0d8464c929cc0adff240","user":{"login":"maqp","id":7425650,"node_id":"MDQ6VXNlcjc0MjU2NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/7425650?v=4","gravatar_id":"","url":"https://api.github.com/users/maqp","html_url":"https://github.com/maqp","followers_url":"https://api.github.com/users/maqp/followers","following_url":"https://api.github.com/users/maqp/following{/other_user}","gists_url":"https://api.github.com/users/maqp/gists{/gist_id}","starred_url":"https://api.github.com/users/maqp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maqp/subscriptions","organizations_url":"https://api.github.com/users/maqp/orgs","repos_url":"https://api.github.com/users/maqp/repos","events_url":"https://api.github.com/users/maqp/events{/privacy}","received_events_url":"https://api.github.com/users/maqp/received_events","type":"User","site_admin":false},"body":"Ah, very well. Thank you!","created_at":"2018-09-13T05:46:17Z","updated_at":"2018-09-13T05:46:17Z","html_url":"https://github.com/micahflee/onionshare/pull/575#discussion_r217265616","pull_request_url":"https://api.github.com/repos/micahflee/onionshare/pulls/575","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/micahflee/onionshare/pulls/comments/217265616"},"html":{"href":"https://github.com/micahflee/onionshare/pull/575#discussion_r217265616"},"pull_request":{"href":"https://api.github.com/repos/micahflee/onionshare/pulls/575"}},"in_reply_to_id":216965750},"pull_request":{"url":"https://api.github.com/repos/micahflee/onionshare/pulls/575","id":165540524,"node_id":"MDExOlB1bGxSZXF1ZXN0MTY1NTQwNTI0","html_url":"https://github.com/micahflee/onionshare/pull/575","diff_url":"https://github.com/micahflee/onionshare/pull/575.diff","patch_url":"https://github.com/micahflee/onionshare/pull/575.patch","issue_url":"https://api.github.com/repos/micahflee/onionshare/issues/575","number":575,"state":"closed","locked":false,"title":"[WIP] Support v3 onions","user":{"login":"mig5","id":99173,"node_id":"MDQ6VXNlcjk5MTcz","avatar_url":"https://avatars2.githubusercontent.com/u/99173?v=4","gravatar_id":"","url":"https://api.github.com/users/mig5","html_url":"https://github.com/mig5","followers_url":"https://api.github.com/users/mig5/followers","following_url":"https://api.github.com/users/mig5/following{/other_user}","gists_url":"https://api.github.com/users/mig5/gists{/gist_id}","starred_url":"https://api.github.com/users/mig5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mig5/subscriptions","organizations_url":"https://api.github.com/users/mig5/orgs","repos_url":"https://api.github.com/users/mig5/repos","events_url":"https://api.github.com/users/mig5/events{/privacy}","received_events_url":"https://api.github.com/users/mig5/received_events","type":"User","site_admin":false},"body":"As per #461 \r\n\r\nThis is not quite ready but I thought I'd put it up in advance.\r\n\r\nIt features the pre-generation of private keys by @maqp which seems to solve some weird issues I had with persistent v3 private keys. That work will also be useful for the 'startup timer' by being able to show the URL 'early' without having to share a persistent share just to obtain the persistent URL for later (not yet implemented).\r\n\r\nA few things I still need to do here:\r\n\r\n~~~1) Make it clear to a user of v2 persistent URLs that they need to remove their persistent URL if they want to upgrade to v3 (if their Tor supports it) - we don't want to surpruse them by destroying their existing v2 private key in favour of v3 (but we favour v3 otherwise)~~~\r\n\r\n2) See if I can remove the dependency on pycrypto - I am using that module to determine if the existing v2 persistent private key is 1024 bits or not. I'm sure the cryptography module that we introduced for pre-generating keys, can do this, but I haven't looked yet\r\n\r\n~~~3) Test the stealth mode with v2 since we pre-generate the auth cookie too now (as per 1), because it will be useful for 'showing early' pre-share ) but it should be fine~~~\r\n\r\n4) Probably some cleanup/doublechecking module versions/package names in the install/requirements*.txt and BUILD.md\r\n\r\n5) Testing on macOS or Windows (only Linux so far, with a custom compiled tor 0.3.3 alpha)\r\n","created_at":"2018-01-27T22:42:05Z","updated_at":"2018-09-13T05:46:17Z","closed_at":"2018-01-28T07:10:23Z","merged_at":null,"merge_commit_sha":"74a214d51804b93030a2dd3b9f6261d7a8a44754","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":804003258,"node_id":"MDU6TGFiZWw4MDQwMDMyNTg=","url":"https://api.github.com/repos/micahflee/onionshare/labels/PR%20needs%20more%20work","name":"PR needs more work","color":"d93f0b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/micahflee/onionshare/pulls/575/commits","review_comments_url":"https://api.github.com/repos/micahflee/onionshare/pulls/575/comments","review_comment_url":"https://api.github.com/repos/micahflee/onionshare/pulls/comments{/number}","comments_url":"https://api.github.com/repos/micahflee/onionshare/issues/575/comments","statuses_url":"https://api.github.com/repos/micahflee/onionshare/statuses/a61cde05085156c83ddd0d8464c929cc0adff240","head":{"label":"mig5:prop224","ref":"prop224","sha":"a61cde05085156c83ddd0d8464c929cc0adff240","user":{"login":"mig5","id":99173,"node_id":"MDQ6VXNlcjk5MTcz","avatar_url":"https://avatars2.githubusercontent.com/u/99173?v=4","gravatar_id":"","url":"https://api.github.com/users/mig5","html_url":"https://github.com/mig5","followers_url":"https://api.github.com/users/mig5/followers","following_url":"https://api.github.com/users/mig5/following{/other_user}","gists_url":"https://api.github.com/users/mig5/gists{/gist_id}","starred_url":"https://api.github.com/users/mig5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mig5/subscriptions","organizations_url":"https://api.github.com/users/mig5/orgs","repos_url":"https://api.github.com/users/mig5/repos","events_url":"https://api.github.com/users/mig5/events{/privacy}","received_events_url":"https://api.github.com/users/mig5/received_events","type":"User","site_admin":false},"repo":{"id":91660317,"node_id":"MDEwOlJlcG9zaXRvcnk5MTY2MDMxNw==","name":"onionshare","full_name":"mig5/onionshare","owner":{"login":"mig5","id":99173,"node_id":"MDQ6VXNlcjk5MTcz","avatar_url":"https://avatars2.githubusercontent.com/u/99173?v=4","gravatar_id":"","url":"https://api.github.com/users/mig5","html_url":"https://github.com/mig5","followers_url":"https://api.github.com/users/mig5/followers","following_url":"https://api.github.com/users/mig5/following{/other_user}","gists_url":"https://api.github.com/users/mig5/gists{/gist_id}","starred_url":"https://api.github.com/users/mig5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mig5/subscriptions","organizations_url":"https://api.github.com/users/mig5/orgs","repos_url":"https://api.github.com/users/mig5/repos","events_url":"https://api.github.com/users/mig5/events{/privacy}","received_events_url":"https://api.github.com/users/mig5/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mig5/onionshare","description":"Securely and anonymously share a file of any size","fork":true,"url":"https://api.github.com/repos/mig5/onionshare","forks_url":"https://api.github.com/repos/mig5/onionshare/forks","keys_url":"https://api.github.com/repos/mig5/onionshare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mig5/onionshare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mig5/onionshare/teams","hooks_url":"https://api.github.com/repos/mig5/onionshare/hooks","issue_events_url":"https://api.github.com/repos/mig5/onionshare/issues/events{/number}","events_url":"https://api.github.com/repos/mig5/onionshare/events","assignees_url":"https://api.github.com/repos/mig5/onionshare/assignees{/user}","branches_url":"https://api.github.com/repos/mig5/onionshare/branches{/branch}","tags_url":"https://api.github.com/repos/mig5/onionshare/tags","blobs_url":"https://api.github.com/repos/mig5/onionshare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mig5/onionshare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mig5/onionshare/git/refs{/sha}","trees_url":"https://api.github.com/repos/mig5/onionshare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mig5/onionshare/statuses/{sha}","languages_url":"https://api.github.com/repos/mig5/onionshare/languages","stargazers_url":"https://api.github.com/repos/mig5/onionshare/stargazers","contributors_url":"https://api.github.com/repos/mig5/onionshare/contributors","subscribers_url":"https://api.github.com/repos/mig5/onionshare/subscribers","subscription_url":"https://api.github.com/repos/mig5/onionshare/subscription","commits_url":"https://api.github.com/repos/mig5/onionshare/commits{/sha}","git_commits_url":"https://api.github.com/repos/mig5/onionshare/git/commits{/sha}","comments_url":"https://api.github.com/repos/mig5/onionshare/comments{/number}","issue_comment_url":"https://api.github.com/repos/mig5/onionshare/issues/comments{/number}","contents_url":"https://api.github.com/repos/mig5/onionshare/contents/{+path}","compare_url":"https://api.github.com/repos/mig5/onionshare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mig5/onionshare/merges","archive_url":"https://api.github.com/repos/mig5/onionshare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mig5/onionshare/downloads","issues_url":"https://api.github.com/repos/mig5/onionshare/issues{/number}","pulls_url":"https://api.github.com/repos/mig5/onionshare/pulls{/number}","milestones_url":"https://api.github.com/repos/mig5/onionshare/milestones{/number}","notifications_url":"https://api.github.com/repos/mig5/onionshare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mig5/onionshare/labels{/name}","releases_url":"https://api.github.com/repos/mig5/onionshare/releases{/id}","deployments_url":"https://api.github.com/repos/mig5/onionshare/deployments","created_at":"2017-05-18T07:03:58Z","updated_at":"2018-09-05T05:51:12Z","pushed_at":"2018-09-13T02:30:01Z","git_url":"git://github.com/mig5/onionshare.git","ssh_url":"git@github.com:mig5/onionshare.git","clone_url":"https://github.com/mig5/onionshare.git","svn_url":"https://github.com/mig5/onionshare","homepage":"https://onionshare.org/","size":6183,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"micahflee:master","ref":"master","sha":"a068bf45180d6a31d6fe60de8e6af3726db3ddf3","user":{"login":"micahflee","id":156128,"node_id":"MDQ6VXNlcjE1NjEyOA==","avatar_url":"https://avatars3.githubusercontent.com/u/156128?v=4","gravatar_id":"","url":"https://api.github.com/users/micahflee","html_url":"https://github.com/micahflee","followers_url":"https://api.github.com/users/micahflee/followers","following_url":"https://api.github.com/users/micahflee/following{/other_user}","gists_url":"https://api.github.com/users/micahflee/gists{/gist_id}","starred_url":"https://api.github.com/users/micahflee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micahflee/subscriptions","organizations_url":"https://api.github.com/users/micahflee/orgs","repos_url":"https://api.github.com/users/micahflee/repos","events_url":"https://api.github.com/users/micahflee/events{/privacy}","received_events_url":"https://api.github.com/users/micahflee/received_events","type":"User","site_admin":false},"repo":{"id":19997634,"node_id":"MDEwOlJlcG9zaXRvcnkxOTk5NzYzNA==","name":"onionshare","full_name":"micahflee/onionshare","owner":{"login":"micahflee","id":156128,"node_id":"MDQ6VXNlcjE1NjEyOA==","avatar_url":"https://avatars3.githubusercontent.com/u/156128?v=4","gravatar_id":"","url":"https://api.github.com/users/micahflee","html_url":"https://github.com/micahflee","followers_url":"https://api.github.com/users/micahflee/followers","following_url":"https://api.github.com/users/micahflee/following{/other_user}","gists_url":"https://api.github.com/users/micahflee/gists{/gist_id}","starred_url":"https://api.github.com/users/micahflee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micahflee/subscriptions","organizations_url":"https://api.github.com/users/micahflee/orgs","repos_url":"https://api.github.com/users/micahflee/repos","events_url":"https://api.github.com/users/micahflee/events{/privacy}","received_events_url":"https://api.github.com/users/micahflee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/micahflee/onionshare","description":"Securely and anonymously share a file of any size","fork":false,"url":"https://api.github.com/repos/micahflee/onionshare","forks_url":"https://api.github.com/repos/micahflee/onionshare/forks","keys_url":"https://api.github.com/repos/micahflee/onionshare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micahflee/onionshare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micahflee/onionshare/teams","hooks_url":"https://api.github.com/repos/micahflee/onionshare/hooks","issue_events_url":"https://api.github.com/repos/micahflee/onionshare/issues/events{/number}","events_url":"https://api.github.com/repos/micahflee/onionshare/events","assignees_url":"https://api.github.com/repos/micahflee/onionshare/assignees{/user}","branches_url":"https://api.github.com/repos/micahflee/onionshare/branches{/branch}","tags_url":"https://api.github.com/repos/micahflee/onionshare/tags","blobs_url":"https://api.github.com/repos/micahflee/onionshare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micahflee/onionshare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micahflee/onionshare/git/refs{/sha}","trees_url":"https://api.github.com/repos/micahflee/onionshare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micahflee/onionshare/statuses/{sha}","languages_url":"https://api.github.com/repos/micahflee/onionshare/languages","stargazers_url":"https://api.github.com/repos/micahflee/onionshare/stargazers","contributors_url":"https://api.github.com/repos/micahflee/onionshare/contributors","subscribers_url":"https://api.github.com/repos/micahflee/onionshare/subscribers","subscription_url":"https://api.github.com/repos/micahflee/onionshare/subscription","commits_url":"https://api.github.com/repos/micahflee/onionshare/commits{/sha}","git_commits_url":"https://api.github.com/repos/micahflee/onionshare/git/commits{/sha}","comments_url":"https://api.github.com/repos/micahflee/onionshare/comments{/number}","issue_comment_url":"https://api.github.com/repos/micahflee/onionshare/issues/comments{/number}","contents_url":"https://api.github.com/repos/micahflee/onionshare/contents/{+path}","compare_url":"https://api.github.com/repos/micahflee/onionshare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micahflee/onionshare/merges","archive_url":"https://api.github.com/repos/micahflee/onionshare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micahflee/onionshare/downloads","issues_url":"https://api.github.com/repos/micahflee/onionshare/issues{/number}","pulls_url":"https://api.github.com/repos/micahflee/onionshare/pulls{/number}","milestones_url":"https://api.github.com/repos/micahflee/onionshare/milestones{/number}","notifications_url":"https://api.github.com/repos/micahflee/onionshare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micahflee/onionshare/labels{/name}","releases_url":"https://api.github.com/repos/micahflee/onionshare/releases{/id}","deployments_url":"https://api.github.com/repos/micahflee/onionshare/deployments","created_at":"2014-05-20T21:08:34Z","updated_at":"2018-09-13T04:18:15Z","pushed_at":"2018-09-13T02:30:03Z","git_url":"git://github.com/micahflee/onionshare.git","ssh_url":"git@github.com:micahflee/onionshare.git","clone_url":"https://github.com/micahflee/onionshare.git","svn_url":"https://github.com/micahflee/onionshare","homepage":"https://onionshare.org/","size":6073,"stargazers_count":2565,"watchers_count":2565,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":304,"mirror_url":null,"archived":false,"open_issues_count":80,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":304,"open_issues":80,"watchers":2565,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/micahflee/onionshare/pulls/575"},"html":{"href":"https://github.com/micahflee/onionshare/pull/575"},"issue":{"href":"https://api.github.com/repos/micahflee/onionshare/issues/575"},"comments":{"href":"https://api.github.com/repos/micahflee/onionshare/issues/575/comments"},"review_comments":{"href":"https://api.github.com/repos/micahflee/onionshare/pulls/575/comments"},"review_comment":{"href":"https://api.github.com/repos/micahflee/onionshare/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/micahflee/onionshare/pulls/575/commits"},"statuses":{"href":"https://api.github.com/repos/micahflee/onionshare/statuses/a61cde05085156c83ddd0d8464c929cc0adff240"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"maqp"}}