I know that the wallet keys file contains an encrypted version of your private keys, but am just curious what encryption algorithm is used to do this, and also where is it done in the source code?
1 Answer
- ChaCha8; the key derivation is done with CryptoNight.
- https://github.com/monero-project/monero/blob/e06530e2d97a0a44f1f954b0d9a49e522e2ca74a/src/wallet/wallet2.cpp#L1362
Specifically note L1429 which calls https://github.com/monero-project/monero/blob/e06530e2d97a0a44f1f954b0d9a49e522e2ca74a/src/crypto/chacha8.c#L43