Bitcoin Forum
December 13, 2017, 03:48:52 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: BIP0032 Mistake  (Read 1406 times)
MatthewLM
Legendary
*
Offline Offline

Activity: 1092



View Profile WWW
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.

Bitcoin Extra Wallet | Peercoin Android Wallet
BTC: 1D5A1q5d192j5gYuWiP3CSE5fcaaZxe6E9  PPC: PH7fVn1Xs7nkUFmdwCX2ZRYfLPCSwGxAq9
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513136932
Hero Member
*
Offline Offline

Posts: 1513136932

View Profile Personal Message (Offline)

Ignore
1513136932
Reply with quote  #2

1513136932
Report to moderator
1513136932
Hero Member
*
Offline Offline

Posts: 1513136932

View Profile Personal Message (Offline)

Ignore
1513136932
Reply with quote  #2

1513136932
Report to moderator
1513136932
Hero Member
*
Offline Offline

Posts: 1513136932

View Profile Personal Message (Offline)

Ignore
1513136932
Reply with quote  #2

1513136932
Report to moderator
gmaxwell
Moderator
Legendary
*
qt
Offline Offline

Activity: 2366



View Profile
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

Bitcoin will not be compromised
MatthewLM
Legendary
*
Offline Offline

Activity: 1092



View Profile WWW
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.

Bitcoin Extra Wallet | Peercoin Android Wallet
BTC: 1D5A1q5d192j5gYuWiP3CSE5fcaaZxe6E9  PPC: PH7fVn1Xs7nkUFmdwCX2ZRYfLPCSwGxAq9
Crowex
Member
**
Offline Offline

Activity: 111


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
*
qt
Offline Offline

Activity: 2366



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

I pointed that mistake out over a month ago.
Where?

Bitcoin will not be compromised
Crowex
Member
**
Offline Offline

Activity: 111


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


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

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

Activity: 1092



View Profile WWW
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?

Bitcoin Extra Wallet | Peercoin Android Wallet
BTC: 1D5A1q5d192j5gYuWiP3CSE5fcaaZxe6E9  PPC: PH7fVn1Xs7nkUFmdwCX2ZRYfLPCSwGxAq9
Jan
Legendary
*
Offline Offline

Activity: 1043



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
Legendary
*
Offline Offline

Activity: 1092



View Profile WWW
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.

Bitcoin Extra Wallet | Peercoin Android Wallet
BTC: 1D5A1q5d192j5gYuWiP3CSE5fcaaZxe6E9  PPC: PH7fVn1Xs7nkUFmdwCX2ZRYfLPCSwGxAq9
gmaxwell
Moderator
Legendary
*
qt
Offline Offline

Activity: 2366



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

Keys resulting from BIP32 must always be compressed, it's part of the specification.

Bitcoin will not be compromised
MatthewLM
Legendary
*
Offline Offline

Activity: 1092



View Profile WWW
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.

Bitcoin Extra Wallet | Peercoin Android Wallet
BTC: 1D5A1q5d192j5gYuWiP3CSE5fcaaZxe6E9  PPC: PH7fVn1Xs7nkUFmdwCX2ZRYfLPCSwGxAq9
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!