Skip to content

[BIP322] Change private key format from wif to hex#1332

Closed
azuchi wants to merge 1 commit intobitcoin:masterfrom
azuchi:fix_bip322_private_key_format
Closed

[BIP322] Change private key format from wif to hex#1332
azuchi wants to merge 1 commit intobitcoin:masterfrom
azuchi:fix_bip322_private_key_format

Conversation

@azuchi
Copy link
Copy Markdown
Contributor

@azuchi azuchi commented Jun 12, 2022

The specification for deriving a bech32 address from a wif format private key does not appear to be standardized.

Some wallets, such as Electrum, set a marker in the first byte, and BIP-0178 propose an extended WIF format.

The WIF data currently described is ambiguous as to which address is should be derived, so it would be better to describe it as a hex value.

@bitcoin bitcoin deleted a comment Jul 12, 2022
@kallewoof
Copy link
Copy Markdown
Contributor

The WIF (Wallet Import Format) is a standard for representing private keys. Whatever address type you derive from them is literally up to you. Attaching an address hint to the private key serialization is precisely what the two instances you pointed to are doing, but they're still WIF. Switching to hex seems like a downgrade, as it unnecessarily removes the checksum built into WIF, and such, for no particular reason.

@luke-jr
Copy link
Copy Markdown
Member

luke-jr commented Jul 25, 2022

@kallewoof Close this?

@murchandamus
Copy link
Copy Markdown
Member

It seems to me that the BIP author is in disagreement with this change suggestion. I recommend that this PR be closed after 2024-05-10 unless there is further activity here that indicates otherwise.

@murchandamus murchandamus added the Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified label May 8, 2024
@murchandamus
Copy link
Copy Markdown
Member

As discussed prior, I’m closing this given no additional input

@murchandamus murchandamus removed the Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants