Clarification on Master Key Encryption Key (MKEK) stored in OTP memory in RP2350 FIDO2 firmware #179
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I’m working with the FIDO2 firmware on the RP2350 and need clarification on the difference between using the Master Key Encryption Key (MKEK) from OTP memory versus from the file system.
From my observations, the firmware generates both the MKEK and the device key, stores them in the OTP memory region, and then locks the OTP page.
In the fido.c file, however, the firmware also generates the MKEK value and stores it in the file system. This file system MKEK is then used throughout the code for encryption and decryption, based on my debug data.
Could you clarify at which stage of the FIDO2 workflow the MKEK and device key stored in OTP memory are actually used?
Am I missing any steps required to enable the firmware to use the MKEK and device key from OTP memory instead of the file system?
MKEK is the key used for encrypting the keys. At the same time, MKEK is also encrypted with a hash of the PIN. Therefore, without the PIN, it is not possible encrypt any key without brute force. Additionally, for OTP boards (RP2350 and ESP32), MKEK is xored with an OTP key to add an extra layer of security (for instance, it will avoid dumping in case someone knows your PIN, albeit this is only for RP2350 and ESP32).
You don't need to "enable the firmware". This runs smoothly on the first boot without user intervention.
you mean that i needn`t enable secure boot