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

Remaining actions on FIDO2 implementation on main MCU #69

Closed
limpkin opened this issue Jan 19, 2020 · 4 comments
Closed

Remaining actions on FIDO2 implementation on main MCU #69

limpkin opened this issue Jan 19, 2020 · 4 comments

Comments

@limpkin
Copy link
Contributor

limpkin commented Jan 19, 2020

  1. if it makes sense, not use a hmac based prng anymore... create our own one to pass to the ecc functions
  • hopefully it should be as simple as tweaking hmac_drbg.c :)
  1. check for buffer overflows for ecc related functions:
  • for example br_ec_keygen returns the size written into the private key buffer, we should check it with the size of our buffer and while() in case of errors
  1. use logic_encryption_delete_context function to do house cleaning

  2. removed unused functions:

void logic_encryption_sha256_hmac_init(uint8_t const *key, uint32_t klen);
void logic_encryption_sha256_hmac_update(uint8_t const * data, size_t len);
void logic_encryption_sha256_hmac_final(uint8_t *hmac_out);

void logic_encryption_sha512_init(void);
void logic_encryption_sha512_update(uint8_t const * data, size_t len);
void logic_encryption_sha512_final(uint8_t *hash);

  1. answer remaining comments of FIDO2 merge, especially regarding logic_encryption_ecc256_derive_public_key()
@0x0ptr
Copy link
Collaborator

0x0ptr commented Jan 19, 2020

  1. Why reinvent the wheel? What does it gain us?
  2. Agree
  3. What do you want to clean and when?
  4. Yes
  5. I think I answered this in the pull request. Let me know if there is anything other than that.

@limpkin
Copy link
Contributor Author

limpkin commented Jan 19, 2020

  1. right now it's generating pseudo random bits and not real random bits
  2. any context that may have been initialized (ecc perhaps? nto sure...)
    thanks again for the great PR :)

@limpkin
Copy link
Contributor Author

limpkin commented Jan 23, 2020

2 has been implemented
3 is currently not required given line 335 of logic_encryption
4 has been done
5 has been done

1 remaining

@limpkin
Copy link
Contributor Author

limpkin commented Sep 5, 2020

closing as 1. is a nice to have but not a must

@limpkin limpkin closed this as completed Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants