{"action":"created","comment":{"url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/comments/222443098","pull_request_review_id":161330748,"id":222443098,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjQ0MzA5OA==","diff_hunk":"@@ -561,6 +566,54 @@ impl TransformKey {\n     }\n }\n \n+pub trait SchnorrOps {\n+    ///\n+    fn sign<A: Hashable>(\n+        &mut self,\n+        priv_key: PrivateKey,\n+        pub_key: PublicKey,\n+        message: &A,\n+    ) -> SchnorrSignature;\n+    fn verify<A: Hashable>(\n+        &self,\n+        pub_key: PublicKey,\n+        augmenting_key: PrivateKey,\n+        message: &A,\n+        signature: SchnorrSignature,\n+    ) -> bool;\n+}\n+\n+impl<H: Sha256Hashing, S, CR: rand::RngCore + rand::CryptoRng> SchnorrOps\n+    for Api<H, S, RandomBytes<CR>>\n+{\n+    fn sign<A: Hashable>(\n+        &mut self,\n+        priv_key: PrivateKey,\n+        pub_key: PublicKey,\n+        message: &A,\n+    ) -> SchnorrSignature {\n+        let k = Fr256::from_rand_no_bias(&mut self.random_bytes);\n+        self.schnorr_signing\n+            .sign(priv_key.into(), pub_key._internal_key, message, k)\n+            .unwrap() //The  curve we're using _cannot_ produce an x value which would be zero, so this can't happen\n+            .into()\n+    }\n+    fn verify<A: Hashable>(\n+        &self,\n+        pub_key: PublicKey,\n+        augmenting_key: PrivateKey,","path":"src/api.rs","position":77,"original_position":77,"commit_id":"56f2a75e6895ccb538a2f5bc9bab5744b5c75a0e","original_commit_id":"56f2a75e6895ccb538a2f5bc9bab5744b5c75a0e","user":{"login":"ernieturner","id":11216295,"node_id":"MDQ6VXNlcjExMjE2Mjk1","avatar_url":"https://avatars3.githubusercontent.com/u/11216295?v=4","gravatar_id":"","url":"https://api.github.com/users/ernieturner","html_url":"https://github.com/ernieturner","followers_url":"https://api.github.com/users/ernieturner/followers","following_url":"https://api.github.com/users/ernieturner/following{/other_user}","gists_url":"https://api.github.com/users/ernieturner/gists{/gist_id}","starred_url":"https://api.github.com/users/ernieturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ernieturner/subscriptions","organizations_url":"https://api.github.com/users/ernieturner/orgs","repos_url":"https://api.github.com/users/ernieturner/repos","events_url":"https://api.github.com/users/ernieturner/events{/privacy}","received_events_url":"https://api.github.com/users/ernieturner/received_events","type":"User","site_admin":false},"body":"Why is this called `augmenting_key` instead of just `priv_key`?","created_at":"2018-10-03T19:45:41Z","updated_at":"2018-10-03T19:47:10Z","html_url":"https://github.com/IronCoreLabs/recrypt-rs/pull/3#discussion_r222443098","pull_request_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/3","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/comments/222443098"},"html":{"href":"https://github.com/IronCoreLabs/recrypt-rs/pull/3#discussion_r222443098"},"pull_request":{"href":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/3","id":219844437,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5ODQ0NDM3","html_url":"https://github.com/IronCoreLabs/recrypt-rs/pull/3","diff_url":"https://github.com/IronCoreLabs/recrypt-rs/pull/3.diff","patch_url":"https://github.com/IronCoreLabs/recrypt-rs/pull/3.patch","issue_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/issues/3","number":3,"state":"open","locked":false,"title":"Schnorr signing","user":{"login":"coltfred","id":587319,"node_id":"MDQ6VXNlcjU4NzMxOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/587319?v=4","gravatar_id":"","url":"https://api.github.com/users/coltfred","html_url":"https://github.com/coltfred","followers_url":"https://api.github.com/users/coltfred/followers","following_url":"https://api.github.com/users/coltfred/following{/other_user}","gists_url":"https://api.github.com/users/coltfred/gists{/gist_id}","starred_url":"https://api.github.com/users/coltfred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coltfred/subscriptions","organizations_url":"https://api.github.com/users/coltfred/orgs","repos_url":"https://api.github.com/users/coltfred/repos","events_url":"https://api.github.com/users/coltfred/events{/privacy}","received_events_url":"https://api.github.com/users/coltfred/received_events","type":"User","site_admin":false},"body":"Opening for initial review:\r\n- [ ] Unit test on public api\r\n- [ ] Ensure documentation strings are correct.","created_at":"2018-10-02T21:03:15Z","updated_at":"2018-10-03T19:47:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16a4c7bec1dc63117b44be8e0ef047b9d7eb463d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/3/commits","review_comments_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/3/comments","review_comment_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/issues/3/comments","statuses_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/statuses/56f2a75e6895ccb538a2f5bc9bab5744b5c75a0e","head":{"label":"coltfred:schnorr_signing","ref":"schnorr_signing","sha":"56f2a75e6895ccb538a2f5bc9bab5744b5c75a0e","user":{"login":"coltfred","id":587319,"node_id":"MDQ6VXNlcjU4NzMxOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/587319?v=4","gravatar_id":"","url":"https://api.github.com/users/coltfred","html_url":"https://github.com/coltfred","followers_url":"https://api.github.com/users/coltfred/followers","following_url":"https://api.github.com/users/coltfred/following{/other_user}","gists_url":"https://api.github.com/users/coltfred/gists{/gist_id}","starred_url":"https://api.github.com/users/coltfred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coltfred/subscriptions","organizations_url":"https://api.github.com/users/coltfred/orgs","repos_url":"https://api.github.com/users/coltfred/repos","events_url":"https://api.github.com/users/coltfred/events{/privacy}","received_events_url":"https://api.github.com/users/coltfred/received_events","type":"User","site_admin":false},"repo":{"id":150804239,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA4MDQyMzk=","name":"recrypt-rs","full_name":"coltfred/recrypt-rs","private":false,"owner":{"login":"coltfred","id":587319,"node_id":"MDQ6VXNlcjU4NzMxOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/587319?v=4","gravatar_id":"","url":"https://api.github.com/users/coltfred","html_url":"https://github.com/coltfred","followers_url":"https://api.github.com/users/coltfred/followers","following_url":"https://api.github.com/users/coltfred/following{/other_user}","gists_url":"https://api.github.com/users/coltfred/gists{/gist_id}","starred_url":"https://api.github.com/users/coltfred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coltfred/subscriptions","organizations_url":"https://api.github.com/users/coltfred/orgs","repos_url":"https://api.github.com/users/coltfred/repos","events_url":"https://api.github.com/users/coltfred/events{/privacy}","received_events_url":"https://api.github.com/users/coltfred/received_events","type":"User","site_admin":false},"html_url":"https://github.com/coltfred/recrypt-rs","description":"A set of cryptographic primitives for building a multi-hop Proxy Re-encryption scheme, known as Transform Encryption.","fork":true,"url":"https://api.github.com/repos/coltfred/recrypt-rs","forks_url":"https://api.github.com/repos/coltfred/recrypt-rs/forks","keys_url":"https://api.github.com/repos/coltfred/recrypt-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coltfred/recrypt-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coltfred/recrypt-rs/teams","hooks_url":"https://api.github.com/repos/coltfred/recrypt-rs/hooks","issue_events_url":"https://api.github.com/repos/coltfred/recrypt-rs/issues/events{/number}","events_url":"https://api.github.com/repos/coltfred/recrypt-rs/events","assignees_url":"https://api.github.com/repos/coltfred/recrypt-rs/assignees{/user}","branches_url":"https://api.github.com/repos/coltfred/recrypt-rs/branches{/branch}","tags_url":"https://api.github.com/repos/coltfred/recrypt-rs/tags","blobs_url":"https://api.github.com/repos/coltfred/recrypt-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coltfred/recrypt-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coltfred/recrypt-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/coltfred/recrypt-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coltfred/recrypt-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/coltfred/recrypt-rs/languages","stargazers_url":"https://api.github.com/repos/coltfred/recrypt-rs/stargazers","contributors_url":"https://api.github.com/repos/coltfred/recrypt-rs/contributors","subscribers_url":"https://api.github.com/repos/coltfred/recrypt-rs/subscribers","subscription_url":"https://api.github.com/repos/coltfred/recrypt-rs/subscription","commits_url":"https://api.github.com/repos/coltfred/recrypt-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/coltfred/recrypt-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/coltfred/recrypt-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/coltfred/recrypt-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/coltfred/recrypt-rs/contents/{+path}","compare_url":"https://api.github.com/repos/coltfred/recrypt-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coltfred/recrypt-rs/merges","archive_url":"https://api.github.com/repos/coltfred/recrypt-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coltfred/recrypt-rs/downloads","issues_url":"https://api.github.com/repos/coltfred/recrypt-rs/issues{/number}","pulls_url":"https://api.github.com/repos/coltfred/recrypt-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/coltfred/recrypt-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/coltfred/recrypt-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coltfred/recrypt-rs/labels{/name}","releases_url":"https://api.github.com/repos/coltfred/recrypt-rs/releases{/id}","deployments_url":"https://api.github.com/repos/coltfred/recrypt-rs/deployments","created_at":"2018-09-28T23:28:34Z","updated_at":"2018-09-28T23:28:36Z","pushed_at":"2018-10-02T21:01:27Z","git_url":"git://github.com/coltfred/recrypt-rs.git","ssh_url":"git@github.com:coltfred/recrypt-rs.git","clone_url":"https://github.com/coltfred/recrypt-rs.git","svn_url":"https://github.com/coltfred/recrypt-rs","homepage":"https://crates.io/crates/recrypt","size":110,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"IronCoreLabs:master","ref":"master","sha":"040c29f57c9a780774c9ebb50ea5eb21ad868b6b","user":{"login":"IronCoreLabs","id":11394047,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzk0MDQ3","avatar_url":"https://avatars3.githubusercontent.com/u/11394047?v=4","gravatar_id":"","url":"https://api.github.com/users/IronCoreLabs","html_url":"https://github.com/IronCoreLabs","followers_url":"https://api.github.com/users/IronCoreLabs/followers","following_url":"https://api.github.com/users/IronCoreLabs/following{/other_user}","gists_url":"https://api.github.com/users/IronCoreLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/IronCoreLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IronCoreLabs/subscriptions","organizations_url":"https://api.github.com/users/IronCoreLabs/orgs","repos_url":"https://api.github.com/users/IronCoreLabs/repos","events_url":"https://api.github.com/users/IronCoreLabs/events{/privacy}","received_events_url":"https://api.github.com/users/IronCoreLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":150496468,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA0OTY0Njg=","name":"recrypt-rs","full_name":"IronCoreLabs/recrypt-rs","private":false,"owner":{"login":"IronCoreLabs","id":11394047,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzk0MDQ3","avatar_url":"https://avatars3.githubusercontent.com/u/11394047?v=4","gravatar_id":"","url":"https://api.github.com/users/IronCoreLabs","html_url":"https://github.com/IronCoreLabs","followers_url":"https://api.github.com/users/IronCoreLabs/followers","following_url":"https://api.github.com/users/IronCoreLabs/following{/other_user}","gists_url":"https://api.github.com/users/IronCoreLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/IronCoreLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IronCoreLabs/subscriptions","organizations_url":"https://api.github.com/users/IronCoreLabs/orgs","repos_url":"https://api.github.com/users/IronCoreLabs/repos","events_url":"https://api.github.com/users/IronCoreLabs/events{/privacy}","received_events_url":"https://api.github.com/users/IronCoreLabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/IronCoreLabs/recrypt-rs","description":"A set of cryptographic primitives for building a multi-hop Proxy Re-encryption scheme, known as Transform Encryption.","fork":false,"url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs","forks_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/forks","keys_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/teams","hooks_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/hooks","issue_events_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/issues/events{/number}","events_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/events","assignees_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/assignees{/user}","branches_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/branches{/branch}","tags_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/tags","blobs_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/languages","stargazers_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/stargazers","contributors_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/contributors","subscribers_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/subscribers","subscription_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/subscription","commits_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/contents/{+path}","compare_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/merges","archive_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/downloads","issues_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/issues{/number}","pulls_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/labels{/name}","releases_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/releases{/id}","deployments_url":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/deployments","created_at":"2018-09-26T22:16:52Z","updated_at":"2018-10-03T18:20:00Z","pushed_at":"2018-10-03T18:19:58Z","git_url":"git://github.com/IronCoreLabs/recrypt-rs.git","ssh_url":"git@github.com:IronCoreLabs/recrypt-rs.git","clone_url":"https://github.com/IronCoreLabs/recrypt-rs.git","svn_url":"https://github.com/IronCoreLabs/recrypt-rs","homepage":"https://crates.io/crates/recrypt","size":87,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":1,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/3"},"html":{"href":"https://github.com/IronCoreLabs/recrypt-rs/pull/3"},"issue":{"href":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/issues/3"},"comments":{"href":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/IronCoreLabs/recrypt-rs/statuses/56f2a75e6895ccb538a2f5bc9bab5744b5c75a0e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ernieturner"}}