Author

Topic: BIP0032 Mistake (Read 1520 times)

legendary
Activity: 1190
Merit: 1004
October 20, 2013, 04:51:32 PM
#12
Yes of-course but the WIF wasn't designed for BIP0032. BIP0032 doesn't actually specify an import method. If master keys were generated such that the chain code was a hash of the private key you could import the HD master key by using a WIF code.
staff
Activity: 4284
Merit: 8808
October 20, 2013, 04:26:19 PM
#11
Keys resulting from BIP32 must always be compressed, it's part of the specification.
legendary
Activity: 1190
Merit: 1004
October 20, 2013, 04:09:38 PM
#10
OK thanks. I couldn't find any documentation anywhere on that, but I should be able to find it now. I don't see the point in having data as to  whether or not the public keys are compressed? Shouldn't WIF be only about the private keys where you can generate publics keys and represent them either compressed or uncompressed after importing?

EDIT: No I get it. You will need to know what type of public key is used to know what address is used.
Jan
legendary
Activity: 1043
Merit: 1002
October 20, 2013, 03:54:42 PM
#9
I found something else which doesn't make sense to me. I assume on this page "wif" means Wallet Import Format: https://en.bitcoin.it/wiki/BIP_0032_TestVectors

Then why do none of them start with 5? The first one listed is L52XzL2cMkHxqxBXRyEpnPQZGUs3uKiL3R11XbAdHigRzDozKZeW but when I run the private key though my code I get 5KasyVKwgbH5VmDomdJdevZXRMMrbdbeKa8kkYkFJrLKk4hxAP9.

Does anyone know what the problem is?

The encoding starts with L or K if the public key is supposed to be compressed, and 5 otherwise.
legendary
Activity: 1190
Merit: 1004
October 20, 2013, 03:22:34 PM
#8
I found something else which doesn't make sense to me. I assume on this page "wif" means Wallet Import Format: https://en.bitcoin.it/wiki/BIP_0032_TestVectors

Then why do none of them start with 5? The first one listed is L52XzL2cMkHxqxBXRyEpnPQZGUs3uKiL3R11XbAdHigRzDozKZeW but when I run the private key though my code I get 5KasyVKwgbH5VmDomdJdevZXRMMrbdbeKa8kkYkFJrLKk4hxAP9.

Does anyone know what the problem is?
member
Activity: 111
Merit: 10
member
Activity: 111
Merit: 10
October 18, 2013, 02:29:03 PM
#6
 it was at the end of this topic, I'm not sure how I link directly to it

Bitcoin / Development & Technical Discussion / Re: BIP0032 HD Wallet private key derivation incorrect?
staff
Activity: 4284
Merit: 8808
October 18, 2013, 02:13:51 PM
#5
I pointed that mistake out over a month ago.
Where?
member
Activity: 111
Merit: 10
October 18, 2013, 01:23:13 PM
#4
I was reading through BIP0032 and I found what is clearly a mistake here: https://en.bitcoin.it/wiki/BIP_0032#Public_child_key_derivation

This is wrong:

Ki = (IL + Kpar)*G = IL*G + Kpar



I pointed that mistake out over a month ago. I was wondering if someone was going to change it.  Smiley
legendary
Activity: 1190
Merit: 1004
October 18, 2013, 11:14:51 AM
#3
Quote
The places where mod n is used are not EC operations.

Of-course, silly me.  Wink It all makes sense then.
staff
Activity: 4284
Merit: 8808
October 18, 2013, 11:09:52 AM
#2
Also having "(mod n)" is pointless. It's known that the elliptic curve operations are done over a finite field and "(mod n)" is not shown consistently.
The places where mod n is used are not EC operations.

Thanks for the other report: It looks like someone confused edited the page while no one was watching:
https://en.bitcoin.it/w/index.php?title=BIP_0032&diff=40588&oldid=39104
legendary
Activity: 1190
Merit: 1004
October 18, 2013, 11:00:46 AM
#1
I was reading through BIP0032 and I found what is clearly a mistake here: https://en.bitcoin.it/wiki/BIP_0032#Public_child_key_derivation

This is wrong:

Ki = (IL + Kpar)*G = IL*G + Kpar

It should be:

Ki = (IL + kpar)*G = IL*G + Kpar

It confused me at first until I realised it was a mistake. It's only a small thing but other people might also get confused.

Also having "(mod n)" is pointless. It's known that the elliptic curve operations are done over a finite field and "(mod n)" is not shown consistently.

Other than that, everything makes sense to me.
Jump to: