<p>You definitely want to watch this YT video made by Shlomi Zeltsinger:
<a href="https://youtu.be/tX-XokHf_nI" rel="nofollow noreferrer">https://youtu.be/tX-XokHf_nI</a>
It covers the topic of getting randomized entropy and using hashing and RIPEMD to get private/public key pair and corresponding address.</p>

CC BY-SA 4.0
2020-02-18T23:56:16.517Z
2020-02-18T23:56:16.517Z
Tony Sanak
<p>How to make a pure Python code for Bitcoin address and private key without modules? For now I learn only how from decimal to get a hex. How from hex to private key WIF and than Bitcoin address? </p>

<pre><code>bits = 115792089237316195423570985008687907852837564279074904382605163141518111494336
bits_hex = hex(bits)
private_key = bits_hex[2:]
print(private_key)
</code></pre>

<p>With this code I get this fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8ccd3b50c0</p>

<p>I want to get this
5Km2kuu7vtFDPpxywn4u3NLpbr5jKpTB3jsuDU2KXjvkyQnjL4Q</p>

<p>and this 
1FDV9PfvAnep8LEzNc7kqSjpxtWK3G3oj4</p>

<p>and compressed private key and address</p>

<p>L5oLkpV3aqBjhki6LmvChTCV6odsp4SXM6FfU2GpngUH5fdXyvH3
1HcYwYNpthRFqUCUhAtQfG3ZAX46uMSUux</p>

<p>Can someone to help me?</p>

CC BY-SA 4.0
2020-02-16T23:39:11.913Z
You will need to be able to do the following: SHA256 hashing & RIPEMD160 hashing (for the addresses and private key), [Base58Check encoding](https://en.bitcoin.it/wiki/Base58Check_encoding) (also for the addresses and private key), [Elliptic curve point multiplication](https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication) (for getting a public key from private key), and [this post may help](https://bitcoin.stackexchange.com/questions/86234/how-to-uncompress-a-public-key) for uncompressing a public key if you use a library/solution for ECC that only gives compressed public keys.
Septem151
CC BY-SA 4.0
2020-02-16T23:44:56.140Z
You may choose to write your own implementations, but there are plenty of libraries available for you that already do these things. If you are trying to write all of it yourself, you are going to struggle with the Elliptic curve point multiplication step the most.
Septem151
<address><private-key>
How to get private key and Bitcoin address in pure Python - without modules?
Pijes
# How to get private key and Bitcoin address in pure Python - without modules?

(Asked by: username_0 on 2020-02-16)

How to make a pure Python code for Bitcoin address and private key without modules? For now I learn only how from decimal to get a hex. How from hex to private key WIF and than Bitcoin address?

```
bits = 115792089237316195423570985008687907852837564279074904382605163141518111494336
bits_hex = hex(bits)
private_key = bits_hex[2:]
print(private_key)

```

With this code I get this fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8ccd3b50c0

I want to get this
5Km2kuu7vtFDPpxywn4u3NLpbr5jKpTB3jsuDU2KXjvkyQnjL4Q

and this
1FDV9PfvAnep8LEzNc7kqSjpxtWK3G3oj4

and compressed private key and address

L5oLkpV3aqBjhki6LmvChTCV6odsp4SXM6FfU2GpngUH5fdXyvH3
1HcYwYNpthRFqUCUhAtQfG3ZAX46uMSUux

Can someone to help me?

**Tags:** address, private-key

> **Comments:**
> **username_1**: You will need to be able to do the following: SHA256 hashing & RIPEMD160 hashing (for the addresses and private key), [Base58Check encoding](https://en.bitcoin.it/wiki/Base58Check_encoding) (also for the addresses and private key), [Elliptic curve point multiplication](https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication) (for getting a public key from private key), and [this post may help](https://bitcoin.stackexchange.com/questions/86234/how-to-uncompress-a-public-key) for uncompressing a public key if you use a library/solution for ECC that only gives compressed public keys.  
> **username_1**: You may choose to write your own implementations, but there are plenty of libraries available for you that already do these things. If you are trying to write all of it yourself, you are going to struggle with the Elliptic curve point multiplication step the most.  

---

## 1 answers

### Answer by username_2 on 2020-02-18. Score: 0 | Accepted answer

You definitely want to watch this YT video made by Shlomi Zeltsinger:
<https://youtu.be/tX-XokHf_nI>
It covers the topic of getting randomized entropy and using hashing and RIPEMD to get private/public key pair and corresponding address.


---

