Use INT256_LENGTH and ADDRESS_LENGTH define
This commit is contained in:
@@ -12,7 +12,7 @@ static const uint8_t BLS12_381_FIELD_MODULUS[] = {
|
||||
0x1e, 0xab, 0xff, 0xfe, 0xb1, 0x53, 0xff, 0xff, 0xb9, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xaa, 0xab};
|
||||
|
||||
void getEth2PublicKey(uint32_t *bip32Path, uint8_t bip32PathLength, uint8_t *out) {
|
||||
uint8_t privateKeyData[32];
|
||||
uint8_t privateKeyData[INT256_LENGTH];
|
||||
cx_ecfp_256_extended_private_key_t privateKey;
|
||||
cx_ecfp_384_public_key_t publicKey;
|
||||
uint8_t yFlag = 0;
|
||||
|
||||
@@ -11,7 +11,7 @@ void handleGetPublicKey(uint8_t p1,
|
||||
unsigned int *flags,
|
||||
unsigned int *tx) {
|
||||
UNUSED(dataLength);
|
||||
uint8_t privateKeyData[32];
|
||||
uint8_t privateKeyData[INT256_LENGTH];
|
||||
uint32_t bip32Path[MAX_BIP32_PATH];
|
||||
uint32_t i;
|
||||
uint8_t bip32PathLength = *(dataBuffer++);
|
||||
|
||||
@@ -17,7 +17,7 @@ void handleProvideErc20TokenInformation(uint8_t p1,
|
||||
uint32_t offset = 0;
|
||||
uint8_t tickerLength, contractNameLength;
|
||||
uint32_t chainId;
|
||||
uint8_t hash[32];
|
||||
uint8_t hash[INT256_LENGTH];
|
||||
cx_sha256_t sha256;
|
||||
cx_ecfp_public_key_t tokenKey;
|
||||
|
||||
@@ -109,7 +109,7 @@ void handleProvideErc20TokenInformation(uint8_t p1,
|
||||
uint32_t offset = 0;
|
||||
uint8_t tickerLength;
|
||||
uint32_t chainId;
|
||||
uint8_t hash[32];
|
||||
uint8_t hash[INT256_LENGTH];
|
||||
cx_ecfp_public_key_t tokenKey;
|
||||
|
||||
tmpCtx.transactionContext.currentTokenIndex =
|
||||
|
||||
@@ -14,7 +14,7 @@ void handleSignPersonalMessage(uint8_t p1,
|
||||
unsigned int *flags,
|
||||
unsigned int *tx) {
|
||||
UNUSED(tx);
|
||||
uint8_t hashMessage[32];
|
||||
uint8_t hashMessage[INT256_LENGTH];
|
||||
if (p1 == P1_FIRST) {
|
||||
char tmp[11];
|
||||
uint32_t index;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "ui_callbacks.h"
|
||||
|
||||
unsigned int io_seproxyhal_touch_signMessage_ok(const bagl_element_t *e) {
|
||||
uint8_t privateKeyData[32];
|
||||
uint8_t privateKeyData[INT256_LENGTH];
|
||||
uint8_t signature[100];
|
||||
uint8_t signatureLength;
|
||||
cx_ecfp_private_key_t privateKey;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
static const uint8_t const EIP_712_MAGIC[] = {0x19, 0x01};
|
||||
|
||||
unsigned int io_seproxyhal_touch_signMessage712_v0_ok(const bagl_element_t *e) {
|
||||
uint8_t privateKeyData[32];
|
||||
uint8_t hash[32];
|
||||
uint8_t privateKeyData[INT256_LENGTH];
|
||||
uint8_t hash[INT256_LENGTH];
|
||||
uint8_t signature[100];
|
||||
uint8_t signatureLength;
|
||||
cx_ecfp_private_key_t privateKey;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "ui_callbacks.h"
|
||||
|
||||
unsigned int io_seproxyhal_touch_tx_ok(const bagl_element_t *e) {
|
||||
uint8_t privateKeyData[32];
|
||||
uint8_t privateKeyData[INT256_LENGTH];
|
||||
uint8_t signature[100];
|
||||
uint8_t signatureLength;
|
||||
cx_ecfp_private_key_t privateKey;
|
||||
|
||||
@@ -17,7 +17,7 @@ void handleStarkwareSignMessage(uint8_t p1,
|
||||
uint16_t dataLength,
|
||||
unsigned int *flags,
|
||||
unsigned int *tx) {
|
||||
uint8_t privateKeyData[32];
|
||||
uint8_t privateKeyData[INT256_LENGTH];
|
||||
uint32_t i;
|
||||
uint8_t bip32PathLength = *(dataBuffer);
|
||||
uint8_t offset = 1;
|
||||
|
||||
@@ -13,7 +13,7 @@ void handleStarkwareUnsafeSign(uint8_t p1,
|
||||
unsigned int *flags,
|
||||
unsigned int *tx) {
|
||||
uint32_t i;
|
||||
uint8_t privateKeyData[32];
|
||||
uint8_t privateKeyData[INT256_LENGTH];
|
||||
cx_ecfp_public_key_t publicKey;
|
||||
cx_ecfp_private_key_t privateKey;
|
||||
uint8_t bip32PathLength = *(dataBuffer);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
unsigned int io_seproxyhal_touch_stark_unsafe_sign_ok(const bagl_element_t *e) {
|
||||
cx_ecfp_private_key_t privateKey;
|
||||
uint8_t privateKeyData[32];
|
||||
uint8_t privateKeyData[INT256_LENGTH];
|
||||
uint8_t signature[72];
|
||||
unsigned int info = 0;
|
||||
uint32_t tx = 0;
|
||||
|
||||
Reference in New Issue
Block a user