trezor-firmware icon indicating copy to clipboard operation
trezor-firmware copied to clipboard

make secret api more versatile

Open TychoVrahe opened this issue 5 months ago • 3 comments

This PR refactors secret API to accommodate needs for more complex keys handling.

Secret API is unified to be independent on optiga/tropic presence, and a specific secret_keys extension is introduced to handle these specific keys.

Secret storage layout is now model dependent.

On U5, new key variant, public, is introduced: such keys are always provided to FW and are not erased on bootloader unlock.

On T3W1 we still use original secret layout with three keys stored, change to 'root key' and derivations are left to next work.

Ad review: @andrewkozlik and @onvej-sl as you will be working on the derivations, please look over the API to see if it can work. No need to go trough implementation details if you dont want to.

TychoVrahe avatar Jun 11 '25 19:06 TychoVrahe

one more commit to: fix caching of potentially non-written public keys, and prioritize locked bootloader check in prepare_fw function: https://github.com/trezor/trezor-firmware/pull/5184/commits/6e8ed491d29b59a391dd7f90282aac08cff7b5b7

TychoVrahe avatar Jun 17 '25 08:06 TychoVrahe

one more commit to: fix caching of potentially non-written public keys, and prioritize locked bootloader check in prepare_fw function: 6e8ed49

LGTM

cepetr avatar Jun 17 '25 13:06 cepetr

I'm okay with the API.

onvej-sl avatar Jun 23 '25 14:06 onvej-sl

Thanks, i will squash & merge after freeze unless more issues pop up

TychoVrahe avatar Jun 24 '25 08:06 TychoVrahe