{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/122273210","pull_request_review_id":44375603,"id":122273210,"diff_hunk":"@@ -0,0 +1,142 @@\n+/**\n+ * Copyright 2017 The AMP HTML Authors. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS-IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+import {LegacySignatureVerifier} from '../legacy-signature-verifier';\n+import {stringToBytes} from '../../../../src/utils/bytes';\n+\n+describe('A4A crypto', () => {\n+  const modulus =\n+      '8iAq9Q7zaD93myumSS41aEha6HNRNlPD19tMQHHNjzFdtAH8-w' +\n+      'T6poV3gsI7kfmg9vUrCSuaNrOqmF8HOfbNJfcHCKqXNMsgmYPH' +\n+      'Wz3R7LStMCJ_476UnuMjA9LFSvrdO91_xaX4Jv0kpQ_mZw70wp' +\n+      '_K6IFCcrAi85M__TKUwUpB5iXHy2M00vbSBw7ZbMUkMSELb-X1' +\n+      '_sZbKczCtdYqJQfKqHRU4FxrGj3laRxafWDenpzeMoaSBOK7JK' +\n+      'kILz8mr-eJ07bkKAfOUyOuTtCkPBzgPkaSvaEyqM-EA4VXP0gF' +\n+      'IcI5HedIlWfX82yrxN-hZ0MbFrguuGL8iHX9w1aThHAmmyuX2V' +\n+      '0A1Mh_c9dZtkZO0sYXcBOdh49qmkrn6n2hXP6mmcOF0caTOdke' +\n+      'GQwR47zSut0MS4sJOyNmjkT4lqkLXb-1Ajva_PU-fTDRaIuxkr' +\n+      'BPh0v2RwtwxNFytR9Ksrj_hwOYz_l81m8PnaBhMnkZorqF53bg' +\n+      'eJ8jvDx2_mBb';","path":"extensions/amp-a4a/0.1/test/test-a4a-crypto.js","position":32,"original_position":32,"commit_id":"407bea975953b24c82054fb5ef673bb6efcd19f5","original_commit_id":"518aed5857cf145d9c1e4382d924a58aa70cfa8f","user":{"login":"jonkeller","id":2455047,"avatar_url":"https://avatars2.githubusercontent.com/u/2455047?v=3","gravatar_id":"","url":"https://api.github.com/users/jonkeller","html_url":"https://github.com/jonkeller","followers_url":"https://api.github.com/users/jonkeller/followers","following_url":"https://api.github.com/users/jonkeller/following{/other_user}","gists_url":"https://api.github.com/users/jonkeller/gists{/gist_id}","starred_url":"https://api.github.com/users/jonkeller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonkeller/subscriptions","organizations_url":"https://api.github.com/users/jonkeller/orgs","repos_url":"https://api.github.com/users/jonkeller/repos","events_url":"https://api.github.com/users/jonkeller/events{/privacy}","received_events_url":"https://api.github.com/users/jonkeller/received_events","type":"User","site_admin":false},"body":"Ok. Would be nice if we could figure them out someday, but no need to address here if it's old code.","created_at":"2017-06-15T18:10:55Z","updated_at":"2017-06-15T18:10:55Z","html_url":"https://github.com/ampproject/amphtml/pull/9940#discussion_r122273210","pull_request_url":"https://api.github.com/repos/ampproject/amphtml/pulls/9940","_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/122273210"},"html":{"href":"https://github.com/ampproject/amphtml/pull/9940#discussion_r122273210"},"pull_request":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/9940"}}},"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/9940","id":125848690,"html_url":"https://github.com/ampproject/amphtml/pull/9940","diff_url":"https://github.com/ampproject/amphtml/pull/9940.diff","patch_url":"https://github.com/ampproject/amphtml/pull/9940.patch","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/9940","number":9940,"state":"open","locked":false,"title":"Refactor crypto API to just use PKCS without any extra metadata","user":{"login":"taymonbeal","id":1991427,"avatar_url":"https://avatars3.githubusercontent.com/u/1991427?v=3","gravatar_id":"","url":"https://api.github.com/users/taymonbeal","html_url":"https://github.com/taymonbeal","followers_url":"https://api.github.com/users/taymonbeal/followers","following_url":"https://api.github.com/users/taymonbeal/following{/other_user}","gists_url":"https://api.github.com/users/taymonbeal/gists{/gist_id}","starred_url":"https://api.github.com/users/taymonbeal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taymonbeal/subscriptions","organizations_url":"https://api.github.com/users/taymonbeal/orgs","repos_url":"https://api.github.com/users/taymonbeal/repos","events_url":"https://api.github.com/users/taymonbeal/events{/privacy}","received_events_url":"https://api.github.com/users/taymonbeal/received_events","type":"User","site_admin":false},"body":"This will facilitate the use of raw PKCS signatures in the new Fast Fetch signature scheme (#7618) and for Origin Trials.\r\n\r\nThis is the first of what will probably be several PRs that #9040 will be broken up into.\r\n\r\ncc @ampproject/a4a, @choumx","created_at":"2017-06-15T15:27:25Z","updated_at":"2017-06-15T18:10:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"729f3a87f71328c3bc425a9c14f27717181ae3bd","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amphtml/pulls/9940/commits","review_comments_url":"https://api.github.com/repos/ampproject/amphtml/pulls/9940/comments","review_comment_url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/9940/comments","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/407bea975953b24c82054fb5ef673bb6efcd19f5","head":{"label":"google:pkcs-api","ref":"pkcs-api","sha":"407bea975953b24c82054fb5ef673bb6efcd19f5","user":{"login":"google","id":1342004,"avatar_url":"https://avatars2.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":51965089,"name":"amphtml","full_name":"google/amphtml","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars2.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":true,"url":"https://api.github.com/repos/google/amphtml","forks_url":"https://api.github.com/repos/google/amphtml/forks","keys_url":"https://api.github.com/repos/google/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/amphtml/teams","hooks_url":"https://api.github.com/repos/google/amphtml/hooks","issue_events_url":"https://api.github.com/repos/google/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/google/amphtml/events","assignees_url":"https://api.github.com/repos/google/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/google/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/google/amphtml/tags","blobs_url":"https://api.github.com/repos/google/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/google/amphtml/languages","stargazers_url":"https://api.github.com/repos/google/amphtml/stargazers","contributors_url":"https://api.github.com/repos/google/amphtml/contributors","subscribers_url":"https://api.github.com/repos/google/amphtml/subscribers","subscription_url":"https://api.github.com/repos/google/amphtml/subscription","commits_url":"https://api.github.com/repos/google/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/google/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/amphtml/merges","archive_url":"https://api.github.com/repos/google/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/amphtml/downloads","issues_url":"https://api.github.com/repos/google/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/google/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/google/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/google/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/google/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/google/amphtml/deployments","created_at":"2016-02-18T00:04:16Z","updated_at":"2017-06-14T15:38:25Z","pushed_at":"2017-06-15T17:50:20Z","git_url":"git://github.com/google/amphtml.git","ssh_url":"git@github.com:google/amphtml.git","clone_url":"https://github.com/google/amphtml.git","svn_url":"https://github.com/google/amphtml","homepage":"https://ampproject.org","size":256260,"stargazers_count":102,"watchers_count":102,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":0,"forks":29,"open_issues":0,"watchers":102,"default_branch":"master"}},"base":{"label":"ampproject:master","ref":"master","sha":"061089b6f605e839b35e126dcff6a4c6e9345690","user":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars0.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":41766002,"name":"amphtml","full_name":"ampproject/amphtml","owner":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars0.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ampproject/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":false,"url":"https://api.github.com/repos/ampproject/amphtml","forks_url":"https://api.github.com/repos/ampproject/amphtml/forks","keys_url":"https://api.github.com/repos/ampproject/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amphtml/teams","hooks_url":"https://api.github.com/repos/ampproject/amphtml/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amphtml/events","assignees_url":"https://api.github.com/repos/ampproject/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amphtml/tags","blobs_url":"https://api.github.com/repos/ampproject/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amphtml/languages","stargazers_url":"https://api.github.com/repos/ampproject/amphtml/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amphtml/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amphtml/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amphtml/subscription","commits_url":"https://api.github.com/repos/ampproject/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amphtml/merges","archive_url":"https://api.github.com/repos/ampproject/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amphtml/downloads","issues_url":"https://api.github.com/repos/ampproject/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/amphtml/deployments","created_at":"2015-09-01T22:10:53Z","updated_at":"2017-06-15T14:11:19Z","pushed_at":"2017-06-15T18:06:10Z","git_url":"git://github.com/ampproject/amphtml.git","ssh_url":"git@github.com:ampproject/amphtml.git","clone_url":"https://github.com/ampproject/amphtml.git","svn_url":"https://github.com/ampproject/amphtml","homepage":"https://www.ampproject.org","size":255250,"stargazers_count":10205,"watchers_count":10205,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1792,"mirror_url":null,"open_issues_count":865,"forks":1792,"open_issues":865,"watchers":10205,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/9940"},"html":{"href":"https://github.com/ampproject/amphtml/pull/9940"},"issue":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/9940"},"comments":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/9940/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/9940/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/9940/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amphtml/statuses/407bea975953b24c82054fb5ef673bb6efcd19f5"}}}}
{"actor":{"display_login":"jonkeller"}}