1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

make SignIdentity.challenge_hidden and SignIdentity.challenge_visual longer (256 bytes)

This commit is contained in:
Pavol Rusnak 2015-04-02 17:19:07 +02:00
parent ba73f43f71
commit 795f70075b
3 changed files with 6 additions and 6 deletions

View File

@ -671,7 +671,7 @@ void fsm_msgSignIdentity(SignIdentity *msg)
const HDNode *node = fsm_getDerivedNode(address_n, 5); const HDNode *node = fsm_getDerivedNode(address_n, 5);
if (!node) return; if (!node) return;
uint8_t message[128]; uint8_t message[256 + 256];
memcpy(message, msg->challenge_hidden.bytes, msg->challenge_hidden.size); memcpy(message, msg->challenge_hidden.bytes, msg->challenge_hidden.size);
const int len = strlen(msg->challenge_visual); const int len = strlen(msg->challenge_visual);
memcpy(message + msg->challenge_hidden.size, msg->challenge_visual, len); memcpy(message + msg->challenge_hidden.size, msg->challenge_visual, len);

View File

@ -86,8 +86,8 @@ EstimateTxSize.coin_name max_size:17
SignTx.coin_name max_size:17 SignTx.coin_name max_size:17
SignIdentity.challenge_hidden max_size:64 SignIdentity.challenge_hidden max_size:256
SignIdentity.challenge_visual max_size:64 SignIdentity.challenge_visual max_size:256
SignedIdentity.address max_size:36 SignedIdentity.address max_size:36
SignedIdentity.public_key max_size:33 SignedIdentity.public_key max_size:33

View File

@ -510,7 +510,7 @@ typedef struct _ResetDevice {
typedef struct { typedef struct {
size_t size; size_t size;
uint8_t bytes[64]; uint8_t bytes[256];
} SignIdentity_challenge_hidden_t; } SignIdentity_challenge_hidden_t;
typedef struct _SignIdentity { typedef struct _SignIdentity {
@ -519,7 +519,7 @@ typedef struct _SignIdentity {
bool has_challenge_hidden; bool has_challenge_hidden;
SignIdentity_challenge_hidden_t challenge_hidden; SignIdentity_challenge_hidden_t challenge_hidden;
bool has_challenge_visual; bool has_challenge_visual;
char challenge_visual[64]; char challenge_visual[256];
} SignIdentity; } SignIdentity;
typedef struct { typedef struct {
@ -975,7 +975,7 @@ extern const pb_field_t DebugLinkLog_fields[4];
#define SimpleSignTx_size (19 + 0*TxInputType_size + 0*TxOutputType_size + 0*TransactionType_size) #define SimpleSignTx_size (19 + 0*TxInputType_size + 0*TxOutputType_size + 0*TransactionType_size)
#define TxRequest_size (18 + TxRequestDetailsType_size + TxRequestSerializedType_size) #define TxRequest_size (18 + TxRequestDetailsType_size + TxRequestSerializedType_size)
#define TxAck_size (6 + TransactionType_size) #define TxAck_size (6 + TransactionType_size)
#define SignIdentity_size (138 + IdentityType_size) #define SignIdentity_size (524 + IdentityType_size)
#define SignedIdentity_size 140 #define SignedIdentity_size 140
#define FirmwareErase_size 0 #define FirmwareErase_size 0
#define FirmwareUpload_size 2 #define FirmwareUpload_size 2