Post
Topic
Board Development & Technical Discussion
Merits 2 from 1 user
Unharden Address Path
by
Kruddler
on 04/10/2018, 22:25:22 UTC
⭐ Merited by DarkStar_ (2)
When a BIP0044 address path is created, the CoinNumber is hardened like this (C#):

HardeningConstant = 0x80000000;

(CoinType | HardeningConstant) >> 0

Is it possible to take the hardened number and get the original unhardened coin number?

For example, if the coin is Bitcoin, the path is 0x80000000, but the coin number I want is 0. If the coin is Bitcoin cash, the path is 0x80000091, but I want 145 (0x91‬). Is there a bitwise operation I can do to get 145 0x91 from 0x80000091?

Is just subtracting safe? I.e. 0x80000091 - 0x80000000 ?