Create master public key after HMAC-SHA512

0

I have that result after hash_pbkdf2

5B56C417303FAA3FCBA7E57400E120A0CA83EC5A4FC9FFBA757FBE63FBD77A89A1A3BE4C67196F57C39A88B76373733891BFABA16ED27A813CEED498804C0570

enter image description here

left 256 bits are:

5B56C417303FAA3FCBA7E57400E120A0CA83EC5A4FC9FFBA757FBE63FBD77A89

in base 10 are

m = 41313771436092106966070828753784402438291933698697412643075684398900444625545

right 256 bits are

A1A3BE4C67196F57C39A88B76373733891BFABA16ED27A813CEED498804C0570

in base 10 are

G = 73111678085084231450767103284505018606851115862905010375565411946552667932016

To calculate Master Public Key I have to do

m*G

bc <<< “73111678085084231450767103284505018606851115862905010375565411946552667932016 * 41313771436092106966070828753784402438291933698697412643075684398900444625545”

result

3020519157716314193817478999423070077945694756523017007189820738431399197829981163447928137705627795431573290757393848092663806903883822516032876636948720

that result is not correct

monkeyUser

Posted 2019-01-29T21:22:30.293

Reputation: 245

Answers

0

m*G

bc <<< “73111678085084231450767103284505018606851115862905010375565411946552667932016 * 41313771436092106966070828753784402438291933698697412643075684398900444625545”

Careful, G is a secp256k1 elliptic curve generator point. You cannot multiply it as you would a scalar. You need a secp256k1 library to perform scalar x EC-Point operations.

James C.

Posted 2019-01-29T21:22:30.293

Reputation: 2 183

1

I suggest you try a command line tool, such as Libbitcoin-BX for EC-point operations in command line: https://github.com/libbitcoin/libbitcoin-explorer/wiki/bx-ec-to-public

James C. 2019-01-29T21:32:07.837

thanks james, I'd like to do without library if possiblemonkeyUser 2019-01-29T21:36:54.757

that library is very powerful, with bx ec-to-public 5B56C417303FAA3FCBA7E57400E120A0CA83EC5A4FC9FFBA757FBE63FBD77A89 I can find Public Key compressed, But i'd like to use even A1A3BE4C67196F57C39A88B76373733891BFABA16ED27A813CEED498804C0570 and understand how it worksmonkeyUser 2019-01-29T21:41:42.097

1

Have a look at the operations necessary for scalar x EC point operation, it's pretty complex with just basic CL tools: https://en.wikipedia.org/wiki/Elliptic_curve

James C. 2019-01-29T21:44:03.150

Yep you are right :) Thanks again James for your timemonkeyUser 2019-01-29T21:45:17.793