{"action":"created","comment":{"url":"https://api.github.com/repos/Netflix/msl/pulls/comments/71606361","id":71606361,"diff_hunk":"@@ -0,0 +1,245 @@\n+/**\n+ * Copyright (c) 2016 Netflix, Inc.  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+/**\n+ * ECC crypto context unit tests.\n+ *\n+ */\n+describe(\"EccCryptoContext\", function() {\n+    var publicKeyA;\n+    var privateKeyA;\n+    var publicKeyB;\n+    var privateKeyB;\n+\n+    var ECDSA_KEYPAIR_A = {\n+        publicKeyJSON: {\n+            \"kty\": \"EC\",\n+            \"crv\": \"P-256\",\n+            \"x\":   \"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4\",\n+            \"y\":   \"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM\",\n+            \"use\": \"sig\",\n+            \"kid\": \"A\"\n+         },\n+        privateKeyJSON: {\n+            \"kty\": \"EC\",\n+            \"crv\": \"P-256\",\n+            \"x\":   \"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4\",\n+            \"y\":   \"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM\",\n+            \"d\":   \"870MB6gfuTJ4HtUnUvYMyJpr5eUZNP4Bk43bVdj3eAE\",\n+            \"use\": \"sig\",\n+            \"kid\": \"Apriv\"\n+         }\n+     };\n+\n+    var ECDSA_KEYPAIR_B = {\n+        publicKeyJSON: {\n+            \"kty\": \"EC\",\n+            \"crv\": \"P-256\",\n+            \"x\":   \"10jF0O9oX8GOXxxHgC9gktZbduHn0K3XI5EDum_fOkc\",\n+            \"y\":   \"eBVHsIhtASlzUIzGnMAl0TDfj0pqgldZrbsZobEL-78\",\n+            \"use\": \"sig\",\n+            \"kid\": \"B\"\n+         },\n+        privateKeyJSON: {\n+            \"kty\": \"EC\",\n+            \"crv\": \"P-256\",\n+            \"x\":   \"10jF0O9oX8GOXxxHgC9gktZbduHn0K3XI5EDum_fOkc\",\n+            \"y\":   \"eBVHsIhtASlzUIzGnMAl0TDfj0pqgldZrbsZobEL-78\",\n+            \"d\":   \"TBP2kKufnhTHEf88VPcOIPDlk8uAFlLgi7C1iv86huY\",\n+            \"use\": \"sig\",\n+            \"kid\": \"B\"\n+         }\n+     };\n+\n+    /** Random. */\n+    var random = new Random();\n+    /** Message. */\n+    var message = new Uint8Array(32);\n+    random.nextBytes(message);\n+    /** MSL context. */\n+    var ctx = null;\n+    var initialized = false;\n+\n+    beforeEach(function() {\n+        var extractable = true;\n+        var _algo = { name: \"ECDSA\", namedCurve: \"P-256\" };","path":"tests/src/test/javascript/crypto/EccCryptoContextSuite.js","position":78,"original_position":78,"commit_id":"abdfd28b80523e3c60abea8b2a035588e114f449","original_commit_id":"abdfd28b80523e3c60abea8b2a035588e114f449","user":{"login":"wmiaw","id":156189,"avatar_url":"https://avatars.githubusercontent.com/u/156189?v=3","gravatar_id":"","url":"https://api.github.com/users/wmiaw","html_url":"https://github.com/wmiaw","followers_url":"https://api.github.com/users/wmiaw/followers","following_url":"https://api.github.com/users/wmiaw/following{/other_user}","gists_url":"https://api.github.com/users/wmiaw/gists{/gist_id}","starred_url":"https://api.github.com/users/wmiaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmiaw/subscriptions","organizations_url":"https://api.github.com/users/wmiaw/orgs","repos_url":"https://api.github.com/users/wmiaw/repos","events_url":"https://api.github.com/users/wmiaw/events{/privacy}","received_events_url":"https://api.github.com/users/wmiaw/received_events","type":"User","site_admin":false},"body":"Maybe you should be referencing the \"crv\" inside the key object and construct the algorithm as `_algo = copy of WebCryptoAlgorithm.ECDSA_SHA256; _algo['namedCurve'] = key['crv'].","created_at":"2016-07-20T21:03:56Z","updated_at":"2016-07-20T21:03:56Z","html_url":"https://github.com/Netflix/msl/pull/120#discussion_r71606361","pull_request_url":"https://api.github.com/repos/Netflix/msl/pulls/120","_links":{"self":{"href":"https://api.github.com/repos/Netflix/msl/pulls/comments/71606361"},"html":{"href":"https://github.com/Netflix/msl/pull/120#discussion_r71606361"},"pull_request":{"href":"https://api.github.com/repos/Netflix/msl/pulls/120"}}},"pull_request":{"url":"https://api.github.com/repos/Netflix/msl/pulls/120","id":78064508,"html_url":"https://github.com/Netflix/msl/pull/120","diff_url":"https://github.com/Netflix/msl/pull/120.diff","patch_url":"https://github.com/Netflix/msl/pull/120.patch","issue_url":"https://api.github.com/repos/Netflix/msl/issues/120","number":120,"state":"open","locked":false,"title":"Add ECC Verification support.","user":{"login":"aliddeke","id":20525251,"avatar_url":"https://avatars.githubusercontent.com/u/20525251?v=3","gravatar_id":"","url":"https://api.github.com/users/aliddeke","html_url":"https://github.com/aliddeke","followers_url":"https://api.github.com/users/aliddeke/followers","following_url":"https://api.github.com/users/aliddeke/following{/other_user}","gists_url":"https://api.github.com/users/aliddeke/gists{/gist_id}","starred_url":"https://api.github.com/users/aliddeke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliddeke/subscriptions","organizations_url":"https://api.github.com/users/aliddeke/orgs","repos_url":"https://api.github.com/users/aliddeke/repos","events_url":"https://api.github.com/users/aliddeke/events{/privacy}","received_events_url":"https://api.github.com/users/aliddeke/received_events","type":"User","site_admin":false},"body":"Add ECC verify method to javascript with new ECC crypto unit test.","created_at":"2016-07-19T23:07:44Z","updated_at":"2016-07-20T21:03:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"95211f14ac565da94a607086f0062617474396f1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Netflix/msl/pulls/120/commits","review_comments_url":"https://api.github.com/repos/Netflix/msl/pulls/120/comments","review_comment_url":"https://api.github.com/repos/Netflix/msl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Netflix/msl/issues/120/comments","statuses_url":"https://api.github.com/repos/Netflix/msl/statuses/abdfd28b80523e3c60abea8b2a035588e114f449","head":{"label":"aliddeke:EccVerifySupport","ref":"EccVerifySupport","sha":"abdfd28b80523e3c60abea8b2a035588e114f449","user":{"login":"aliddeke","id":20525251,"avatar_url":"https://avatars.githubusercontent.com/u/20525251?v=3","gravatar_id":"","url":"https://api.github.com/users/aliddeke","html_url":"https://github.com/aliddeke","followers_url":"https://api.github.com/users/aliddeke/followers","following_url":"https://api.github.com/users/aliddeke/following{/other_user}","gists_url":"https://api.github.com/users/aliddeke/gists{/gist_id}","starred_url":"https://api.github.com/users/aliddeke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliddeke/subscriptions","organizations_url":"https://api.github.com/users/aliddeke/orgs","repos_url":"https://api.github.com/users/aliddeke/repos","events_url":"https://api.github.com/users/aliddeke/events{/privacy}","received_events_url":"https://api.github.com/users/aliddeke/received_events","type":"User","site_admin":false},"repo":{"id":63731466,"name":"msl","full_name":"aliddeke/msl","owner":{"login":"aliddeke","id":20525251,"avatar_url":"https://avatars.githubusercontent.com/u/20525251?v=3","gravatar_id":"","url":"https://api.github.com/users/aliddeke","html_url":"https://github.com/aliddeke","followers_url":"https://api.github.com/users/aliddeke/followers","following_url":"https://api.github.com/users/aliddeke/following{/other_user}","gists_url":"https://api.github.com/users/aliddeke/gists{/gist_id}","starred_url":"https://api.github.com/users/aliddeke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliddeke/subscriptions","organizations_url":"https://api.github.com/users/aliddeke/orgs","repos_url":"https://api.github.com/users/aliddeke/repos","events_url":"https://api.github.com/users/aliddeke/events{/privacy}","received_events_url":"https://api.github.com/users/aliddeke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aliddeke/msl","description":"Message Security Layer","fork":true,"url":"https://api.github.com/repos/aliddeke/msl","forks_url":"https://api.github.com/repos/aliddeke/msl/forks","keys_url":"https://api.github.com/repos/aliddeke/msl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aliddeke/msl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aliddeke/msl/teams","hooks_url":"https://api.github.com/repos/aliddeke/msl/hooks","issue_events_url":"https://api.github.com/repos/aliddeke/msl/issues/events{/number}","events_url":"https://api.github.com/repos/aliddeke/msl/events","assignees_url":"https://api.github.com/repos/aliddeke/msl/assignees{/user}","branches_url":"https://api.github.com/repos/aliddeke/msl/branches{/branch}","tags_url":"https://api.github.com/repos/aliddeke/msl/tags","blobs_url":"https://api.github.com/repos/aliddeke/msl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aliddeke/msl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aliddeke/msl/git/refs{/sha}","trees_url":"https://api.github.com/repos/aliddeke/msl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aliddeke/msl/statuses/{sha}","languages_url":"https://api.github.com/repos/aliddeke/msl/languages","stargazers_url":"https://api.github.com/repos/aliddeke/msl/stargazers","contributors_url":"https://api.github.com/repos/aliddeke/msl/contributors","subscribers_url":"https://api.github.com/repos/aliddeke/msl/subscribers","subscription_url":"https://api.github.com/repos/aliddeke/msl/subscription","commits_url":"https://api.github.com/repos/aliddeke/msl/commits{/sha}","git_commits_url":"https://api.github.com/repos/aliddeke/msl/git/commits{/sha}","comments_url":"https://api.github.com/repos/aliddeke/msl/comments{/number}","issue_comment_url":"https://api.github.com/repos/aliddeke/msl/issues/comments{/number}","contents_url":"https://api.github.com/repos/aliddeke/msl/contents/{+path}","compare_url":"https://api.github.com/repos/aliddeke/msl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aliddeke/msl/merges","archive_url":"https://api.github.com/repos/aliddeke/msl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aliddeke/msl/downloads","issues_url":"https://api.github.com/repos/aliddeke/msl/issues{/number}","pulls_url":"https://api.github.com/repos/aliddeke/msl/pulls{/number}","milestones_url":"https://api.github.com/repos/aliddeke/msl/milestones{/number}","notifications_url":"https://api.github.com/repos/aliddeke/msl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aliddeke/msl/labels{/name}","releases_url":"https://api.github.com/repos/aliddeke/msl/releases{/id}","deployments_url":"https://api.github.com/repos/aliddeke/msl/deployments","created_at":"2016-07-19T22:13:06Z","updated_at":"2016-07-19T22:13:09Z","pushed_at":"2016-07-19T23:03:28Z","git_url":"git://github.com/aliddeke/msl.git","ssh_url":"git@github.com:aliddeke/msl.git","clone_url":"https://github.com/aliddeke/msl.git","svn_url":"https://github.com/aliddeke/msl","homepage":null,"size":13338,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Netflix:master","ref":"master","sha":"8ed949682ff6c5bb309c64f9a4acd6bbdb3a207a","user":{"login":"Netflix","id":913567,"avatar_url":"https://avatars.githubusercontent.com/u/913567?v=3","gravatar_id":"","url":"https://api.github.com/users/Netflix","html_url":"https://github.com/Netflix","followers_url":"https://api.github.com/users/Netflix/followers","following_url":"https://api.github.com/users/Netflix/following{/other_user}","gists_url":"https://api.github.com/users/Netflix/gists{/gist_id}","starred_url":"https://api.github.com/users/Netflix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Netflix/subscriptions","organizations_url":"https://api.github.com/users/Netflix/orgs","repos_url":"https://api.github.com/users/Netflix/repos","events_url":"https://api.github.com/users/Netflix/events{/privacy}","received_events_url":"https://api.github.com/users/Netflix/received_events","type":"Organization","site_admin":false},"repo":{"id":20580225,"name":"msl","full_name":"Netflix/msl","owner":{"login":"Netflix","id":913567,"avatar_url":"https://avatars.githubusercontent.com/u/913567?v=3","gravatar_id":"","url":"https://api.github.com/users/Netflix","html_url":"https://github.com/Netflix","followers_url":"https://api.github.com/users/Netflix/followers","following_url":"https://api.github.com/users/Netflix/following{/other_user}","gists_url":"https://api.github.com/users/Netflix/gists{/gist_id}","starred_url":"https://api.github.com/users/Netflix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Netflix/subscriptions","organizations_url":"https://api.github.com/users/Netflix/orgs","repos_url":"https://api.github.com/users/Netflix/repos","events_url":"https://api.github.com/users/Netflix/events{/privacy}","received_events_url":"https://api.github.com/users/Netflix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Netflix/msl","description":"Message Security Layer","fork":false,"url":"https://api.github.com/repos/Netflix/msl","forks_url":"https://api.github.com/repos/Netflix/msl/forks","keys_url":"https://api.github.com/repos/Netflix/msl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Netflix/msl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Netflix/msl/teams","hooks_url":"https://api.github.com/repos/Netflix/msl/hooks","issue_events_url":"https://api.github.com/repos/Netflix/msl/issues/events{/number}","events_url":"https://api.github.com/repos/Netflix/msl/events","assignees_url":"https://api.github.com/repos/Netflix/msl/assignees{/user}","branches_url":"https://api.github.com/repos/Netflix/msl/branches{/branch}","tags_url":"https://api.github.com/repos/Netflix/msl/tags","blobs_url":"https://api.github.com/repos/Netflix/msl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Netflix/msl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Netflix/msl/git/refs{/sha}","trees_url":"https://api.github.com/repos/Netflix/msl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Netflix/msl/statuses/{sha}","languages_url":"https://api.github.com/repos/Netflix/msl/languages","stargazers_url":"https://api.github.com/repos/Netflix/msl/stargazers","contributors_url":"https://api.github.com/repos/Netflix/msl/contributors","subscribers_url":"https://api.github.com/repos/Netflix/msl/subscribers","subscription_url":"https://api.github.com/repos/Netflix/msl/subscription","commits_url":"https://api.github.com/repos/Netflix/msl/commits{/sha}","git_commits_url":"https://api.github.com/repos/Netflix/msl/git/commits{/sha}","comments_url":"https://api.github.com/repos/Netflix/msl/comments{/number}","issue_comment_url":"https://api.github.com/repos/Netflix/msl/issues/comments{/number}","contents_url":"https://api.github.com/repos/Netflix/msl/contents/{+path}","compare_url":"https://api.github.com/repos/Netflix/msl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Netflix/msl/merges","archive_url":"https://api.github.com/repos/Netflix/msl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Netflix/msl/downloads","issues_url":"https://api.github.com/repos/Netflix/msl/issues{/number}","pulls_url":"https://api.github.com/repos/Netflix/msl/pulls{/number}","milestones_url":"https://api.github.com/repos/Netflix/msl/milestones{/number}","notifications_url":"https://api.github.com/repos/Netflix/msl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Netflix/msl/labels{/name}","releases_url":"https://api.github.com/repos/Netflix/msl/releases{/id}","deployments_url":"https://api.github.com/repos/Netflix/msl/deployments","created_at":"2014-06-06T22:41:18Z","updated_at":"2016-07-20T15:13:07Z","pushed_at":"2016-07-19T23:07:44Z","git_url":"git://github.com/Netflix/msl.git","ssh_url":"git@github.com:Netflix/msl.git","clone_url":"https://github.com/Netflix/msl.git","svn_url":"https://github.com/Netflix/msl","homepage":null,"size":13603,"stargazers_count":349,"watchers_count":349,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":39,"mirror_url":null,"open_issues_count":15,"forks":39,"open_issues":15,"watchers":349,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Netflix/msl/pulls/120"},"html":{"href":"https://github.com/Netflix/msl/pull/120"},"issue":{"href":"https://api.github.com/repos/Netflix/msl/issues/120"},"comments":{"href":"https://api.github.com/repos/Netflix/msl/issues/120/comments"},"review_comments":{"href":"https://api.github.com/repos/Netflix/msl/pulls/120/comments"},"review_comment":{"href":"https://api.github.com/repos/Netflix/msl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Netflix/msl/pulls/120/commits"},"statuses":{"href":"https://api.github.com/repos/Netflix/msl/statuses/abdfd28b80523e3c60abea8b2a035588e114f449"}}}}
{"actor":{"display_login":"wmiaw"}}