diff --git a/doc/ethapp.asc b/doc/ethapp.asc index 878223c..d57e13c 100644 --- a/doc/ethapp.asc +++ b/doc/ethapp.asc @@ -322,7 +322,7 @@ This command has been supported since firmware version 1.5.0 This command returns an Ethereum 2 BLS12-381 public key derived following EIP 2333 specification (https://eips.ethereum.org/EIPS/eip-2333) -This command has been supported since firmware version 1.5.0 +This command has been supported since firmware version 1.6.0 #### Coding diff --git a/src_features/getEth2PublicKey/cmd_getEth2PublicKey.c b/src_features/getEth2PublicKey/cmd_getEth2PublicKey.c index 34696b0..b6c5618 100644 --- a/src_features/getEth2PublicKey/cmd_getEth2PublicKey.c +++ b/src_features/getEth2PublicKey/cmd_getEth2PublicKey.c @@ -22,8 +22,8 @@ void getEth2PublicKey(uint32_t *bip32Path, uint8_t bip32PathLength, uint8_t *out memmove(tmp + 16, privateKeyData, 32); cx_ecfp_init_private_key(CX_CURVE_BLS12_381_G1, tmp, 48, &privateKey); cx_ecfp_generate_pair(CX_CURVE_BLS12_381_G1, &publicKey, &privateKey, 1); - memset(tmp, 0, 96); - memset((void*)&privateKey, 0, sizeof(cx_ecfp_256_extended_private_key_t)); + explicit_bzero(tmp, 96); + explicit_bzero((void*)&privateKey, sizeof(cx_ecfp_256_extended_private_key_t)); tmp[47] = 2; cx_math_mult(tmp, publicKey.W + 1 + 48, tmp, 48); if (cx_math_cmp(tmp + 48, BLS12_381_FIELD_MODULUS, 48) > 0) { diff --git a/src_features/setEth2WithdrawalIndex/cmd_setEth2WithdrawalIndex.c b/src_features/setEth2WithdrawalIndex/cmd_setEth2WithdrawalIndex.c index 1dfa19f..ff1bc03 100644 --- a/src_features/setEth2WithdrawalIndex/cmd_setEth2WithdrawalIndex.c +++ b/src_features/setEth2WithdrawalIndex/cmd_setEth2WithdrawalIndex.c @@ -5,8 +5,6 @@ void handleSetEth2WithdrawalIndex(uint8_t p1, uint8_t p2, uint8_t *dataBuffer, uint16_t dataLength, unsigned int *flags, unsigned int *tx) { - UNUSED(dataLength); - if (dataLength != 4) { THROW(0x6700); }