aboutsummaryrefslogtreecommitdiff
path: root/src/core/crypto/ctr_encryption_layer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [crypto] Rework AES CTR/XTS streaming and squash heap churn (#2782)godpow2025-10-261-25/+75
| | | | | | | | | | | | | | | | AES Updates: Replaced heap churn with stack scratch buffers tail handling now stays in-place, no more recursive transcode detours. CTR/XTS modes read in larger, aligned chunks and still handle odd offsets cleanly. XTS prefetches a few sectors ahead to reduce extra reads. AesCtrStorage writer now uses the pooled buffer properly one stack slab, chunk forward, bump counter, repeat. Result: less malloc noise, fewer watchdog spikes at startup (though mbedtls still sets the pace). This should make the loading speed slightly better than before. Make sure to test. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2782 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: godpow <thesaviorsrule@yahoo.com> Co-committed-by: godpow <thesaviorsrule@yahoo.com>
* [nca] Use better tight loop allocation schemes (none at all) for AES ↵lizzie2025-10-171-18/+31
| | | | | | | | | | | | | | | | decrypt/encrypt and force MbedTLS to use AES x86_64 instructions (#2750) Uses stack instead of allocating stuff haphazardly (16 bytes and 512 bytes respectively) - removes malloc() pollution and all that nasty stuff from tight loops Original work by Ribbit but edited by me. Will NOT bring a massive speedup since the main bottleneck is mbedtls itself, but may bring nice oddities to STARTUP TIMES nonetheless. AES instructions being forced wont affect CPUs without them since there is always a runtime check for them. Signed-off-by: lizzie lizzie@eden-emu.dev Co-authored-by: Ribbit <ribbit@placeholder.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2750 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* 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-031-1/+0
|
* core: Make variable shadowing a compile-time errorLioncash2021-05-161-2/+2
| | | | | | Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely.
* aes_util: Allow SetIV to be non-allocatingLioncash2020-08-031-5/+4
| | | | | | 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.
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-5/+6
|
* game_list: Use RegisteredCacheUnion for installedZach Hilman2018-09-041-1/+1
| | | | Reduces code
* ctr_encryption_layer: Fix bug when transcoding small dataZach Hilman2018-08-231-5/+3
| | | | Fixes a bug where data lengths of less than size 0x10 will fail or have misleading return values.
* Add missing includes and use const where applicableZach Hilman2018-08-011-4/+3
|
* Make XCI comply to review and style guidelinesZach Hilman2018-08-011-10/+10
|
* Add missing string.h includeZach Hilman2018-08-011-0/+1
|
* Remove files that are not usedZach Hilman2018-08-011-0/+56