-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API signature for resident and derived keys #17
Comments
@onlykey
The database server is assumed to be maintained by the service. |
@szszszsz @jans23 Yeah I think having separate API here makes it less likely for there to be confusion (case B). If I am a web developer and I make a mistake in implementing resident key support it might just fail over to derived keys and I might think its working even though its not using the resident keys. Also, I am not sure how you guys are looking to derive keys from origin but I was thinking this would be to use the RPID in FIDO2, unfortunately though this is different that the origin format in pre-FIDO2 so couldn't support legacy U2F only browsers. |
I'm ok with any of the two options. |
@onlykey I believe you can get the FIDO U2F origin by just hashing the RPID in FIDO2, so in such case it should not be an issue. |
A) Generic API signature for both resident and derived keys
Device API
Sign(to_be_signed_data_hash, public_key, hash, key_handle, origin)
Decrypt(to_be_decrypted_data, public_key, hash, key_handle, origin)
private_key = KDF(master key, key_handle, origin)
and verify it's validity against hash.Advantages
Disadvantage
B) Different API signatures for resident and derived keys
key_handle: e.g. 256 bit random value
JavaScript API
Same for
decrypt_wrapper
.Device API for resident keys
sign(to_be_signed_data_hash, key_id, origin)
decrypt(to_be_decrypted_data, key_id, origin)
Device API for derived keys
sign(to_be_signed_data_hash, key_handle, hash, origin)
decrypt(to_be_decrypted_data, key_handle, hash, origin)
Advantages
Disadvantage
@szszszsz @onlykey
The text was updated successfully, but these errors were encountered: