Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): Handle wallet collision while creation #444

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f249df3
feat(core): Save wallet nonce while creation
amanCypherock Nov 25, 2023
9766404
fix(core): Nonce not saved during sync flow
amanCypherock Dec 1, 2023
d11ca43
Merge branch 'refactor/core-framework' into feat/save-wallet-nonce-on…
ujjwal-cyph Dec 16, 2023
062ae98
refactor(core): Refactored wallet nonce derivation and size macro rename
amanCypherock Dec 19, 2023
6c82ad8
fix(core): Updated acc to review suggestions
amanCypherock Dec 20, 2023
73979c7
feat(core): Verify fetched wallets
amanCypherock Nov 27, 2023
da01995
fix(ui): Verification failure message updated
amanCypherock Nov 27, 2023
ddbb03d
fix(core): Added log and error code for verification failures
amanCypherock Dec 11, 2023
0efecdc
fix(nfc): Updated acc to review suggestions
amanCypherock Dec 19, 2023
2db29ea
feat(core): Record card write attempt
amanCypherock Nov 27, 2023
06c299a
fix(core): Verify before delete changes
amanCypherock Dec 1, 2023
053a609
fix(core): Updated factory reset wallet checks condition
amanCypherock Dec 6, 2023
fd11071
refactor(core): Refactored acc to review suggestions
amanCypherock Dec 20, 2023
ee796b6
Merge branch 'refactor/core-framework' into feat/save-wallet-nonce-on…
ujjwal-cyph Dec 20, 2023
ea971c0
fix(core): Updated acc to review suggestions
amanCypherock Dec 20, 2023
1747f42
Merge pull request #445 from Cypherock/feat/verify-fetched-wallet/PRF…
amanCypherock Dec 20, 2023
1d6e70c
Merge pull request #446 from Cypherock/feat/verify-before-delete/PRF-…
ujjwal-cyph Dec 20, 2023
0b3ed3e
fix(core): Treat unverified wallets as non existant
amanCypherock Dec 22, 2023
4e391d9
fix(core): Changes acc to review suggestions
amanCypherock Dec 23, 2023
7d8bd84
Merge pull request #450 from Cypherock/fix/handle-unverified-wallet-b…
ujjwal-cyph Dec 26, 2023
68bae40
fix(core): Update factory reset condition to ignore write attempt
amanCypherock Dec 27, 2023
2855967
fix(core): Hard fault after wrong pin entry
amanCypherock Dec 27, 2023
be0afc5
Merge pull request #451 from Cypherock/fix/factory-reset-condiiton-up…
ujjwal-cyph Dec 27, 2023
e80e581
Merge branch 'refactor/core-framework' into feat/save-wallet-nonce-on…
ujjwal-cyph Dec 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion common/Firewall/sec_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
#include "utils.h"

#define SEC_FLASH_STRUCT_TLV_SIZE \
(6 + 3 + (MAX_WALLETS_ALLOWED * (9 + sizeof(Wallet_Share_Data))) + 3 + \
(6 + 3 + (MAX_WALLETS_ALLOWED * (12 + sizeof(Wallet_Share_Data))) + 3 + \
(MAX_KEYSTORE_ENTRY * ((4 * 3) + sizeof(Card_Keystore))))

#define FLASH_WRITE_PERM_STRUCTURE_SIZE sizeof(Flash_Perm_Struct) / 4
Expand All @@ -85,6 +85,7 @@ typedef enum Sec_Flash_tlv_tags {
TAG_SEC_FLASH_WALLET_SHARE_STRUCT = 0x11,
TAG_SEC_FLASH_WALLET_ID = 0x12,
TAG_SEC_FLASH_WALLET_SHARE = 0x13,
TAG_SEC_FLASH_WALLET_NONCE = 0x14,

TAG_SEC_FLASH_KEYSTORE = 0x30,
TAG_SEC_FLASH_KEYSTORE_USED = 0x31,
Expand Down Expand Up @@ -551,6 +552,11 @@ static void serialize_sec_fs_wallet(uint8_t *array,
TAG_SEC_FLASH_WALLET_SHARE,
BLOCK_SIZE,
sec_fs->wallet_share_data[wallet_index].wallet_share);
fill_flash_tlv(array,
starting_index,
TAG_SEC_FLASH_WALLET_NONCE,
PADDED_NONCE_SIZE,
sec_fs->wallet_share_data[wallet_index].wallet_nonce);

array[len_index] = (*starting_index) - len_index - 2;
array[len_index + 1] = ((*starting_index) - len_index - 2) >> 8;
Expand Down Expand Up @@ -710,6 +716,11 @@ static void deserialize_sec_fs_wallet(Wallet_Share_Data *wallet_share_data,
break;
}

case TAG_SEC_FLASH_WALLET_NONCE: {
memcpy(wallet_share_data->wallet_nonce, tlv + index + 2, size);
break;
}

case TAG_SEC_FLASH_WALLET_ID: {
memcpy(wallet_share_data->wallet_id, tlv + index + 2, size);
break;
Expand Down
2 changes: 2 additions & 0 deletions common/Firewall/sec_flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ typedef struct Wallet_share {
uint8_t wallet_id[WALLET_ID_SIZE]; ///< Wallet ID derived from seed
uint8_t
wallet_share[BLOCK_SIZE]; ///< Device's (5th) share derived from seed
uint8_t wallet_nonce[PADDED_NONCE_SIZE]; ///< Wallet's nonce including IV
///< and version data
} Wallet_Share_Data;
#pragma pack(pop)

Expand Down
6 changes: 4 additions & 2 deletions common/coin_support/wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ bool encrypt_shares() {
&ctx, wallet_shamir_data.mnemonic_shares[i], share, BLOCK_SIZE);
chacha20poly1305_finish(
&ctx,
(uint8_t *)(wallet_shamir_data.share_encryption_data[i] + NONCE_SIZE));
(uint8_t *)(wallet_shamir_data.share_encryption_data[i] +
PADDED_NONCE_SIZE));
memcpy(wallet_shamir_data.mnemonic_shares[i], share, BLOCK_SIZE);
}

Expand All @@ -134,7 +135,8 @@ bool decrypt_shares() {
&ctx, wallet_shamir_data.mnemonic_shares[i], share, BLOCK_SIZE);
chacha20poly1305_finish(
&ctx,
(uint8_t *)(wallet_shamir_data.share_encryption_data[i] + NONCE_SIZE));
(uint8_t *)(wallet_shamir_data.share_encryption_data[i] +
PADDED_NONCE_SIZE));
// TODO: Add mac comparison for decryption verification
memcpy(wallet_shamir_data.mnemonic_shares[i], share, BLOCK_SIZE);
}
Expand Down
9 changes: 6 additions & 3 deletions common/coin_support/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
CARD_VERSION_GIT_REV_SIZE)

#define BLOCK_SIZE 32
#define NONCE_SIZE 16
#define NONCE_SIZE 12
#define PADDED_NONCE_SIZE \
NONCE_SIZE + 4 // 3 bytes as RFU and LSB as version byte
#define HASH_SIZE 32
#define WALLET_MAC_SIZE 16
#define PIN_SHARE_SIZE 80
#define CHECKSUM_SIZE 4
Expand Down Expand Up @@ -115,7 +118,7 @@ typedef struct Wallet {
uint8_t wallet_info;
uint8_t password_double_hash[BLOCK_SIZE];

uint8_t wallet_share_with_mac_and_nonce[BLOCK_SIZE + NONCE_SIZE +
uint8_t wallet_share_with_mac_and_nonce[BLOCK_SIZE + PADDED_NONCE_SIZE +
WALLET_MAC_SIZE];
uint8_t arbitrary_data_share[512];

Expand Down Expand Up @@ -156,7 +159,7 @@ typedef struct Wallet_shamir_data {
};
uint8_t share_x_coords[TOTAL_NUMBER_OF_SHARES];
uint8_t share_encryption_data[TOTAL_NUMBER_OF_SHARES]
[NONCE_SIZE + WALLET_MAC_SIZE];
[PADDED_NONCE_SIZE + WALLET_MAC_SIZE];
} Wallet_shamir_data;
#pragma pack(pop)

Expand Down
2 changes: 1 addition & 1 deletion common/interfaces/card_interface/apdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ uint16_t create_apdu_add_wallet(const struct Wallet *wallet, uint8_t apdu[]) {
fill_tlv(apdu,
&index,
INS_WALLET_SHARE,
BLOCK_SIZE + NONCE_SIZE + WALLET_MAC_SIZE,
BLOCK_SIZE + PADDED_NONCE_SIZE + WALLET_MAC_SIZE,
wallet);
fill_tlv(apdu, &index, INS_STRUCTURE_CHECKSUM, CHECKSUM_SIZE, wallet);
fill_tlv(apdu, &index, INS_MIN_NO_OF_SHARES, 1, wallet);
Expand Down
52 changes: 48 additions & 4 deletions common/interfaces/flash_interface/flash_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ int add_wallet_to_flash(const Flash_Wallet *fwallet, uint32_t *index_OUT) {

int add_wallet_share_to_sec_flash(const Flash_Wallet *fwallet,
uint32_t *index_OUT,
const uint8_t *wallet_share) {
const uint8_t *wallet_share,
const uint8_t *wallet_nonce) {
get_flash_ram_instance(); // to load
get_sec_flash_ram_instance();
if (flash_ram_instance.wallet_count == MAX_WALLETS_ALLOWED)
Expand Down Expand Up @@ -190,6 +191,9 @@ int add_wallet_share_to_sec_flash(const Flash_Wallet *fwallet,
memcpy(sec_flash_instance.wallet_share_data[*index_OUT].wallet_share,
wallet_share,
BLOCK_SIZE);
memcpy(sec_flash_instance.wallet_share_data[*index_OUT].wallet_nonce,
wallet_nonce,
PADDED_NONCE_SIZE);
sec_flash_struct_save();
return SUCCESS_;
}
Expand Down Expand Up @@ -230,7 +234,8 @@ int put_wallet_flash(const uint8_t index, const Flash_Wallet *wallet) {
}

int put_wallet_share_sec_flash(const uint8_t index,
const uint8_t *wallet_share) {
const uint8_t *wallet_share,
const uint8_t *wallet_nonce) {
get_flash_ram_instance(); // to load
get_sec_flash_ram_instance();
if (index >= MAX_WALLETS_ALLOWED)
Expand All @@ -246,6 +251,9 @@ int put_wallet_share_sec_flash(const uint8_t index,
memcpy(sec_flash_instance.wallet_share_data[index].wallet_share,
wallet_share,
BLOCK_SIZE);
memcpy(sec_flash_instance.wallet_share_data[index].wallet_nonce,
wallet_nonce,
PADDED_NONCE_SIZE);
sec_flash_struct_save();
flash_ram_instance.wallets[index].state = VALID_WALLET;
flash_struct_save();
Expand Down Expand Up @@ -531,6 +539,42 @@ int get_flash_wallet_share_by_name(const char *name, uint8_t *wallet_share) {
return DOESNT_EXIST;
}

int get_flash_wallet_nonce_by_name(const char *name, uint8_t *wallet_nonce) {
ASSERT(name != NULL);
ASSERT(wallet_nonce != NULL);

get_flash_ram_instance(); // to load
get_sec_flash_ram_instance();
size_t name_len = strnlen(name, NAME_SIZE);
if (name_len == 0 || name_len >= NAME_SIZE)
return INVALID_ARGUMENT;
uint8_t walletIndex = 0;
for (; walletIndex < MAX_WALLETS_ALLOWED; walletIndex++) {
if (!_wallet_is_filled(walletIndex))
continue;
if (!strcmp(
(const char *)flash_ram_instance.wallets[walletIndex].wallet_name,
name)) {
if (is_wallet_share_not_present(walletIndex))
return DOESNT_EXIST;
for (int i = 0; i < WALLET_ID_SIZE; i++) {
if (flash_ram_instance.wallets[walletIndex].wallet_id[i] !=
sec_flash_instance.wallet_share_data[walletIndex].wallet_id[i]) {
flash_ram_instance.wallets[walletIndex].state =
VALID_WALLET_WITHOUT_DEVICE_SHARE;
flash_struct_save();
return DOESNT_EXIST;
}
}
memcpy(wallet_nonce,
sec_flash_instance.wallet_share_data[walletIndex].wallet_nonce,
BLOCK_SIZE);
return SUCCESS_;
}
}
return DOESNT_EXIST;
}

/**
* @brief Tells if wallet is in partial state
*
Expand Down Expand Up @@ -663,7 +707,7 @@ int set_wallet_locked(const char *wallet_name, uint8_t encoded_card_number) {
flash_wallet->is_wallet_locked = true;
memzero(&(flash_wallet->challenge), sizeof(flash_wallet->challenge));
flash_wallet->challenge.card_locked = encoded_card_number;
memset(flash_wallet->challenge.nonce, 0xFF, NONCE_SIZE);
memset(flash_wallet->challenge.nonce, 0xFF, PADDED_NONCE_SIZE);
flash_struct_save();
return SUCCESS;
}
Expand Down Expand Up @@ -743,7 +787,7 @@ int update_wallet_locked_flash(const char *name, const bool is_wallet_locked) {
flash_wallet->challenge.time_to_unlock_in_secs = 0;

// Reset nonce to 0xFF as challenge is not fetched
memset(flash_wallet->challenge.nonce, 0xFF, NONCE_SIZE);
memset(flash_wallet->challenge.nonce, 0xFF, PADDED_NONCE_SIZE);
} else {
// Wallet unlocked, reset challenge
memzero(&(flash_wallet->challenge), sizeof(flash_wallet->challenge));
Expand Down
25 changes: 22 additions & 3 deletions common/interfaces/flash_interface/flash_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ int add_wallet_to_flash(const Flash_Wallet *wallet, uint32_t *index_OUT);
*
* @param[in] fwallet a constant reference to an object of type Flash_Wallet
* @param[out] index_OUT index at which share entry is made
* @param[in] wallet_share The 5th share of wallet to be written on device
* @param[in] wallet_nonce Wallet nonce common for all shares
* @return SUCCESS, MEMORY_OVERFLOW, INVALID_ARGUMENT, ALREADY_EXISTS
* @retval SUCCESS Wallet share written to firewall region
* @retval MEMORY_OVERFLOW in case of no empty slots
Expand All @@ -72,8 +74,8 @@ int add_wallet_to_flash(const Flash_Wallet *wallet, uint32_t *index_OUT);
*/
int add_wallet_share_to_sec_flash(const Flash_Wallet *fwallet,
uint32_t *index_OUT,
const uint8_t *wallet_share);

const uint8_t *wallet_share,
const uint8_t *wallet_nonce);
/**
* @brief Deletes a wallet from flash
*
Expand Down Expand Up @@ -172,7 +174,9 @@ int put_wallet_flash(uint8_t index, const Flash_Wallet *wallet);
* @retval INVALID_ARGUMENT non-existent wallet reference or wallet_index >=
* MAX_WALLETS_ALLOWED
*/
int put_wallet_share_sec_flash(uint8_t index, const uint8_t *wallet_share);
int put_wallet_share_sec_flash(uint8_t index,
const uint8_t *wallet_share,
const uint8_t *wallet_nonce);

/**
* @brief Outputs the index of the wallet with given name
Expand Down Expand Up @@ -261,6 +265,21 @@ int get_flash_wallet_by_name(const char *name, Flash_Wallet **flash_wallet_OUT);
*/
int get_flash_wallet_share_by_name(const char *name, uint8_t *wallet_share);

/**
* Retrieves the wallet nonce associated with a given name from flash memory.
*
* @param name A pointer to a character array representing the name of the
* wallet.
* @param wallet_nonce A pointer to a uint8_t array where the wallet nonce will
* be stored.
*
* @return SUCCESS, INVALID_ARGUMENT, DOESNT_EXIST
* @retval SUCCESS Wallet found & wallet share returned
* @retval INVALID_ARGUMENT Passed name is invalid
* @retval DOESNT_EXIST Wallet does not exist with given name
*/
int get_flash_wallet_nonce_by_name(const char *name, uint8_t *wallet_nonce);

/**
* @brief Update the card states for the wallet at specified index (on deletion
* of the wallet from the given card number)
Expand Down
2 changes: 1 addition & 1 deletion common/interfaces/flash_interface/flash_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ typedef struct Flash_Wallet {
uint8_t wallet_name[NAME_SIZE];
uint8_t wallet_info;
uint8_t
wallet_share_with_mac_and_nonce[BLOCK_SIZE + NONCE_SIZE +
wallet_share_with_mac_and_nonce[BLOCK_SIZE + PADDED_NONCE_SIZE +
WALLET_MAC_SIZE]; // does not include
// MAC and nonce

Expand Down
15 changes: 15 additions & 0 deletions common/libraries/util/wallet_utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,19 @@ Card_Data_errors_t validate_wallet(Wallet *wallet) {
if (is_zero(wallet->wallet_id, sizeof(wallet->wallet_id)))
return INVALID_WALLET_ID;
return VALID_DATA;
}

void derive_wallet_nonce(
uint8_t share_encryption_data[TOTAL_NUMBER_OF_SHARES]
[PADDED_NONCE_SIZE + WALLET_MAC_SIZE]) {
uint8_t wallet_nonce[NONCE_SIZE] = {0};
random_generate(wallet_nonce, 12);

for (int i = 0; i < TOTAL_NUMBER_OF_SHARES; i++) {
// First 12 bytes of share_encryption_data are wallet nonce.
memcpy(share_encryption_data[i], wallet_nonce, 12);
ujjwal-cyph marked this conversation as resolved.
Show resolved Hide resolved
// Skip next 3 bytes as RFU
// Version byte
share_encryption_data[i][15] = 0x01;
}
}
13 changes: 13 additions & 0 deletions common/libraries/util/wallet_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,17 @@ void derive_wallet_key(uint8_t key[KEY_SIZE], const char *mnemonics);
*/
Card_Data_errors_t validate_wallet(Wallet *wallet);

/**
* @brief The function `derive_wallet_nonce` generates a random wallet nonce and
* assigns it to each share. On the share_encryption_data 2-D array, the wallet
* nonce is stored at the first 12 bytes and next 4 bytes contain RFU bytes + 1
* version byte.
*
* @param share_encryption_data This 2-D array is used to store the share
* encryption data for each share.
*/
void derive_wallet_nonce(
uint8_t share_encryption_data[TOTAL_NUMBER_OF_SHARES]
[PADDED_NONCE_SIZE + WALLET_MAC_SIZE]);

#endif
2 changes: 1 addition & 1 deletion src/card_operations/card_fetch_share.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static void _handle_retrieve_wallet_success(uint8_t xcor) {
BLOCK_SIZE);
memcpy(wallet_shamir_data.share_encryption_data[xcor],
wallet.wallet_share_with_mac_and_nonce + BLOCK_SIZE,
NONCE_SIZE + WALLET_MAC_SIZE);
PADDED_NONCE_SIZE + WALLET_MAC_SIZE);
memzero(wallet.arbitrary_data_share, sizeof(wallet.arbitrary_data_share));
memzero(wallet.wallet_share_with_mac_and_nonce,
sizeof(wallet.wallet_share_with_mac_and_nonce));
Expand Down
2 changes: 1 addition & 1 deletion src/card_operations/card_read_verify_shares.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static void read_card_share_post_process(uint8_t xcor) {
BLOCK_SIZE);
memcpy(wallet_shamir_data.share_encryption_data[xcor],
wallet.wallet_share_with_mac_and_nonce + BLOCK_SIZE,
NONCE_SIZE + WALLET_MAC_SIZE);
PADDED_NONCE_SIZE + WALLET_MAC_SIZE);
memzero(wallet.arbitrary_data_share, sizeof(wallet.arbitrary_data_share));
memzero(wallet.wallet_share_with_mac_and_nonce,
sizeof(wallet.wallet_share_with_mac_and_nonce));
Expand Down
2 changes: 1 addition & 1 deletion src/card_operations/card_write_share.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static void write_card_pre_process(uint8_t card_num) {
BLOCK_SIZE);
memcpy(wallet.wallet_share_with_mac_and_nonce + BLOCK_SIZE,
wallet_shamir_data.share_encryption_data[card_num - 1],
NONCE_SIZE + WALLET_MAC_SIZE);
PADDED_NONCE_SIZE + WALLET_MAC_SIZE);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void receive_transaction_controller_eth() {
wallet_shamir_data.mnemonic_shares[1]);
memcpy(wallet_shamir_data.share_encryption_data[1],
wallet_shamir_data.share_encryption_data[0],
NONCE_SIZE + WALLET_MAC_SIZE);
PADDED_NONCE_SIZE + WALLET_MAC_SIZE);
flow_level.level_three = RECV_TXN_DERIVE_ADD_SCREEN_ETH;
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void receive_transaction_controller_near() {
wallet_shamir_data.mnemonic_shares[1]);
memcpy(wallet_shamir_data.share_encryption_data[1],
wallet_shamir_data.share_encryption_data[0],
NONCE_SIZE + WALLET_MAC_SIZE);
PADDED_NONCE_SIZE + WALLET_MAC_SIZE);
flow_level.level_three = RECV_TXN_DERIVE_ADD_SCREEN_NEAR;
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void receive_transaction_controller_solana() {
wallet_shamir_data.mnemonic_shares[1]);
memcpy(wallet_shamir_data.share_encryption_data[1],
wallet_shamir_data.share_encryption_data[0],
NONCE_SIZE + WALLET_MAC_SIZE);
PADDED_NONCE_SIZE + WALLET_MAC_SIZE);
flow_level.level_three = RECV_TXN_DERIVE_ADD_SCREEN_SOLANA;
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void send_transaction_controller_eth() {
wallet_shamir_data.mnemonic_shares[1]);
memcpy(wallet_shamir_data.share_encryption_data[1],
wallet_shamir_data.share_encryption_data[0],
NONCE_SIZE + WALLET_MAC_SIZE);
PADDED_NONCE_SIZE + WALLET_MAC_SIZE);
flow_level.level_three = SEND_TXN_SIGN_TXN_ETH;
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ void send_transaction_controller_solana() {
wallet_shamir_data.mnemonic_shares[1]);
memcpy(wallet_shamir_data.share_encryption_data[1],
wallet_shamir_data.share_encryption_data[0],
NONCE_SIZE + WALLET_MAC_SIZE);
PADDED_NONCE_SIZE + WALLET_MAC_SIZE);
flow_level.level_three = SEND_TXN_SIGN_TXN_SOLANA;
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void sign_message_controller_eth() {
wallet_shamir_data.mnemonic_shares[1]);
memcpy(wallet_shamir_data.share_encryption_data[1],
wallet_shamir_data.share_encryption_data[0],
NONCE_SIZE + WALLET_MAC_SIZE);
PADDED_NONCE_SIZE + WALLET_MAC_SIZE);
flow_level.level_three = SIGN_MSG_SIGN_TXN_ETH;
break;

Expand Down
Loading