Utilizing Python: create a personal key of my selecting, then generate public key and tackle

0
9
Utilizing Python: create a personal key of my selecting, then generate public key and tackle


I am on the lookout for a easy, straightforward to make use of Bitcoin library for Python.

What I need to do is confirm I can enter a hex personal key that I would like, and get the anticipated pubkey in compressed format, and the 1Btc… tackle.

I’ve checked out cryptotools on github which seemed promising, and straightforward to make use of, however it could not settle for a hex worth that wasn’t a a number of of two. I do know that sounds odd, however I would like to have the ability to enter a hex worth like c12 and have it work as anticipated (until I’ve to enter 0c12 and that can work, with the main zero discarded). I count on than after I enter 0cfa721d that this shall be interpreted as large endian.

bitcoinlib appears promising, however I discover it complicated and I’ve tried for a few hours however not sure of the way to get what I would like.

  1. Enter personal key in hex
  2. Get again pub key in hash160 format, compressed
  3. Get the 1Btc… tackle as nicely.

I’m wondering if this can be a strict mathematical relationship. As an example might there be an arbitrary or infinite variety of pub keys from the personal key? Is there a manner to make sure I get the pubkey I would like from the personal key? I need to check identified personal keys with the pubkey and BTC tackle generated that corresponds to identified personal keys and addresses, so I can attempt to determine how whoever generated these addresses from selections of personal keys I can attempt to replicate and do the identical factor myself.

Thanks for any assist or recommendations.

LEAVE A REPLY

Please enter your comment!
Please enter your name here