Bitcoin Forum
April 26, 2024, 07:09:14 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: BIP0032 Mistake  (Read 1490 times)
MatthewLM (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1004


View Profile
October 18, 2013, 04:00:46 PM
 #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.
1714115354
Hero Member
*
Offline Offline

Posts: 1714115354

View Profile Personal Message (Offline)

Ignore
1714115354
Reply with quote  #2

1714115354
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714115354
Hero Member
*
Offline Offline

Posts: 1714115354

View Profile Personal Message (Offline)

Ignore
1714115354
Reply with quote  #2

1714115354
Report to moderator
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
October 18, 2013, 04:09:52 PM
 #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
MatthewLM (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1004


View Profile
October 18, 2013, 04:14:51 PM
 #3

Quote
The places where mod n is used are not EC operations.

Of-course, silly me.  Wink It all makes sense then.
Crowex
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
October 18, 2013, 06: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
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
October 18, 2013, 07:13:51 PM
 #5

I pointed that mistake out over a month ago.
Where?
Crowex
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
October 18, 2013, 07: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?
Crowex
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
October 18, 2013, 08:09:30 PM
 #7

https://bitcointalk.org/index.php?topic=287866.msg3135820#msg3135820
MatthewLM (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1004


View Profile
October 20, 2013, 08: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?
Jan
Legendary
*
Offline Offline

Activity: 1043
Merit: 1002



View Profile
October 20, 2013, 08: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.

Mycelium let's you hold your private keys private.
MatthewLM (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1004


View Profile
October 20, 2013, 09: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.
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
October 20, 2013, 09:26:19 PM
 #11

Keys resulting from BIP32 must always be compressed, it's part of the specification.
MatthewLM (OP)
Legendary
*
Offline Offline

Activity: 1190
Merit: 1004


View Profile
October 20, 2013, 09: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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!