Skip to content
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

U2F Zero key derivation algorithm could be explained in more detail #73

Open
vojnovski opened this issue Jan 20, 2018 · 5 comments
Open

Comments

@vojnovski
Copy link

Currently, without doing a full analysis of the code, the key derivation algorithm used is not evident.

Something akin to https://developers.yubico.com/U2F/Protocol_details/Key_generation.html might be a good addition to the documentation.

Furthermore, it might be good to explain that the u2f fob programming should be done on a secure environment as the master key is generated there and then subsequently copied to the EFM8 and the ATECC.

#38 and #66 talk about this as well, and resources from there can be reused for documentation.

@vojnovski
Copy link
Author

While here, couldn't the master key generation have been done on-device? RMASK/WMASK could then have been also calculated on-device and sent back to the client script, in order to be incorporated in the final firmware.

@gdamjan
Copy link

gdamjan commented Jan 24, 2018

or alternativly, just left in a know place on the flash memory to be reused by the firmware which could then be generic.

@conorpp
Copy link
Owner

conorpp commented Jan 26, 2018

I remember using that diagram as a reference when I did the key derivation. The algorithm is very similar, doing a HMAC using a device secret, AppID, and random number.

I agree with your point about having a secure environment for key generation.

I'm planning to update the documentation later this weekend.

@conorpp
Copy link
Owner

conorpp commented Jan 26, 2018

@vojnovski yes key generation could be done on the device instead. The hardware number generator on the ATECC508 is cryptographically based on a tamper resistant seed. So if how Atmel set that seed up was to get compromised somehow, than at least key generation would still be secure since other RNG numbers were mixed in at the start. At least, that was what I was initially thinking. A user's computer getting compromised during programming might be more likely :)

@szszszsz
Copy link

szszszsz commented Aug 3, 2018

Hi! Here is our work-in-progress attempt to document the process: security_architecture.md. Any feedback appreciated!

(except some of the source code references, it should be the same with U2F-Zero)

Edit: merged to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants