{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/comments/22649127","id":22649127,"diff_hunk":"@@ -9,9 +9,36 @@ var ZERO = new Buffer([0])\n var ONE = new Buffer([1])\n \n // https://tools.ietf.org/html/rfc6979#section-3.2\n-function deterministicGenerateK(curve, hash, d) {\n+function deterministicGenerateK(curve, hash, d, checkSig) {\n   typeForce('Buffer', hash)\n   typeForce('BigInteger', d)\n+//  typeForce('Function', checkSig)","path":"src/ecdsa.js","position":8,"original_position":8,"commit_id":"6938c8f8cc8f2689a83ac49ddf92f6b335f31aeb","original_commit_id":"6938c8f8cc8f2689a83ac49ddf92f6b335f31aeb","user":{"login":"weilu","id":412533,"avatar_url":"https://avatars.githubusercontent.com/u/412533?v=3","gravatar_id":"","url":"https://api.github.com/users/weilu","html_url":"https://github.com/weilu","followers_url":"https://api.github.com/users/weilu/followers","following_url":"https://api.github.com/users/weilu/following{/other_user}","gists_url":"https://api.github.com/users/weilu/gists{/gist_id}","starred_url":"https://api.github.com/users/weilu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weilu/subscriptions","organizations_url":"https://api.github.com/users/weilu/orgs","repos_url":"https://api.github.com/users/weilu/repos","events_url":"https://api.github.com/users/weilu/events{/privacy}","received_events_url":"https://api.github.com/users/weilu/received_events","type":"User","site_admin":false},"body":"Move this to the comment 2 lines done so peeps won't wonder why this is commented out","created_at":"2015-01-08T12:34:40Z","updated_at":"2015-01-08T12:34:40Z","html_url":"https://github.com/bitcoinjs/bitcoinjs-lib/pull/337#discussion_r22649127","pull_request_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/337","_links":{"self":{"href":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/comments/22649127"},"html":{"href":"https://github.com/bitcoinjs/bitcoinjs-lib/pull/337#discussion_r22649127"},"pull_request":{"href":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/337"}}},"pull_request":{"url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/337","id":26789466,"html_url":"https://github.com/bitcoinjs/bitcoinjs-lib/pull/337","diff_url":"https://github.com/bitcoinjs/bitcoinjs-lib/pull/337.diff","patch_url":"https://github.com/bitcoinjs/bitcoinjs-lib/pull/337.patch","issue_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/337","number":337,"state":"open","locked":false,"title":"RF6979 compliance in regards to invalid ECDSA signatures","user":{"login":"dcousens","id":413395,"avatar_url":"https://avatars.githubusercontent.com/u/413395?v=3","gravatar_id":"","url":"https://api.github.com/users/dcousens","html_url":"https://github.com/dcousens","followers_url":"https://api.github.com/users/dcousens/followers","following_url":"https://api.github.com/users/dcousens/following{/other_user}","gists_url":"https://api.github.com/users/dcousens/gists{/gist_id}","starred_url":"https://api.github.com/users/dcousens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcousens/subscriptions","organizations_url":"https://api.github.com/users/dcousens/orgs","repos_url":"https://api.github.com/users/dcousens/repos","events_url":"https://api.github.com/users/dcousens/events{/privacy}","received_events_url":"https://api.github.com/users/dcousens/received_events","type":"User","site_admin":false},"body":"This pull request fixes a bug presented in #336 such that an out of bounds `k` would not be fully compliant with other RFC6979 implementations, and therefore would present an opportunity (in very irregular circumstances) for the `k` values produced by both implementations to be different.\r\nAs pointed out in #336, this could lead to an attack vector if both signatures were exposed in the public space somehow.\r\n\r\n~~This PR is not yet complete, as it is awaiting test cases.~~","created_at":"2015-01-04T01:50:13Z","updated_at":"2015-01-08T12:34:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af9ad24a276d4fcbf0e980a7befd4d136463ee0a","assignee":{"login":"dcousens","id":413395,"avatar_url":"https://avatars.githubusercontent.com/u/413395?v=3","gravatar_id":"","url":"https://api.github.com/users/dcousens","html_url":"https://github.com/dcousens","followers_url":"https://api.github.com/users/dcousens/followers","following_url":"https://api.github.com/users/dcousens/following{/other_user}","gists_url":"https://api.github.com/users/dcousens/gists{/gist_id}","starred_url":"https://api.github.com/users/dcousens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcousens/subscriptions","organizations_url":"https://api.github.com/users/dcousens/orgs","repos_url":"https://api.github.com/users/dcousens/repos","events_url":"https://api.github.com/users/dcousens/events{/privacy}","received_events_url":"https://api.github.com/users/dcousens/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/milestones/1","labels_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/milestones/1/labels","id":778601,"number":1,"title":"2.0.0","description":null,"creator":{"login":"dcousens","id":413395,"avatar_url":"https://avatars.githubusercontent.com/u/413395?v=3","gravatar_id":"","url":"https://api.github.com/users/dcousens","html_url":"https://github.com/dcousens","followers_url":"https://api.github.com/users/dcousens/followers","following_url":"https://api.github.com/users/dcousens/following{/other_user}","gists_url":"https://api.github.com/users/dcousens/gists{/gist_id}","starred_url":"https://api.github.com/users/dcousens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcousens/subscriptions","organizations_url":"https://api.github.com/users/dcousens/orgs","repos_url":"https://api.github.com/users/dcousens/repos","events_url":"https://api.github.com/users/dcousens/events{/privacy}","received_events_url":"https://api.github.com/users/dcousens/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":4,"state":"open","created_at":"2014-09-04T15:37:23Z","updated_at":"2015-01-05T03:38:29Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/337/commits","review_comments_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/337/comments","review_comment_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/comments/{number}","comments_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/337/comments","statuses_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/statuses/6938c8f8cc8f2689a83ac49ddf92f6b335f31aeb","head":{"label":"bitcoinjs:rfc6979fix","ref":"rfc6979fix","sha":"6938c8f8cc8f2689a83ac49ddf92f6b335f31aeb","user":{"login":"bitcoinjs","id":756696,"avatar_url":"https://avatars.githubusercontent.com/u/756696?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoinjs","html_url":"https://github.com/bitcoinjs","followers_url":"https://api.github.com/users/bitcoinjs/followers","following_url":"https://api.github.com/users/bitcoinjs/following{/other_user}","gists_url":"https://api.github.com/users/bitcoinjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoinjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoinjs/subscriptions","organizations_url":"https://api.github.com/users/bitcoinjs/orgs","repos_url":"https://api.github.com/users/bitcoinjs/repos","events_url":"https://api.github.com/users/bitcoinjs/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoinjs/received_events","type":"Organization","site_admin":false},"repo":{"id":1701968,"name":"bitcoinjs-lib","full_name":"bitcoinjs/bitcoinjs-lib","owner":{"login":"bitcoinjs","id":756696,"avatar_url":"https://avatars.githubusercontent.com/u/756696?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoinjs","html_url":"https://github.com/bitcoinjs","followers_url":"https://api.github.com/users/bitcoinjs/followers","following_url":"https://api.github.com/users/bitcoinjs/following{/other_user}","gists_url":"https://api.github.com/users/bitcoinjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoinjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoinjs/subscriptions","organizations_url":"https://api.github.com/users/bitcoinjs/orgs","repos_url":"https://api.github.com/users/bitcoinjs/repos","events_url":"https://api.github.com/users/bitcoinjs/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoinjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitcoinjs/bitcoinjs-lib","description":"Bitcoin-related functions implemented in pure JavaScript","fork":false,"url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib","forks_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/forks","keys_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/teams","hooks_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/hooks","issue_events_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/events{/number}","events_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/events","assignees_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/assignees{/user}","branches_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/branches{/branch}","tags_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/tags","blobs_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/languages","stargazers_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/stargazers","contributors_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/contributors","subscribers_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/subscribers","subscription_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/subscription","commits_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/comments/{number}","contents_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/contents/{+path}","compare_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/merges","archive_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/downloads","issues_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues{/number}","pulls_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/labels{/name}","releases_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/releases{/id}","created_at":"2011-05-04T16:03:45Z","updated_at":"2015-01-06T20:08:36Z","pushed_at":"2015-01-06T05:13:34Z","git_url":"git://github.com/bitcoinjs/bitcoinjs-lib.git","ssh_url":"git@github.com:bitcoinjs/bitcoinjs-lib.git","clone_url":"https://github.com/bitcoinjs/bitcoinjs-lib.git","svn_url":"https://github.com/bitcoinjs/bitcoinjs-lib","homepage":"http://bitcoinjs.org","size":4757,"stargazers_count":756,"watchers_count":756,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":226,"mirror_url":null,"open_issues_count":15,"forks":226,"open_issues":15,"watchers":756,"default_branch":"master"}},"base":{"label":"bitcoinjs:master","ref":"master","sha":"ecadda090e9a25a98e898c4969494d651520017b","user":{"login":"bitcoinjs","id":756696,"avatar_url":"https://avatars.githubusercontent.com/u/756696?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoinjs","html_url":"https://github.com/bitcoinjs","followers_url":"https://api.github.com/users/bitcoinjs/followers","following_url":"https://api.github.com/users/bitcoinjs/following{/other_user}","gists_url":"https://api.github.com/users/bitcoinjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoinjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoinjs/subscriptions","organizations_url":"https://api.github.com/users/bitcoinjs/orgs","repos_url":"https://api.github.com/users/bitcoinjs/repos","events_url":"https://api.github.com/users/bitcoinjs/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoinjs/received_events","type":"Organization","site_admin":false},"repo":{"id":1701968,"name":"bitcoinjs-lib","full_name":"bitcoinjs/bitcoinjs-lib","owner":{"login":"bitcoinjs","id":756696,"avatar_url":"https://avatars.githubusercontent.com/u/756696?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoinjs","html_url":"https://github.com/bitcoinjs","followers_url":"https://api.github.com/users/bitcoinjs/followers","following_url":"https://api.github.com/users/bitcoinjs/following{/other_user}","gists_url":"https://api.github.com/users/bitcoinjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoinjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoinjs/subscriptions","organizations_url":"https://api.github.com/users/bitcoinjs/orgs","repos_url":"https://api.github.com/users/bitcoinjs/repos","events_url":"https://api.github.com/users/bitcoinjs/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoinjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitcoinjs/bitcoinjs-lib","description":"Bitcoin-related functions implemented in pure JavaScript","fork":false,"url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib","forks_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/forks","keys_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/teams","hooks_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/hooks","issue_events_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/events{/number}","events_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/events","assignees_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/assignees{/user}","branches_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/branches{/branch}","tags_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/tags","blobs_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/languages","stargazers_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/stargazers","contributors_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/contributors","subscribers_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/subscribers","subscription_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/subscription","commits_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/comments/{number}","contents_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/contents/{+path}","compare_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/merges","archive_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/downloads","issues_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues{/number}","pulls_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/labels{/name}","releases_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/releases{/id}","created_at":"2011-05-04T16:03:45Z","updated_at":"2015-01-06T20:08:36Z","pushed_at":"2015-01-06T05:13:34Z","git_url":"git://github.com/bitcoinjs/bitcoinjs-lib.git","ssh_url":"git@github.com:bitcoinjs/bitcoinjs-lib.git","clone_url":"https://github.com/bitcoinjs/bitcoinjs-lib.git","svn_url":"https://github.com/bitcoinjs/bitcoinjs-lib","homepage":"http://bitcoinjs.org","size":4757,"stargazers_count":756,"watchers_count":756,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":226,"mirror_url":null,"open_issues_count":15,"forks":226,"open_issues":15,"watchers":756,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/337"},"html":{"href":"https://github.com/bitcoinjs/bitcoinjs-lib/pull/337"},"issue":{"href":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/337"},"comments":{"href":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/337/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/337/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/pulls/337/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/statuses/6938c8f8cc8f2689a83ac49ddf92f6b335f31aeb"}}}}