add a facility to dump keys for Renode integration (or to steal keys if you can patch the firmware)

the code is commented out so it's not accidentally compiled in.
This commit is contained in:
bunnie 2022-02-15 22:24:03 +08:00
parent 1f21d8a43c
commit 38114b5cd9

View file

@ -266,6 +266,13 @@ impl<'a> RootKeys {
jtag,
fake_key,
};
/*
// dumps the key enclave -- in a format for Renode integration. Or if you just wanted to steal all the keys.
// PS: you still need to know the passwords to decrypt the keys
for i in 0..256 {
keys.keyrom.wfo(utra::keyrom::ADDRESS_ADDRESS, i);
log::info!("this.data[0x{:x}] = 0x{:x};", i, keys.keyrom.rf(utra::keyrom::DATA_DATA));
} */
keys
}