Where does Bitcoin Core keep the XOR obfuscation keys for both block data files and level DB indexes?
Question
As far as I know Bitcoin Core obfuscates both block/undo data and level DB indexes with XOR. Where are those randomly generated keys actually stored?
Is it self contained within the DB directories?
Thanks!
Answer 1
The chainstate key is stored in LevelDB under the key "\000obfuscate_key"
. (#6650)
The block and undo data key is stored in the file blocks/xor.dat
. (#28052)
Both obfuscation keys are logged on startup. They can be found in debug.log
by searching for "obfuscation key".