port to device, working
This commit is contained in:
@@ -54,14 +54,16 @@
|
||||
// Returns public key OR pinAuth
|
||||
|
||||
// Only response to this challenge to prevent interference
|
||||
#define CHALLENGE_PIN "\xf6\xa2\x3c\xa4\x0a\xf9\xda\xd4\x5f\xdc\xba\x7d\xc9\xde\xcb\xed\xb5\x84\x64\x3a\x4c\x9f\x44\xc2\x04\xb0\x17\xd7\xf4\x3e\xe0\x3f"
|
||||
#define WALLET_TAG "\x8C\x27\x90\xf6"
|
||||
|
||||
#define WALLET_MIN_LENGTH (4 + 4 + 16)
|
||||
|
||||
#define WALLET_VERSION "WALLET_V1.0"
|
||||
|
||||
#define MAX_CHALLENGE_SIZE 233
|
||||
#define MAX_KEYID_SIZE 232
|
||||
#define MAX_CHALLENGE_SIZE 229
|
||||
#define MAX_KEYID_SIZE 228
|
||||
|
||||
#define MAX_PAYLOAD_SIZE (255 - 16 - 4)
|
||||
#define MAX_PAYLOAD_SIZE (255 - 16 - 4 - 4)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -69,14 +71,17 @@ typedef struct
|
||||
uint8_t p1;
|
||||
uint8_t p2;
|
||||
uint8_t numArgs;
|
||||
uint8_t tag[4];
|
||||
uint8_t pinAuth[16];
|
||||
uint8_t payload[MAX_PAYLOAD_SIZE];
|
||||
}__attribute__((packed)) wallet_request;
|
||||
|
||||
|
||||
|
||||
int16_t bridge_u2f_to_wallet(uint8_t * chal, uint8_t * appid, uint8_t klen, uint8_t * keyh);
|
||||
|
||||
// return 1 if request is a wallet request
|
||||
int is_wallet_device(uint8_t * req, int len);
|
||||
|
||||
void wallet_init();
|
||||
|
||||
#endif /* WALLET_H_ */
|
||||
|
Reference in New Issue
Block a user