0
$\begingroup$

I'm trying to protect a key using a PIN code. However, if the user somehow loses the PIN code, I'd like to be able to allow recovery using a PUK (similar behaviour as for instance your SIM card on your phone). How would I go about implementing this, whilst storing as little private data as possible? Are there crypto schemes that describe this functionality?

$\endgroup$
  • 3
    $\begingroup$ Note that the typical complexities of PINs / PUKs (eg 4-8 digits) are inappropriate for security if no hardware-backed rate-limiting is involved. $\endgroup$ – SEJPM Jun 9 at 10:30
  • $\begingroup$ Makes sense. How about adding the PIN/PUK in the KDF function, either as key, salt or as info (assuming X9.63 KDF or HKDF), would that improve anything? I believe the question still holds then, but instead PIN and PUK should be changed to ‘derived PIN’ etc $\endgroup$ – Craz1k0ek Jun 9 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.