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

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.

  • 1
    I suggest you try a command line tool, such as Libbitcoin-BX for EC-point operations in command line: github.com/libbitcoin/libbitcoin-explorer/wiki/bx-ec-to-public – James C. Jan 29 at 21:32
  • thanks james, I'd like to do without library if possible – monkeyUser Jan 29 at 21:36
  • 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 works – monkeyUser Jan 29 at 21:41
  • 1
    Have a look at the operations necessary for scalar x EC point operation, it's pretty complex with just basic CL tools: en.wikipedia.org/wiki/Elliptic_curve – James C. Jan 29 at 21:44
  • Yep you are right :) Thanks again James for your time – monkeyUser Jan 29 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.