{"action":"created","comment":{"url":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/comments/168527525","pull_request_review_id":96910300,"id":168527525,"diff_hunk":"@@ -1,57 +1,59 @@\n from nkms.crypto import api as API\n-from nkms.keystore.keypairs import PublicKey\n+from umbral.keys import UmbralPublicKey\n+from cryptography.hazmat.primitives.asymmetric.utils import decode_dss_signature, encode_dss_signature\n \n \n-class Signature(bytes):\n+class Signature(object):\n     \"\"\"\n     The Signature object allows signatures to be made and verified.\n     \"\"\"\n-    _EXPECTED_LENGTH = 65\n+    _EXPECTED_LENGTH = 64  # With secp256k1 and BLAKE2b(64).\n \n-    def __init__(self, sig_as_bytes: bytes=None, v: int=None, r: int=None, s: int=None):\n-        \"\"\"\n-        Initializes a Signature object.\n-\n-        :param v: V param of signature\n-        :param r: R param of signature\n-        :param s: S param of signature\n-\n-        :return: Signature object\n-        \"\"\"\n-        if sig_as_bytes and any((v, r, s)):\n-            raise ValueError(\"Pass *either* sig_as_bytes *or* v, r, and s - don't pass both.\")\n-        if not any ((sig_as_bytes, v, r, s)):\n-            raise ValueError(\"Pass either sig_as_bytes or v, r, and s.\")\n-\n-        if sig_as_bytes:\n-            if not len(sig_as_bytes) == self._EXPECTED_LENGTH:\n-                raise ValueError(\"{} must be {} bytes.\".format(self.__class__.__name__, self._EXPECTED_LENGTH))\n-            v, r, s = API.ecdsa_load_sig(sig_as_bytes)\n-\n-        self._v = v\n-        self._r = r\n-        self._s = s\n+    def __init__(self, r: int, s: int):\n+        self.r = r\n+        self.s = s","path":"nkms/crypto/signature.py","position":40,"original_position":40,"commit_id":"e95bd5242041e2f5bc4ab656f6cc745c14183a67","original_commit_id":"e95bd5242041e2f5bc4ab656f6cc745c14183a67","user":{"login":"tuxxy","id":3598318,"avatar_url":"https://avatars1.githubusercontent.com/u/3598318?v=4","gravatar_id":"","url":"https://api.github.com/users/tuxxy","html_url":"https://github.com/tuxxy","followers_url":"https://api.github.com/users/tuxxy/followers","following_url":"https://api.github.com/users/tuxxy/following{/other_user}","gists_url":"https://api.github.com/users/tuxxy/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxxy/subscriptions","organizations_url":"https://api.github.com/users/tuxxy/orgs","repos_url":"https://api.github.com/users/tuxxy/repos","events_url":"https://api.github.com/users/tuxxy/events{/privacy}","received_events_url":"https://api.github.com/users/tuxxy/received_events","type":"User","site_admin":false},"body":"Yeah, it probably should. I'm not sure if we have figured out an interface to store umbral/curve params yet. We need to talk about this.","created_at":"2018-02-15T16:21:22Z","updated_at":"2018-02-15T16:21:22Z","html_url":"https://github.com/nucypher/nucypher-kms/pull/160#discussion_r168527525","pull_request_url":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/160","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/comments/168527525"},"html":{"href":"https://github.com/nucypher/nucypher-kms/pull/160#discussion_r168527525"},"pull_request":{"href":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/160"}},"in_reply_to_id":168503902},"pull_request":{"url":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/160","id":168961665,"html_url":"https://github.com/nucypher/nucypher-kms/pull/160","diff_url":"https://github.com/nucypher/nucypher-kms/pull/160.diff","patch_url":"https://github.com/nucypher/nucypher-kms/pull/160.patch","issue_url":"https://api.github.com/repos/nucypher/nucypher-kms/issues/160","number":160,"state":"open","locked":false,"title":"A very large change; this introduces Umbral and many of the abstractions we created to go with it.","user":{"login":"jMyles","id":311973,"avatar_url":"https://avatars2.githubusercontent.com/u/311973?v=4","gravatar_id":"","url":"https://api.github.com/users/jMyles","html_url":"https://github.com/jMyles","followers_url":"https://api.github.com/users/jMyles/followers","following_url":"https://api.github.com/users/jMyles/following{/other_user}","gists_url":"https://api.github.com/users/jMyles/gists{/gist_id}","starred_url":"https://api.github.com/users/jMyles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jMyles/subscriptions","organizations_url":"https://api.github.com/users/jMyles/orgs","repos_url":"https://api.github.com/users/jMyles/repos","events_url":"https://api.github.com/users/jMyles/events{/privacy}","received_events_url":"https://api.github.com/users/jMyles/received_events","type":"User","site_admin":false},"body":"### What this does:\r\n1. Introduces pyumbral, our proxy re-encryption library.\r\n2. Deprecates previous proxy re-encryption tooling.\r\n3. Introduces some important abstractions to accommodate pyumbral metaphor:\r\n- a. `nkms.crypto.kits.CryptoKit` - a tool for carrying common crypto entities together\r\n- b. `Capsule` - an umbral concept, this is the object which `Bob` must bring with him on his journey.  It completely replaces pfrag (though is a different abstraction entirely)\r\n4. `Characters` now use the same class of key (`UmbralPublicKey` and `UmbralPrivateKey`) for both signing and encrypting (though different instances of course).","created_at":"2018-02-13T21:33:06Z","updated_at":"2018-02-15T16:21:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c696f0fe9a49171b3770d65d6721250cd33a6325","assignee":null,"assignees":[],"requested_reviewers":[{"login":"KPrasch","id":679404,"avatar_url":"https://avatars1.githubusercontent.com/u/679404?v=4","gravatar_id":"","url":"https://api.github.com/users/KPrasch","html_url":"https://github.com/KPrasch","followers_url":"https://api.github.com/users/KPrasch/followers","following_url":"https://api.github.com/users/KPrasch/following{/other_user}","gists_url":"https://api.github.com/users/KPrasch/gists{/gist_id}","starred_url":"https://api.github.com/users/KPrasch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KPrasch/subscriptions","organizations_url":"https://api.github.com/users/KPrasch/orgs","repos_url":"https://api.github.com/users/KPrasch/repos","events_url":"https://api.github.com/users/KPrasch/events{/privacy}","received_events_url":"https://api.github.com/users/KPrasch/received_events","type":"User","site_admin":false},{"login":"michwill","id":740600,"avatar_url":"https://avatars0.githubusercontent.com/u/740600?v=4","gravatar_id":"","url":"https://api.github.com/users/michwill","html_url":"https://github.com/michwill","followers_url":"https://api.github.com/users/michwill/followers","following_url":"https://api.github.com/users/michwill/following{/other_user}","gists_url":"https://api.github.com/users/michwill/gists{/gist_id}","starred_url":"https://api.github.com/users/michwill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michwill/subscriptions","organizations_url":"https://api.github.com/users/michwill/orgs","repos_url":"https://api.github.com/users/michwill/repos","events_url":"https://api.github.com/users/michwill/events{/privacy}","received_events_url":"https://api.github.com/users/michwill/received_events","type":"User","site_admin":false},{"login":"tuxxy","id":3598318,"avatar_url":"https://avatars1.githubusercontent.com/u/3598318?v=4","gravatar_id":"","url":"https://api.github.com/users/tuxxy","html_url":"https://github.com/tuxxy","followers_url":"https://api.github.com/users/tuxxy/followers","following_url":"https://api.github.com/users/tuxxy/following{/other_user}","gists_url":"https://api.github.com/users/tuxxy/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxxy/subscriptions","organizations_url":"https://api.github.com/users/tuxxy/orgs","repos_url":"https://api.github.com/users/tuxxy/repos","events_url":"https://api.github.com/users/tuxxy/events{/privacy}","received_events_url":"https://api.github.com/users/tuxxy/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/160/commits","review_comments_url":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/160/comments","review_comment_url":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nucypher/nucypher-kms/issues/160/comments","statuses_url":"https://api.github.com/repos/nucypher/nucypher-kms/statuses/e95bd5242041e2f5bc4ab656f6cc745c14183a67","head":{"label":"nucypher:introducing-umbral","ref":"introducing-umbral","sha":"e95bd5242041e2f5bc4ab656f6cc745c14183a67","user":{"login":"nucypher","id":24552990,"avatar_url":"https://avatars0.githubusercontent.com/u/24552990?v=4","gravatar_id":"","url":"https://api.github.com/users/nucypher","html_url":"https://github.com/nucypher","followers_url":"https://api.github.com/users/nucypher/followers","following_url":"https://api.github.com/users/nucypher/following{/other_user}","gists_url":"https://api.github.com/users/nucypher/gists{/gist_id}","starred_url":"https://api.github.com/users/nucypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nucypher/subscriptions","organizations_url":"https://api.github.com/users/nucypher/orgs","repos_url":"https://api.github.com/users/nucypher/repos","events_url":"https://api.github.com/users/nucypher/events{/privacy}","received_events_url":"https://api.github.com/users/nucypher/received_events","type":"Organization","site_admin":false},"repo":{"id":100446516,"name":"nucypher-kms","full_name":"nucypher/nucypher-kms","owner":{"login":"nucypher","id":24552990,"avatar_url":"https://avatars0.githubusercontent.com/u/24552990?v=4","gravatar_id":"","url":"https://api.github.com/users/nucypher","html_url":"https://github.com/nucypher","followers_url":"https://api.github.com/users/nucypher/followers","following_url":"https://api.github.com/users/nucypher/following{/other_user}","gists_url":"https://api.github.com/users/nucypher/gists{/gist_id}","starred_url":"https://api.github.com/users/nucypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nucypher/subscriptions","organizations_url":"https://api.github.com/users/nucypher/orgs","repos_url":"https://api.github.com/users/nucypher/repos","events_url":"https://api.github.com/users/nucypher/events{/privacy}","received_events_url":"https://api.github.com/users/nucypher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nucypher/nucypher-kms","description":"Decentralized KMS","fork":false,"url":"https://api.github.com/repos/nucypher/nucypher-kms","forks_url":"https://api.github.com/repos/nucypher/nucypher-kms/forks","keys_url":"https://api.github.com/repos/nucypher/nucypher-kms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nucypher/nucypher-kms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nucypher/nucypher-kms/teams","hooks_url":"https://api.github.com/repos/nucypher/nucypher-kms/hooks","issue_events_url":"https://api.github.com/repos/nucypher/nucypher-kms/issues/events{/number}","events_url":"https://api.github.com/repos/nucypher/nucypher-kms/events","assignees_url":"https://api.github.com/repos/nucypher/nucypher-kms/assignees{/user}","branches_url":"https://api.github.com/repos/nucypher/nucypher-kms/branches{/branch}","tags_url":"https://api.github.com/repos/nucypher/nucypher-kms/tags","blobs_url":"https://api.github.com/repos/nucypher/nucypher-kms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nucypher/nucypher-kms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nucypher/nucypher-kms/git/refs{/sha}","trees_url":"https://api.github.com/repos/nucypher/nucypher-kms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nucypher/nucypher-kms/statuses/{sha}","languages_url":"https://api.github.com/repos/nucypher/nucypher-kms/languages","stargazers_url":"https://api.github.com/repos/nucypher/nucypher-kms/stargazers","contributors_url":"https://api.github.com/repos/nucypher/nucypher-kms/contributors","subscribers_url":"https://api.github.com/repos/nucypher/nucypher-kms/subscribers","subscription_url":"https://api.github.com/repos/nucypher/nucypher-kms/subscription","commits_url":"https://api.github.com/repos/nucypher/nucypher-kms/commits{/sha}","git_commits_url":"https://api.github.com/repos/nucypher/nucypher-kms/git/commits{/sha}","comments_url":"https://api.github.com/repos/nucypher/nucypher-kms/comments{/number}","issue_comment_url":"https://api.github.com/repos/nucypher/nucypher-kms/issues/comments{/number}","contents_url":"https://api.github.com/repos/nucypher/nucypher-kms/contents/{+path}","compare_url":"https://api.github.com/repos/nucypher/nucypher-kms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nucypher/nucypher-kms/merges","archive_url":"https://api.github.com/repos/nucypher/nucypher-kms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nucypher/nucypher-kms/downloads","issues_url":"https://api.github.com/repos/nucypher/nucypher-kms/issues{/number}","pulls_url":"https://api.github.com/repos/nucypher/nucypher-kms/pulls{/number}","milestones_url":"https://api.github.com/repos/nucypher/nucypher-kms/milestones{/number}","notifications_url":"https://api.github.com/repos/nucypher/nucypher-kms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nucypher/nucypher-kms/labels{/name}","releases_url":"https://api.github.com/repos/nucypher/nucypher-kms/releases{/id}","deployments_url":"https://api.github.com/repos/nucypher/nucypher-kms/deployments","created_at":"2017-08-16T04:07:25Z","updated_at":"2018-02-15T07:13:59Z","pushed_at":"2018-02-15T07:47:53Z","git_url":"git://github.com/nucypher/nucypher-kms.git","ssh_url":"git@github.com:nucypher/nucypher-kms.git","clone_url":"https://github.com/nucypher/nucypher-kms.git","svn_url":"https://github.com/nucypher/nucypher-kms","homepage":null,"size":818,"stargazers_count":26,"watchers_count":26,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":31,"license":null,"forks":11,"open_issues":31,"watchers":26,"default_branch":"master"}},"base":{"label":"nucypher:master","ref":"master","sha":"a8c9f61f7575ae2f94b7116479e214d6d100fc6b","user":{"login":"nucypher","id":24552990,"avatar_url":"https://avatars0.githubusercontent.com/u/24552990?v=4","gravatar_id":"","url":"https://api.github.com/users/nucypher","html_url":"https://github.com/nucypher","followers_url":"https://api.github.com/users/nucypher/followers","following_url":"https://api.github.com/users/nucypher/following{/other_user}","gists_url":"https://api.github.com/users/nucypher/gists{/gist_id}","starred_url":"https://api.github.com/users/nucypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nucypher/subscriptions","organizations_url":"https://api.github.com/users/nucypher/orgs","repos_url":"https://api.github.com/users/nucypher/repos","events_url":"https://api.github.com/users/nucypher/events{/privacy}","received_events_url":"https://api.github.com/users/nucypher/received_events","type":"Organization","site_admin":false},"repo":{"id":100446516,"name":"nucypher-kms","full_name":"nucypher/nucypher-kms","owner":{"login":"nucypher","id":24552990,"avatar_url":"https://avatars0.githubusercontent.com/u/24552990?v=4","gravatar_id":"","url":"https://api.github.com/users/nucypher","html_url":"https://github.com/nucypher","followers_url":"https://api.github.com/users/nucypher/followers","following_url":"https://api.github.com/users/nucypher/following{/other_user}","gists_url":"https://api.github.com/users/nucypher/gists{/gist_id}","starred_url":"https://api.github.com/users/nucypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nucypher/subscriptions","organizations_url":"https://api.github.com/users/nucypher/orgs","repos_url":"https://api.github.com/users/nucypher/repos","events_url":"https://api.github.com/users/nucypher/events{/privacy}","received_events_url":"https://api.github.com/users/nucypher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nucypher/nucypher-kms","description":"Decentralized KMS","fork":false,"url":"https://api.github.com/repos/nucypher/nucypher-kms","forks_url":"https://api.github.com/repos/nucypher/nucypher-kms/forks","keys_url":"https://api.github.com/repos/nucypher/nucypher-kms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nucypher/nucypher-kms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nucypher/nucypher-kms/teams","hooks_url":"https://api.github.com/repos/nucypher/nucypher-kms/hooks","issue_events_url":"https://api.github.com/repos/nucypher/nucypher-kms/issues/events{/number}","events_url":"https://api.github.com/repos/nucypher/nucypher-kms/events","assignees_url":"https://api.github.com/repos/nucypher/nucypher-kms/assignees{/user}","branches_url":"https://api.github.com/repos/nucypher/nucypher-kms/branches{/branch}","tags_url":"https://api.github.com/repos/nucypher/nucypher-kms/tags","blobs_url":"https://api.github.com/repos/nucypher/nucypher-kms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nucypher/nucypher-kms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nucypher/nucypher-kms/git/refs{/sha}","trees_url":"https://api.github.com/repos/nucypher/nucypher-kms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nucypher/nucypher-kms/statuses/{sha}","languages_url":"https://api.github.com/repos/nucypher/nucypher-kms/languages","stargazers_url":"https://api.github.com/repos/nucypher/nucypher-kms/stargazers","contributors_url":"https://api.github.com/repos/nucypher/nucypher-kms/contributors","subscribers_url":"https://api.github.com/repos/nucypher/nucypher-kms/subscribers","subscription_url":"https://api.github.com/repos/nucypher/nucypher-kms/subscription","commits_url":"https://api.github.com/repos/nucypher/nucypher-kms/commits{/sha}","git_commits_url":"https://api.github.com/repos/nucypher/nucypher-kms/git/commits{/sha}","comments_url":"https://api.github.com/repos/nucypher/nucypher-kms/comments{/number}","issue_comment_url":"https://api.github.com/repos/nucypher/nucypher-kms/issues/comments{/number}","contents_url":"https://api.github.com/repos/nucypher/nucypher-kms/contents/{+path}","compare_url":"https://api.github.com/repos/nucypher/nucypher-kms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nucypher/nucypher-kms/merges","archive_url":"https://api.github.com/repos/nucypher/nucypher-kms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nucypher/nucypher-kms/downloads","issues_url":"https://api.github.com/repos/nucypher/nucypher-kms/issues{/number}","pulls_url":"https://api.github.com/repos/nucypher/nucypher-kms/pulls{/number}","milestones_url":"https://api.github.com/repos/nucypher/nucypher-kms/milestones{/number}","notifications_url":"https://api.github.com/repos/nucypher/nucypher-kms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nucypher/nucypher-kms/labels{/name}","releases_url":"https://api.github.com/repos/nucypher/nucypher-kms/releases{/id}","deployments_url":"https://api.github.com/repos/nucypher/nucypher-kms/deployments","created_at":"2017-08-16T04:07:25Z","updated_at":"2018-02-15T07:13:59Z","pushed_at":"2018-02-15T07:47:53Z","git_url":"git://github.com/nucypher/nucypher-kms.git","ssh_url":"git@github.com:nucypher/nucypher-kms.git","clone_url":"https://github.com/nucypher/nucypher-kms.git","svn_url":"https://github.com/nucypher/nucypher-kms","homepage":null,"size":818,"stargazers_count":26,"watchers_count":26,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":31,"license":null,"forks":11,"open_issues":31,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/160"},"html":{"href":"https://github.com/nucypher/nucypher-kms/pull/160"},"issue":{"href":"https://api.github.com/repos/nucypher/nucypher-kms/issues/160"},"comments":{"href":"https://api.github.com/repos/nucypher/nucypher-kms/issues/160/comments"},"review_comments":{"href":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/160/comments"},"review_comment":{"href":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nucypher/nucypher-kms/pulls/160/commits"},"statuses":{"href":"https://api.github.com/repos/nucypher/nucypher-kms/statuses/e95bd5242041e2f5bc4ab656f6cc745c14183a67"}},"author_association":"OWNER"}}
{"actor":{"display_login":"tuxxy"}}