Skip to content

Conversation

douglasbakkum
Copy link
Member

Update pairing between device and mobile app and use an hmac. The ECDH code is removed from commander.c and put into ecdh.c. The led abort command was deprecated while the led blink command was modified to blink 5 times quickly.

@douglasbakkum douglasbakkum force-pushed the 180730/hmac branch 3 times, most recently from e8c5f54 to 99d5fa6 Compare July 30, 2018 21:30
Copy link

@x1ddos x1ddos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for my very limited knowledge of how it all works.

unsigned char enc[inpadlen];
unsigned char iv[N_BLOCK];
uint8_t *enc_cat = malloc(sizeof(uint8_t) * (inpadlen +
N_BLOCK)); // concatenating [ iv0 | enc ]
Copy link

@x1ddos x1ddos Jul 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it would be a lot of work but just curious. Would it make sense to try and get rid of malloc? The aescbcb64_init_and_encrypt could take one additional arg, pointer to a enc_cat. They would call a hypothetical aescbcb64_encrypt_len upfront to get the size of how much they need to allocate.

Here and on other malloc places below.

@douglasbakkum douglasbakkum merged commit 7536c93 into BitBoxSwiss:master Jul 31, 2018
douglasbakkum pushed a commit that referenced this pull request Jul 31, 2018
7536c93 Update pairing mechanism and add MAC (Stephanie Stroka)
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

Successfully merging this pull request may close these issues.

3 participants