summaryrefslogtreecommitdiffstats
path: root/src/core/crypto/partition_data_manager.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* core: Remove unused includesameerj2021-11-041-1/+0
|
* Revert "core: Fix clang build"bunnei2020-10-211-1/+1
|
* core: Fix clang buildLioncash2020-10-181-1/+1
| | | | | | | Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
* file_sys: Replace inclusions with forward declarations where applicableLioncash2020-08-231-0/+1
| | | | Same behavior, minus unnecessary inclusions where not necessary.
* Merge pull request #4494 from lioncash/transcodebunnei2020-08-171-2/+2
|\ | | | | aes_util: Make use of non-template variant of Transcode
| * partition_data_manager: Eliminate magic valueLioncash2020-08-061-2/+2
| | | | | | | | | | We can use sizeof to make it obvious at the call site where the value is coming from.
* | Merge pull request #4483 from lioncash/constexpr-hexbunnei2020-08-071-94/+112
|\ \ | |/ |/| partition_data_manager: Make data arrays constexpr
| * partition_data_manager: Update master key hashesLioncash2020-08-061-5/+5
| | | | | | | | Fills in some hashes that were previously unhandled.
| * partition_data_manager: Make data arrays constexprLioncash2020-08-061-94/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously the constructor for all of these would run at program startup, consuming time before the application can enter main(). This is also particularly dangerous, given the logging system wouldn't have been initialized properly yet, yet the program would use the logs to signify an error. To rectify this, we can replace the literals with constexpr functions that perform the conversion at compile-time, completely eliminating the runtime cost of initializing these arrays.
* | aes_util: Allow SetIV to be non-allocatingLioncash2020-08-031-3/+2
|/ | | | | | In a few places, the data to be set as the IV is already within an array. We shouldn't require this data to be heap-allocated if it doesn't need to be. This allows certain callers to reduce heap churn.
* General: Resolve warnings related to missing declarationsLioncash2020-04-171-4/+3
|
* Merge pull request #3091 from lioncash/core-conversionbunnei2019-11-151-3/+4
|\ | | | | core: Make most implicit type conversion warnings errors on MSVC
| * crypto: Resolve sign-conversion warningsLioncash2019-11-121-3/+4
| |
* | core: Migrate off deprecated mbedtls functionsLioncash2019-11-121-2/+2
|/ | | | | These functions are marked for deprecation and it's recommended that the *_ret variants be used instead.
* partition_data_manager: Add accessor for decrypted PRODINFO partitionZach Hilman2019-09-211-0/+4
|
* partition_data_manager: Remove KIP processing and use FileSysZach Hilman2019-06-051-118/+13
| | | | Previously, this TU contained the necessary headers to parse KIP/INI but now it should just use the FileSys class.
* crypto: Use compressed sizes in offset calculation for KIP decompressionZach Hilman2018-10-201-1/+2
| | | | Fixes a fatal crash on start when deriving keys.
* crypto: Various crypto fixes for quickstart guideZach Hilman2018-10-151-2/+2
|
* partition_data_manager: Reserve and insert data within output vector in DecryptPackage2()Lioncash2018-10-131-20/+16
| | | | | | | | | | | | | | | | | | We can just reserve the memory then perform successive insertions instead of needing to use memcpy. This also avoids the need to zero out the output vector's memory before performing the insertions. We can also std::move the output std::vector into the destination so that we don't need to make a completely new copy of the vector, getting rid of an unnecessary allocation. Additionally, we can use iterators to determine the beginning and end ranges of the std::vector instances that comprise the output vector, as the end of one range just becomes the beginning for the next successive range, and since std::vector's iterator constructor copies data within the range [begin, end), this is more straightforward and gets rid of the need to have an offset variable that keeps getting incremented to determine where to do the next std::memcpy.
* partition_data_manager: Remove unused std::map instance within DecryptPackage2()Lioncash2018-10-131-2/+0
| | | | | Aside from emplacing elements into the map, the map itself is never actually queried for contained data.
* partition_data_manager: Take package2_keys by const referenceLioncash2018-10-131-1/+1
| | | | | These are only ever read from, so we don't need to make a copy of all the keys here.
* partition_data_manager: Move IV data to where it's needed in DecryptPackage2()Lioncash2018-10-131-3/+1
| | | | | | Given it's only used in one spot and has a fairly generic name, we can just specify it directly in the function call. This also the benefit of automatically moving it.
* partition_data_manager: Remove commented out codeLioncash2018-10-131-2/+0
| | | | | Commented out code shouldn't be left in without a reason indicating why in a comment.
* key_manager/partition_data_manager: Silence truncation compiler warningsLioncash2018-10-131-5/+7
|
* partition_data_manager: Dehardcode array boundsLioncash2018-10-131-5/+5
| | | | | | Instead, we can make it part of the type and make named variables for them, so they only require one definition (and if they ever change for whatever reason, they only need to be changed in one spot).
* partition_data_manager: Take VirtualFile by const reference in constructorLioncash2018-10-131-1/+1
| | | | | | Given the VirtualFile instance isn't stored into the class as a data member, or written to, this can just be turned into a const reference, as the constructor doesn't need to make a copy of it.
* partition_data_manager: Amend constructor initializer list orderLioncash2018-10-131-2/+3
| | | | | Orders the members in the exact order they would be initialized. This also prevents compiler warnings about this sort of thing.
* partition_data_manager: Remove unused includesLioncash2018-10-131-2/+1
| | | | | Gets unused includes out of the headers and moves them into the cpp file if they're used there instead.
* partition_data_manager: Rename system files for hekateZach Hilman2018-10-071-37/+52
| | | | x
* crypto: Add PartitionDataManagerZach Hilman2018-10-071-0/+586
Keeps track of system files for key derivation