{"action":"created","comment":{"url":"https://api.github.com/repos/keybase/client/pulls/comments/166119766","pull_request_review_id":94151551,"id":166119766,"diff_hunk":"@@ -456,3 +461,27 @@ func handleSeitanSingle(ctx context.Context, g *libkb.GlobalContext, team *Team,\n \n \treturn nil\n }\n+\n+func handleSeitanSingleV2(key keybase1.SeitanPubKey, invite keybase1.TeamInvite, seitan keybase1.TeamSeitanRequest) (err error) {\n+\tpubKey, err := ImportSeitanPubKey(key)\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\n+\tvar sig SeitanSig\n+\tdecodedSig, err := base64.StdEncoding.DecodeString(string(seitan.Akey)) // For V2 the server responds with sig in the akey field\n+\tcopy(sig[:], decodedSig[:])\n+\n+\tnow := keybase1.Time(seitan.UnixCTime) // For V2 this is ms since the epoch, not seconds\n+\tmsg, err := GenerateSeitanSignatureMessage(seitan.Uid, seitan.EldestSeqno, SCTeamInviteID(seitan.InviteID), now)","path":"go/teams/handler.go","position":70,"original_position":70,"commit_id":"7d18b8ef56e3c7b771c86d8a9f2187066d460e34","original_commit_id":"7d18b8ef56e3c7b771c86d8a9f2187066d460e34","user":{"login":"joshblum","id":1144020,"avatar_url":"https://avatars0.githubusercontent.com/u/1144020?v=4","gravatar_id":"","url":"https://api.github.com/users/joshblum","html_url":"https://github.com/joshblum","followers_url":"https://api.github.com/users/joshblum/followers","following_url":"https://api.github.com/users/joshblum/following{/other_user}","gists_url":"https://api.github.com/users/joshblum/gists{/gist_id}","starred_url":"https://api.github.com/users/joshblum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshblum/subscriptions","organizations_url":"https://api.github.com/users/joshblum/orgs","repos_url":"https://api.github.com/users/joshblum/repos","events_url":"https://api.github.com/users/joshblum/events{/privacy}","received_events_url":"https://api.github.com/users/joshblum/received_events","type":"User","site_admin":false},"body":"Tests cover the ordering case, but agreed we should make a note!","created_at":"2018-02-05T21:37:44Z","updated_at":"2018-02-05T21:37:44Z","html_url":"https://github.com/keybase/client/pull/10333#discussion_r166119766","pull_request_url":"https://api.github.com/repos/keybase/client/pulls/10333","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/comments/166119766"},"html":{"href":"https://github.com/keybase/client/pull/10333#discussion_r166119766"},"pull_request":{"href":"https://api.github.com/repos/keybase/client/pulls/10333"}},"in_reply_to_id":166116529},"pull_request":{"url":"https://api.github.com/repos/keybase/client/pulls/10333","id":165247141,"html_url":"https://github.com/keybase/client/pull/10333","diff_url":"https://github.com/keybase/client/pull/10333.diff","patch_url":"https://github.com/keybase/client/pull/10333.patch","issue_url":"https://api.github.com/repos/keybase/client/issues/10333","number":10333,"state":"open","locked":false,"title":"Seitan V2 implementation","user":{"login":"joshblum","id":1144020,"avatar_url":"https://avatars0.githubusercontent.com/u/1144020?v=4","gravatar_id":"","url":"https://api.github.com/users/joshblum","html_url":"https://github.com/joshblum","followers_url":"https://api.github.com/users/joshblum/followers","following_url":"https://api.github.com/users/joshblum/following{/other_user}","gists_url":"https://api.github.com/users/joshblum/gists{/gist_id}","starred_url":"https://api.github.com/users/joshblum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshblum/subscriptions","organizations_url":"https://api.github.com/users/joshblum/orgs","repos_url":"https://api.github.com/users/joshblum/repos","events_url":"https://api.github.com/users/joshblum/events{/privacy}","received_events_url":"https://api.github.com/users/joshblum/received_events","type":"User","site_admin":false},"body":"In seitan v2 we address a security issue where a nefarious reader, when colluding with an evil server, could steal an invite generated by a different admin and invite someone else to the team. The issue was storing the encrypted invitation key (`IKey`) in the sig chain (so any team admin could decrypt and reinvite), we avoid this by instead writing the public key of an EdDSA keypair in the sigchain, where we derive the secret key from the streched `IKey`. Only the admin that generates the `IKey` and the recipient of the invite ever have access to the `IKey` in this version.","created_at":"2018-01-25T22:36:48Z","updated_at":"2018-02-05T21:37:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f065b9b9b0b96aca12467137db773011b2885c3f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/keybase/client/pulls/10333/commits","review_comments_url":"https://api.github.com/repos/keybase/client/pulls/10333/comments","review_comment_url":"https://api.github.com/repos/keybase/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keybase/client/issues/10333/comments","statuses_url":"https://api.github.com/repos/keybase/client/statuses/7d18b8ef56e3c7b771c86d8a9f2187066d460e34","head":{"label":"keybase:seitan-v2","ref":"seitan-v2","sha":"7d18b8ef56e3c7b771c86d8a9f2187066d460e34","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2018-02-05T21:18:57Z","pushed_at":"2018-02-05T20:37:27Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":220924,"stargazers_count":3192,"watchers_count":3192,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":301,"mirror_url":null,"archived":false,"open_issues_count":1815,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":301,"open_issues":1815,"watchers":3192,"default_branch":"master"}},"base":{"label":"keybase:master","ref":"master","sha":"af56582cc0bd3b722bbbe374de10030048e0c8b0","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2018-02-05T21:18:57Z","pushed_at":"2018-02-05T20:37:27Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":220924,"stargazers_count":3192,"watchers_count":3192,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":301,"mirror_url":null,"archived":false,"open_issues_count":1815,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":301,"open_issues":1815,"watchers":3192,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/10333"},"html":{"href":"https://github.com/keybase/client/pull/10333"},"issue":{"href":"https://api.github.com/repos/keybase/client/issues/10333"},"comments":{"href":"https://api.github.com/repos/keybase/client/issues/10333/comments"},"review_comments":{"href":"https://api.github.com/repos/keybase/client/pulls/10333/comments"},"review_comment":{"href":"https://api.github.com/repos/keybase/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keybase/client/pulls/10333/commits"},"statuses":{"href":"https://api.github.com/repos/keybase/client/statuses/7d18b8ef56e3c7b771c86d8a9f2187066d460e34"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"joshblum"}}