summaryrefslogtreecommitdiffstats
path: root/src/core/crypto/partition_data_manager.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-01-25vfs: Move vfs files to their own directoryFearlessTobi1-3/+3
2022-04-23general: Convert source file copyright comments over to SPDXMorph1-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.
2021-11-04core: Remove unused includesameerj1-1/+0
2020-10-21Revert "core: Fix clang build"bunnei1-1/+1
2020-10-18core: Fix clang buildLioncash1-1/+1
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-08-23file_sys: Replace inclusions with forward declarations where applicableLioncash1-0/+1
Same behavior, minus unnecessary inclusions where not necessary.
2020-08-06partition_data_manager: Update master key hashesLioncash1-5/+5
Fills in some hashes that were previously unhandled.
2020-08-06partition_data_manager: Make data arrays constexprLioncash1-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.
2020-08-06partition_data_manager: Eliminate magic valueLioncash1-2/+2
We can use sizeof to make it obvious at the call site where the value is coming from.
2020-08-03aes_util: Allow SetIV to be non-allocatingLioncash1-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.
2020-04-17General: Resolve warnings related to missing declarationsLioncash1-4/+3
2019-11-12core: Migrate off deprecated mbedtls functionsLioncash1-2/+2
These functions are marked for deprecation and it's recommended that the *_ret variants be used instead.
2019-11-12crypto: Resolve sign-conversion warningsLioncash1-3/+4
2019-09-21partition_data_manager: Add accessor for decrypted PRODINFO partitionZach Hilman1-0/+4
2019-06-05partition_data_manager: Remove KIP processing and use FileSysZach Hilman1-118/+13
Previously, this TU contained the necessary headers to parse KIP/INI but now it should just use the FileSys class.
2018-10-20crypto: Use compressed sizes in offset calculation for KIP decompressionZach Hilman1-1/+2
Fixes a fatal crash on start when deriving keys.
2018-10-15crypto: Various crypto fixes for quickstart guideZach Hilman1-2/+2
2018-10-13partition_data_manager: Reserve and insert data within output vector in DecryptPackage2()Lioncash1-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.
2018-10-13partition_data_manager: Remove unused std::map instance within DecryptPackage2()Lioncash1-2/+0
Aside from emplacing elements into the map, the map itself is never actually queried for contained data.
2018-10-13partition_data_manager: Take package2_keys by const referenceLioncash1-1/+1
These are only ever read from, so we don't need to make a copy of all the keys here.
2018-10-13partition_data_manager: Move IV data to where it's needed in DecryptPackage2()Lioncash1-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.
2018-10-13partition_data_manager: Remove commented out codeLioncash1-2/+0
Commented out code shouldn't be left in without a reason indicating why in a comment.
2018-10-13key_manager/partition_data_manager: Silence truncation compiler warningsLioncash1-5/+7
2018-10-13partition_data_manager: Dehardcode array boundsLioncash1-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).
2018-10-13partition_data_manager: Take VirtualFile by const reference in constructorLioncash1-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.
2018-10-13partition_data_manager: Amend constructor initializer list orderLioncash1-2/+3
Orders the members in the exact order they would be initialized. This also prevents compiler warnings about this sort of thing.
2018-10-13partition_data_manager: Remove unused includesLioncash1-2/+1
Gets unused includes out of the headers and moves them into the cpp file if they're used there instead.
2018-10-07partition_data_manager: Rename system files for hekateZach Hilman1-37/+52
x
2018-10-07crypto: Add PartitionDataManagerZach Hilman1-0/+586
Keeps track of system files for key derivation