{"action":"created","comment":{"url":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/comments/325029841","pull_request_review_id":289076457,"id":325029841,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyNTAyOTg0MQ==","diff_hunk":"@@ -0,0 +1,511 @@\n+/** @file\n+\n+OcCryptoLib\n+\n+Copyright (c) 2018, savvas\n+\n+All rights reserved.\n+\n+This program and the accompanying materials\n+are licensed and made available under the terms and conditions of the BSD License\n+which accompanies this distribution.  The full text of the license may be found at\n+http://opensource.org/licenses/bsd-license.php\n+\n+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\n+\n+**/\n+\n+/**\n+  Copyright (c) 2014 The Chromium OS Authors. All rights reserved.\n+  Use of this source code is governed by a BSD-style license that can be\n+  found in the LICENSE file.\n+\n+  Implementation of RSA signature verification which uses a pre-processed key\n+  for computation.\n+**/\n+\n+#ifdef EFIAPI\n+#include <Library/BaseMemoryLib.h>\n+#endif\n+\n+#include <Library/DebugLib.h>\n+#include <Library/BaseLib.h>\n+#include <Library/OcGuardLib.h>\n+#include <Library/OcCryptoLib.h>\n+\n+/**\n+  PKCS#1 padding (from the RSA PKCS#1 v2.1 standard)\n+\n+  The DER-encoded padding is defined as follows :\n+  0x00 || 0x01 || PS || 0x00 || T\n+\n+  T: DER Encoded DigestInfo value which depends on the hash function used,\n+  for SHA-256:\n+  (0x)30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 || H.\n+\n+  Length(T) = 51 octets for SHA-256\n+\n+  PS: octet string consisting of {Length(RSA Key) - Length(T) - 3} 0xFF\n+ **/\n+#define PKCS_PAD_SIZE (CONFIG_RSA_KEY_SIZE - SHA256_DIGEST_SIZE)\n+\n+STATIC  UINT8 mSha256Tail[] = {\n+  0x00, 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60,\n+  0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01,\n+  0x05, 0x00, 0x04, 0x20\n+};\n+\n+UINT64\n+Mula32 (\n+  UINT32  A,\n+  UINT32  B,\n+  UINT32  C\n+  )\n+{\n+  UINT64 Ret = A;\n+\n+  Ret *= B;","path":"Library/OcCryptoLib/RsaDigitalSign.c","position":587,"original_position":68,"commit_id":"14b83752ff58c013be754c35d2faa9eb8630cb13","original_commit_id":"36fc28850c03cae572d96ce597a31cfcfc81b336","user":{"login":"vit9696","id":4348897,"node_id":"MDQ6VXNlcjQzNDg4OTc=","avatar_url":"https://avatars0.githubusercontent.com/u/4348897?v=4","gravatar_id":"","url":"https://api.github.com/users/vit9696","html_url":"https://github.com/vit9696","followers_url":"https://api.github.com/users/vit9696/followers","following_url":"https://api.github.com/users/vit9696/following{/other_user}","gists_url":"https://api.github.com/users/vit9696/gists{/gist_id}","starred_url":"https://api.github.com/users/vit9696/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vit9696/subscriptions","organizations_url":"https://api.github.com/users/vit9696/orgs","repos_url":"https://api.github.com/users/vit9696/repos","events_url":"https://api.github.com/users/vit9696/events{/privacy}","received_events_url":"https://api.github.com/users/vit9696/received_events","type":"User","site_admin":false},"body":"Ret  = A; would probably look more intuitive and conforming here. Same for Mulaa32.","created_at":"2019-09-17T08:00:36Z","updated_at":"2019-09-17T08:31:22Z","html_url":"https://github.com/acidanthera/OcSupportPkg/pull/15#discussion_r325029841","pull_request_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/15","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/comments/325029841"},"html":{"href":"https://github.com/acidanthera/OcSupportPkg/pull/15#discussion_r325029841"},"pull_request":{"href":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/15","id":318204468,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE4MjA0NDY4","html_url":"https://github.com/acidanthera/OcSupportPkg/pull/15","diff_url":"https://github.com/acidanthera/OcSupportPkg/pull/15.diff","patch_url":"https://github.com/acidanthera/OcSupportPkg/pull/15.patch","issue_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/issues/15","number":15,"state":"open","locked":false,"title":"Cryptography draft by savvas","user":{"login":"vit9696","id":4348897,"node_id":"MDQ6VXNlcjQzNDg4OTc=","avatar_url":"https://avatars0.githubusercontent.com/u/4348897?v=4","gravatar_id":"","url":"https://api.github.com/users/vit9696","html_url":"https://github.com/vit9696","followers_url":"https://api.github.com/users/vit9696/followers","following_url":"https://api.github.com/users/vit9696/following{/other_user}","gists_url":"https://api.github.com/users/vit9696/gists{/gist_id}","starred_url":"https://api.github.com/users/vit9696/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vit9696/subscriptions","organizations_url":"https://api.github.com/users/vit9696/orgs","repos_url":"https://api.github.com/users/vit9696/repos","events_url":"https://api.github.com/users/vit9696/events{/privacy}","received_events_url":"https://api.github.com/users/vit9696/received_events","type":"User","site_admin":false},"body":"Creating PR for review. This is NOT ready for merging.\r\n\r\n@Download-Fritz, VerifyCert function or similar is not here yet, need to think of the interface.","created_at":"2019-09-17T07:42:05Z","updated_at":"2019-09-17T08:31:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ec34e65fed8649027d16a5e4e55dd23ea31b295","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/15/commits","review_comments_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/15/comments","review_comment_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/issues/15/comments","statuses_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/statuses/14b83752ff58c013be754c35d2faa9eb8630cb13","head":{"label":"acidanthera:rsa_implementation","ref":"rsa_implementation","sha":"14b83752ff58c013be754c35d2faa9eb8630cb13","user":{"login":"acidanthera","id":39672954,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NjcyOTU0","avatar_url":"https://avatars2.githubusercontent.com/u/39672954?v=4","gravatar_id":"","url":"https://api.github.com/users/acidanthera","html_url":"https://github.com/acidanthera","followers_url":"https://api.github.com/users/acidanthera/followers","following_url":"https://api.github.com/users/acidanthera/following{/other_user}","gists_url":"https://api.github.com/users/acidanthera/gists{/gist_id}","starred_url":"https://api.github.com/users/acidanthera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acidanthera/subscriptions","organizations_url":"https://api.github.com/users/acidanthera/orgs","repos_url":"https://api.github.com/users/acidanthera/repos","events_url":"https://api.github.com/users/acidanthera/events{/privacy}","received_events_url":"https://api.github.com/users/acidanthera/received_events","type":"Organization","site_admin":false},"repo":{"id":151038607,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEwMzg2MDc=","name":"OcSupportPkg","full_name":"acidanthera/OcSupportPkg","private":false,"owner":{"login":"acidanthera","id":39672954,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NjcyOTU0","avatar_url":"https://avatars2.githubusercontent.com/u/39672954?v=4","gravatar_id":"","url":"https://api.github.com/users/acidanthera","html_url":"https://github.com/acidanthera","followers_url":"https://api.github.com/users/acidanthera/followers","following_url":"https://api.github.com/users/acidanthera/following{/other_user}","gists_url":"https://api.github.com/users/acidanthera/gists{/gist_id}","starred_url":"https://api.github.com/users/acidanthera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acidanthera/subscriptions","organizations_url":"https://api.github.com/users/acidanthera/orgs","repos_url":"https://api.github.com/users/acidanthera/repos","events_url":"https://api.github.com/users/acidanthera/events{/privacy}","received_events_url":"https://api.github.com/users/acidanthera/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/acidanthera/OcSupportPkg","description":"OpenCore common libraries","fork":false,"url":"https://api.github.com/repos/acidanthera/OcSupportPkg","forks_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/forks","keys_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/teams","hooks_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/hooks","issue_events_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/issues/events{/number}","events_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/events","assignees_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/assignees{/user}","branches_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/branches{/branch}","tags_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/tags","blobs_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/git/refs{/sha}","trees_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/statuses/{sha}","languages_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/languages","stargazers_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/stargazers","contributors_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/contributors","subscribers_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/subscribers","subscription_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/subscription","commits_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/commits{/sha}","git_commits_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/git/commits{/sha}","comments_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/comments{/number}","issue_comment_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/issues/comments{/number}","contents_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/contents/{+path}","compare_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/merges","archive_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/downloads","issues_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/issues{/number}","pulls_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls{/number}","milestones_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/milestones{/number}","notifications_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/labels{/name}","releases_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/releases{/id}","deployments_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/deployments","created_at":"2018-10-01T05:00:49Z","updated_at":"2019-09-11T16:53:28Z","pushed_at":"2019-09-17T08:20:14Z","git_url":"git://github.com/acidanthera/OcSupportPkg.git","ssh_url":"git@github.com:acidanthera/OcSupportPkg.git","clone_url":"https://github.com/acidanthera/OcSupportPkg.git","svn_url":"https://github.com/acidanthera/OcSupportPkg","homepage":"","size":11795,"stargazers_count":36,"watchers_count":36,"language":"C","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":17,"open_issues":1,"watchers":36,"default_branch":"master"}},"base":{"label":"acidanthera:master","ref":"master","sha":"6d104f5927d7765386a0e25350a304de96f29d6c","user":{"login":"acidanthera","id":39672954,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NjcyOTU0","avatar_url":"https://avatars2.githubusercontent.com/u/39672954?v=4","gravatar_id":"","url":"https://api.github.com/users/acidanthera","html_url":"https://github.com/acidanthera","followers_url":"https://api.github.com/users/acidanthera/followers","following_url":"https://api.github.com/users/acidanthera/following{/other_user}","gists_url":"https://api.github.com/users/acidanthera/gists{/gist_id}","starred_url":"https://api.github.com/users/acidanthera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acidanthera/subscriptions","organizations_url":"https://api.github.com/users/acidanthera/orgs","repos_url":"https://api.github.com/users/acidanthera/repos","events_url":"https://api.github.com/users/acidanthera/events{/privacy}","received_events_url":"https://api.github.com/users/acidanthera/received_events","type":"Organization","site_admin":false},"repo":{"id":151038607,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEwMzg2MDc=","name":"OcSupportPkg","full_name":"acidanthera/OcSupportPkg","private":false,"owner":{"login":"acidanthera","id":39672954,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NjcyOTU0","avatar_url":"https://avatars2.githubusercontent.com/u/39672954?v=4","gravatar_id":"","url":"https://api.github.com/users/acidanthera","html_url":"https://github.com/acidanthera","followers_url":"https://api.github.com/users/acidanthera/followers","following_url":"https://api.github.com/users/acidanthera/following{/other_user}","gists_url":"https://api.github.com/users/acidanthera/gists{/gist_id}","starred_url":"https://api.github.com/users/acidanthera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acidanthera/subscriptions","organizations_url":"https://api.github.com/users/acidanthera/orgs","repos_url":"https://api.github.com/users/acidanthera/repos","events_url":"https://api.github.com/users/acidanthera/events{/privacy}","received_events_url":"https://api.github.com/users/acidanthera/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/acidanthera/OcSupportPkg","description":"OpenCore common libraries","fork":false,"url":"https://api.github.com/repos/acidanthera/OcSupportPkg","forks_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/forks","keys_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/teams","hooks_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/hooks","issue_events_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/issues/events{/number}","events_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/events","assignees_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/assignees{/user}","branches_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/branches{/branch}","tags_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/tags","blobs_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/git/refs{/sha}","trees_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/statuses/{sha}","languages_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/languages","stargazers_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/stargazers","contributors_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/contributors","subscribers_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/subscribers","subscription_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/subscription","commits_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/commits{/sha}","git_commits_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/git/commits{/sha}","comments_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/comments{/number}","issue_comment_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/issues/comments{/number}","contents_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/contents/{+path}","compare_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/merges","archive_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/downloads","issues_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/issues{/number}","pulls_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls{/number}","milestones_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/milestones{/number}","notifications_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/labels{/name}","releases_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/releases{/id}","deployments_url":"https://api.github.com/repos/acidanthera/OcSupportPkg/deployments","created_at":"2018-10-01T05:00:49Z","updated_at":"2019-09-11T16:53:28Z","pushed_at":"2019-09-17T08:20:14Z","git_url":"git://github.com/acidanthera/OcSupportPkg.git","ssh_url":"git@github.com:acidanthera/OcSupportPkg.git","clone_url":"https://github.com/acidanthera/OcSupportPkg.git","svn_url":"https://github.com/acidanthera/OcSupportPkg","homepage":"","size":11795,"stargazers_count":36,"watchers_count":36,"language":"C","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":17,"open_issues":1,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/15"},"html":{"href":"https://github.com/acidanthera/OcSupportPkg/pull/15"},"issue":{"href":"https://api.github.com/repos/acidanthera/OcSupportPkg/issues/15"},"comments":{"href":"https://api.github.com/repos/acidanthera/OcSupportPkg/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/acidanthera/OcSupportPkg/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/acidanthera/OcSupportPkg/statuses/14b83752ff58c013be754c35d2faa9eb8630cb13"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vit9696"}}