If you want to learn how to understand the performance of the whole system I can recommend Brendan Gregg's Systems Performance: Enterprise and the Cloud (https://www.brendangregg.com/blog/2020-07-15/systems-perform...). It is a good book that teaches a lot of basics and techniques and gives a good understanding of the impact different system components can have on performance.
Even in the US the case law around self-incrimination due to forced password disclosure does not seem to be settled. There have been multiple cases were judges have considered passwords foregone conclusions, e.g. [1]
I can recommend https://realpython.com/products/cpython-internals-book/ as a decent initial documentation of cpython. I have a copy of this book at my desk for the few cases when I need to debug GIL or memory allocator related issues in cpython.
Especially if you need x64 assembly for performance optimization or during profiling a combination of godbolt (https://godbolt.org/) and Agner Fog's incredible PDFs at https://agner.org/optimize/ (especially parts 2, 3 and 4) are helpful.
The other useful step has been to write C functions and compile the code with a good compiler (good experiences with Intel, gcc and llvm) first at -O0 and later at -O2 or -O3 to understand how high level concepts can be translated to assembly.
This requires to have at least a basic understanding of registers and basic assembly concepts but at least has helped me apply the concepts to real code.