Sounds risk to me. I just could scan your face in public to rug you?
Just built Passkey39: a library that generates the same crypto private key every time you use your Face ID or Touch ID. No more seed phrases to lose, your biometric authentication becomes your deterministic wallet key through WebAuthn magic.
What do you think? I'm curious if it's a good or bad idea 🤔
👉 https://github.com/dolu89/passkey39
🎯 Live demo: https://passkey39.dolu.dev
(Not published to npm until it's safe to use)
Discussion
No, that's not how it works 😄 The private keys are generated using YOUR biometrics on YOUR specific device. You can't scan my face with your phone to access my wallet - the passkey is tied to my device's secure hardware, not just my face.
Does that mean that it can also be accessed via some backup pin also?
Is this really your fingerprint or just a random key generated and stored in the secure element?
If I delete and re-register my fingerprints with say my thumb, will it still work? will it work with my finger or my thumb?
It's neither your actual fingerprint nor a random key - it's more complex. When you create a passkey, your device generates a random private key and stores it in the secure element. Your biometric (fingerprint/face) is just the unlock mechanism for that key, not the key itself.
⚠ So if you delete and re-register a new passkey, you will not be able to restore your old private key!
So it's a random key, I think the nuance you are trying to make is that the key is created and kept in the secure element.
My follow up to that would be this:
AFAIK, you cannot do SECP256K1 on these secure elements. So how do you secure the key and use it?
AFAIK, usually you create a key in the secure element, then create another key, encrypt it with the first key and then save it to a file.
This way you can decrypt the file and load the key into memory during use, but the decryption key never leaves the secure element.
I think.
My implementation is really basic. I use the passkey's signature as Input in HKDF. Not an expert, maybe it's a really bad idea?
The workflow you described with 2 keys looks great, but I'm not sure how it can be deterministic?
And if the manufacturer of your phone collaborates with the attacker? Possible in theory or do they also not know the decision specifics?
Probably possible yes, I don't know.
I would use this library for an everyday wallet with <100$ on it, but not to generate my hardware wallet mnemonic for example