[FL-1958] U2F prototype (#879)

* U2F implementation prototype
* U2F data encryption and store, user confirmation request
* remove debug prints
* fix notification bug in chrome
* split u2f_alloc into u2f_init and u2f_alloc
* typo fix, furi-hal-trng -> furi-hal-random
* rand/srand redefinition
* SubGhz: a little bit of Dante.
* u2f_data naming fix

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Nikolay Minaylov
2021-12-22 23:04:08 +03:00
committed by GitHub
parent 9b62b557b4
commit 9e62f08e4d
51 changed files with 10985 additions and 123 deletions

35
applications/u2f/u2f.h Normal file
View File

@@ -0,0 +1,35 @@
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <furi.h>
typedef enum {
U2fNotifyRegister,
U2fNotifyAuth,
U2fNotifyWink,
} U2fNotifyEvent;
typedef struct U2fData U2fData;
typedef void (*U2fEvtCallback)(U2fNotifyEvent evt, void* context);
U2fData* u2f_alloc();
bool u2f_init(U2fData* instance);
void u2f_free(U2fData* instance);
void u2f_set_event_callback(U2fData* instance, U2fEvtCallback callback, void* context);
void u2f_confirm_user_present(U2fData* instance);
uint16_t u2f_msg_parse(U2fData* instance, uint8_t* buf, uint16_t len);
void u2f_wink(U2fData* instance);
#ifdef __cplusplus
}
#endif