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

Update qtum electrum path #10

Merged
merged 1 commit into from
Oct 12, 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
Update qtum electrum path
timemarkovqtum committed Oct 12, 2023
commit 0ac9b38888bf71f6258ee7ae24184e4a9cf9d0ef
6 changes: 3 additions & 3 deletions src/handler/get_extended_pubkey.c
Original file line number Diff line number Diff line change
@@ -33,10 +33,10 @@ static bool is_path_safe_for_pubkey_export(const uint32_t bip32_path[],
size_t bip32_path_len,
const uint32_t coin_types[],
size_t coin_types_length) {
// Exception for Electrum: it historically used "m/4541509h/1112098098h"
// Exception for Qtum Electrum: it historically used "m/44h/88h/4541509h/1112098098h"
// to derive encryption keys, so we whitelist it.
if (bip32_path_len == 2 && bip32_path[0] == (4541509 ^ H) &&
bip32_path[1] == (1112098098 ^ H)) {
if (bip32_path_len == 4 && bip32_path[0] == (44 ^ H) && bip32_path[1] == (88 ^ H) &&
bip32_path[2] == (4541509 ^ H) && bip32_path[3] == (1112098098 ^ H)) {
return true;
} else if (bip32_path_len == 2 && bip32_path[0] == (0 ^ H) && bip32_path[1] == (45342 ^ H)) {
// Exception for "m/0h/45342h"