{"action":"created","comment":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/comments/205966873","pull_request_review_id":141340400,"id":205966873,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTk2Njg3Mw==","diff_hunk":"@@ -13,6 +13,10 @@ namespace AES {\n \n enum KeySlotID : size_t {\n     // AES Keyslot used to generate the UDS data frame CCMP key.","path":"src/core/hw/aes/key.h","position":3,"original_position":3,"commit_id":"c7935d14fa659c3c9970db9e1ed56e6ec296b7b9","original_commit_id":"c7935d14fa659c3c9970db9e1ed56e6ec296b7b9","user":{"login":"B3n30","id":26032316,"node_id":"MDQ6VXNlcjI2MDMyMzE2","avatar_url":"https://avatars0.githubusercontent.com/u/26032316?v=4","gravatar_id":"","url":"https://api.github.com/users/B3n30","html_url":"https://github.com/B3n30","followers_url":"https://api.github.com/users/B3n30/followers","following_url":"https://api.github.com/users/B3n30/following{/other_user}","gists_url":"https://api.github.com/users/B3n30/gists{/gist_id}","starred_url":"https://api.github.com/users/B3n30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/B3n30/subscriptions","organizations_url":"https://api.github.com/users/B3n30/orgs","repos_url":"https://api.github.com/users/B3n30/repos","events_url":"https://api.github.com/users/B3n30/events{/privacy}","received_events_url":"https://api.github.com/users/B3n30/received_events","type":"User","site_admin":false},"body":"That comment should probably stay with the `UDSDataKey = 0x2D,` line","created_at":"2018-07-29T09:29:04Z","updated_at":"2018-07-29T09:30:11Z","html_url":"https://github.com/citra-emu/citra/pull/4020#discussion_r205966873","pull_request_url":"https://api.github.com/repos/citra-emu/citra/pulls/4020","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/comments/205966873"},"html":{"href":"https://github.com/citra-emu/citra/pull/4020#discussion_r205966873"},"pull_request":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/4020"}}},"pull_request":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/4020","id":204600438,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjAwNDM4","html_url":"https://github.com/citra-emu/citra/pull/4020","diff_url":"https://github.com/citra-emu/citra/pull/4020.diff","patch_url":"https://github.com/citra-emu/citra/pull/4020.patch","issue_url":"https://api.github.com/repos/citra-emu/citra/issues/4020","number":4020,"state":"open","locked":false,"title":"ncch_container: support encrypted games","user":{"login":"wwylele","id":4592895,"node_id":"MDQ6VXNlcjQ1OTI4OTU=","avatar_url":"https://avatars0.githubusercontent.com/u/4592895?v=4","gravatar_id":"","url":"https://api.github.com/users/wwylele","html_url":"https://github.com/wwylele","followers_url":"https://api.github.com/users/wwylele/followers","following_url":"https://api.github.com/users/wwylele/following{/other_user}","gists_url":"https://api.github.com/users/wwylele/gists{/gist_id}","starred_url":"https://api.github.com/users/wwylele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwylele/subscriptions","organizations_url":"https://api.github.com/users/wwylele/orgs","repos_url":"https://api.github.com/users/wwylele/repos","events_url":"https://api.github.com/users/wwylele/events{/privacy}","received_events_url":"https://api.github.com/users/wwylele/received_events","type":"User","site_admin":false},"body":"We originally wanted to have VFS first before implementing this. I now have a different idea about it, and currently agree more on the \"abstract only when needed\" philosophy: if we build up VFS class hierarchy before implementing real features, we might end up with a bunch of over-abstracted useless structure that we don't need for the finite problem we want to resolve, which might have been grown to simpler code if we only abstract on the need. So I want to start from implementing real thing, and start abstraction from where it needs change.\r\n\r\n`RomFSReader` is introduced to represent a RomFS file that can be either encrypted or decrypted, which replaces the original `IOFile + offset + size` parameter passing.\r\n\r\n----\r\n\r\nThe keys should be provided by user via `sysdata/aes_keys.txt`, as it is in the existing facilities. However, `HW::AES::Init` is changed to initial keys only once in during citra execution, and can be called when ever the key is needed. This change is made because the game list, which displays icon and titles of the game, also needs to decrypt the game outside the 3DS system. `HW::AES` doesn't have any dependency on other 3DS system component, so we can just make it a standalone module and init from the first time being used.\r\n\r\n---\r\n\r\nAll known encryption methods are implemented, except for the seed crypto. Seed crypto is used in newer eshop games, which essentially uses an additional title-unique key that is stored outside the ROM, so we need to discuss where to load the key before implementing it.\r\n\r\n---\r\n\r\nRight now, decryption failure due to any reason (missing keys, unsupported seed crypto) would result in the same \"Encrypted games\" message in the frontend, as we had for encrypted games. I understand that this is not ideal for UX, but I don't want to interfere the ongoing frontend text improvements (#4012). Anyone has good idea about the error message?\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/citra-emu/citra/4020)\n<!-- Reviewable:end -->\n","created_at":"2018-07-28T16:31:36Z","updated_at":"2018-07-29T09:30:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20f384732ed7d38c746d4b42309e1fe601ae670d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/citra-emu/citra/pulls/4020/commits","review_comments_url":"https://api.github.com/repos/citra-emu/citra/pulls/4020/comments","review_comment_url":"https://api.github.com/repos/citra-emu/citra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/citra-emu/citra/issues/4020/comments","statuses_url":"https://api.github.com/repos/citra-emu/citra/statuses/c7935d14fa659c3c9970db9e1ed56e6ec296b7b9","head":{"label":"wwylele:loader-crypto-new","ref":"loader-crypto-new","sha":"c7935d14fa659c3c9970db9e1ed56e6ec296b7b9","user":{"login":"wwylele","id":4592895,"node_id":"MDQ6VXNlcjQ1OTI4OTU=","avatar_url":"https://avatars0.githubusercontent.com/u/4592895?v=4","gravatar_id":"","url":"https://api.github.com/users/wwylele","html_url":"https://github.com/wwylele","followers_url":"https://api.github.com/users/wwylele/followers","following_url":"https://api.github.com/users/wwylele/following{/other_user}","gists_url":"https://api.github.com/users/wwylele/gists{/gist_id}","starred_url":"https://api.github.com/users/wwylele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwylele/subscriptions","organizations_url":"https://api.github.com/users/wwylele/orgs","repos_url":"https://api.github.com/users/wwylele/repos","events_url":"https://api.github.com/users/wwylele/events{/privacy}","received_events_url":"https://api.github.com/users/wwylele/received_events","type":"User","site_admin":false},"repo":{"id":53776373,"node_id":"MDEwOlJlcG9zaXRvcnk1Mzc3NjM3Mw==","name":"citra","full_name":"wwylele/citra","owner":{"login":"wwylele","id":4592895,"node_id":"MDQ6VXNlcjQ1OTI4OTU=","avatar_url":"https://avatars0.githubusercontent.com/u/4592895?v=4","gravatar_id":"","url":"https://api.github.com/users/wwylele","html_url":"https://github.com/wwylele","followers_url":"https://api.github.com/users/wwylele/followers","following_url":"https://api.github.com/users/wwylele/following{/other_user}","gists_url":"https://api.github.com/users/wwylele/gists{/gist_id}","starred_url":"https://api.github.com/users/wwylele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwylele/subscriptions","organizations_url":"https://api.github.com/users/wwylele/orgs","repos_url":"https://api.github.com/users/wwylele/repos","events_url":"https://api.github.com/users/wwylele/events{/privacy}","received_events_url":"https://api.github.com/users/wwylele/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wwylele/citra","description":"This is my staging area for PR to the official citra repo. Feel free to review and comment on those PR drafts, or to take over PRs labeled \"suspend\". Don't open PR to this repo.","fork":true,"url":"https://api.github.com/repos/wwylele/citra","forks_url":"https://api.github.com/repos/wwylele/citra/forks","keys_url":"https://api.github.com/repos/wwylele/citra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wwylele/citra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wwylele/citra/teams","hooks_url":"https://api.github.com/repos/wwylele/citra/hooks","issue_events_url":"https://api.github.com/repos/wwylele/citra/issues/events{/number}","events_url":"https://api.github.com/repos/wwylele/citra/events","assignees_url":"https://api.github.com/repos/wwylele/citra/assignees{/user}","branches_url":"https://api.github.com/repos/wwylele/citra/branches{/branch}","tags_url":"https://api.github.com/repos/wwylele/citra/tags","blobs_url":"https://api.github.com/repos/wwylele/citra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wwylele/citra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wwylele/citra/git/refs{/sha}","trees_url":"https://api.github.com/repos/wwylele/citra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wwylele/citra/statuses/{sha}","languages_url":"https://api.github.com/repos/wwylele/citra/languages","stargazers_url":"https://api.github.com/repos/wwylele/citra/stargazers","contributors_url":"https://api.github.com/repos/wwylele/citra/contributors","subscribers_url":"https://api.github.com/repos/wwylele/citra/subscribers","subscription_url":"https://api.github.com/repos/wwylele/citra/subscription","commits_url":"https://api.github.com/repos/wwylele/citra/commits{/sha}","git_commits_url":"https://api.github.com/repos/wwylele/citra/git/commits{/sha}","comments_url":"https://api.github.com/repos/wwylele/citra/comments{/number}","issue_comment_url":"https://api.github.com/repos/wwylele/citra/issues/comments{/number}","contents_url":"https://api.github.com/repos/wwylele/citra/contents/{+path}","compare_url":"https://api.github.com/repos/wwylele/citra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wwylele/citra/merges","archive_url":"https://api.github.com/repos/wwylele/citra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wwylele/citra/downloads","issues_url":"https://api.github.com/repos/wwylele/citra/issues{/number}","pulls_url":"https://api.github.com/repos/wwylele/citra/pulls{/number}","milestones_url":"https://api.github.com/repos/wwylele/citra/milestones{/number}","notifications_url":"https://api.github.com/repos/wwylele/citra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wwylele/citra/labels{/name}","releases_url":"https://api.github.com/repos/wwylele/citra/releases{/id}","deployments_url":"https://api.github.com/repos/wwylele/citra/deployments","created_at":"2016-03-13T09:09:07Z","updated_at":"2018-07-14T11:55:59Z","pushed_at":"2018-07-28T16:00:52Z","git_url":"git://github.com/wwylele/citra.git","ssh_url":"git@github.com:wwylele/citra.git","clone_url":"https://github.com/wwylele/citra.git","svn_url":"https://github.com/wwylele/citra","homepage":"https://citra-emu.org","size":24065,"stargazers_count":9,"watchers_count":9,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":4,"open_issues":8,"watchers":9,"default_branch":"master"}},"base":{"label":"citra-emu:master","ref":"master","sha":"383cde84d3e2f88c175be2acc101b6390cca2b53","user":{"login":"citra-emu","id":7605670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MDU2NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/7605670?v=4","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":19866730,"node_id":"MDEwOlJlcG9zaXRvcnkxOTg2NjczMA==","name":"citra","full_name":"citra-emu/citra","owner":{"login":"citra-emu","id":7605670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MDU2NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/7605670?v=4","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citra-emu/citra","description":"A Nintendo 3DS Emulator","fork":false,"url":"https://api.github.com/repos/citra-emu/citra","forks_url":"https://api.github.com/repos/citra-emu/citra/forks","keys_url":"https://api.github.com/repos/citra-emu/citra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citra-emu/citra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citra-emu/citra/teams","hooks_url":"https://api.github.com/repos/citra-emu/citra/hooks","issue_events_url":"https://api.github.com/repos/citra-emu/citra/issues/events{/number}","events_url":"https://api.github.com/repos/citra-emu/citra/events","assignees_url":"https://api.github.com/repos/citra-emu/citra/assignees{/user}","branches_url":"https://api.github.com/repos/citra-emu/citra/branches{/branch}","tags_url":"https://api.github.com/repos/citra-emu/citra/tags","blobs_url":"https://api.github.com/repos/citra-emu/citra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citra-emu/citra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citra-emu/citra/git/refs{/sha}","trees_url":"https://api.github.com/repos/citra-emu/citra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citra-emu/citra/statuses/{sha}","languages_url":"https://api.github.com/repos/citra-emu/citra/languages","stargazers_url":"https://api.github.com/repos/citra-emu/citra/stargazers","contributors_url":"https://api.github.com/repos/citra-emu/citra/contributors","subscribers_url":"https://api.github.com/repos/citra-emu/citra/subscribers","subscription_url":"https://api.github.com/repos/citra-emu/citra/subscription","commits_url":"https://api.github.com/repos/citra-emu/citra/commits{/sha}","git_commits_url":"https://api.github.com/repos/citra-emu/citra/git/commits{/sha}","comments_url":"https://api.github.com/repos/citra-emu/citra/comments{/number}","issue_comment_url":"https://api.github.com/repos/citra-emu/citra/issues/comments{/number}","contents_url":"https://api.github.com/repos/citra-emu/citra/contents/{+path}","compare_url":"https://api.github.com/repos/citra-emu/citra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citra-emu/citra/merges","archive_url":"https://api.github.com/repos/citra-emu/citra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citra-emu/citra/downloads","issues_url":"https://api.github.com/repos/citra-emu/citra/issues{/number}","pulls_url":"https://api.github.com/repos/citra-emu/citra/pulls{/number}","milestones_url":"https://api.github.com/repos/citra-emu/citra/milestones{/number}","notifications_url":"https://api.github.com/repos/citra-emu/citra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citra-emu/citra/labels{/name}","releases_url":"https://api.github.com/repos/citra-emu/citra/releases{/id}","deployments_url":"https://api.github.com/repos/citra-emu/citra/deployments","created_at":"2014-05-16T18:33:15Z","updated_at":"2018-07-29T08:35:24Z","pushed_at":"2018-07-29T08:35:18Z","git_url":"git://github.com/citra-emu/citra.git","ssh_url":"git@github.com:citra-emu/citra.git","clone_url":"https://github.com/citra-emu/citra.git","svn_url":"https://github.com/citra-emu/citra","homepage":"https://citra-emu.org","size":37399,"stargazers_count":4135,"watchers_count":4135,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":925,"mirror_url":null,"archived":false,"open_issues_count":370,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":925,"open_issues":370,"watchers":4135,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/4020"},"html":{"href":"https://github.com/citra-emu/citra/pull/4020"},"issue":{"href":"https://api.github.com/repos/citra-emu/citra/issues/4020"},"comments":{"href":"https://api.github.com/repos/citra-emu/citra/issues/4020/comments"},"review_comments":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/4020/comments"},"review_comment":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/4020/commits"},"statuses":{"href":"https://api.github.com/repos/citra-emu/citra/statuses/c7935d14fa659c3c9970db9e1ed56e6ec296b7b9"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"B3n30"}}