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

Xch/crypto helpers #385

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions lib_standard_app/crypto_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ WARN_UNUSED_RESULT cx_err_t bip32_derive_with_seed_init_privkey_256(
CX_CHECK(cx_ecfp_init_private_key_no_throw(curve, raw_privkey, length, privkey));

end:
explicit_bzero(&raw_privkey, sizeof(raw_privkey));
explicit_bzero(raw_privkey, sizeof(raw_privkey));

if (error != CX_OK) {
// Make sure the caller doesn't use uninitialized data in case
// the return code is not checked.
explicit_bzero(&privkey, sizeof(privkey));
explicit_bzero(privkey, sizeof(cx_ecfp_256_private_key_t));
}
return error;
}
Expand Down