<p>Then you probably want a light wallet that supports offline signing. Download <a href="https://electrum.org" rel="nofollow noreferrer">Electrum</a> and install it on 2 systems, one with access to Internet (&quot;hot&quot;), and one with no access to Internet (&quot;cold&quot;).</p>
<p>On the &quot;cold&quot; system simply create a new wallet (file-&gt;new), and store your wallet seed phrase somewhere safe. Open the wallet and then open the information window (Wallet-&gt;Information). You should see a &quot;master public key&quot; displayed, starting with something like <code>xpub661MyMw...</code>. Copy the whole thing to a text file and save it to some USB drive.</p>
<p>On the &quot;hot&quot; system, go to (file-&gt;new/restore) and instead of creating a new wallet select &quot;use public or private keys&quot; and then paste the <code>xpub...</code> string from your text file into the box. This will create a &quot;watch-only&quot; wallet, one that is connected to the Internet and can see all the transactions that belong to you, but it cannot spend anything.</p>
<p>When you want to spend, you will have to use the &quot;hot&quot; wallet to create an unsigned transaction, save it into a file, transfer it to the &quot;cold&quot; wallet using USB drive, open the &quot;cold wallet and sign the file, then transfer it back to the &quot;hot&quot; wallet and broadcast the transaction to the Bitcoin network.</p>
<p>Full guide on this procedure: <a href="https://electrum.readthedocs.io/en/latest/coldstorage.html" rel="nofollow noreferrer">https://electrum.readthedocs.io/en/latest/coldstorage.html</a></p>

CC BY-SA 4.0
2022-11-01T06:29:06.473Z
2022-11-01T06:29:06.473Z
bca-0353f40e
<p>You're going to have to trust some program, such as your operating system. Up to you where you end up drawing the line but I have two suggestions, use bitcoin core (without downloading blockchain), or use python with just the binascii, hashlib and base58 libraries.</p>
<p><strong>Bitcoin Core method:</strong></p>
<p>I'd say if you want a key pair with the least amount of trust download bitcoin core and while it's still syncing you can go to Window-&gt;Console and then type in the commands:</p>
<p><code>getnewaddress</code><br />
It will output a bitcoin address.</p>
<p>Then to get the private key use dumpprivkey</p>
<p><code>dumpprivkey 3SomeBTCAddress...</code></p>
<p>Save the output. Then you can shut everything down before your PC has to download the whole blockchain.</p>
<p>====</p>
<p><strong>Python and 16-sided die method:</strong></p>
<p>You can use a 16-sided dice to create a 64 length long hexadecimal string that can be converted to a WIF private key. Roll the 16 sided die 64 times, convert (10 - 16) to (a - f).</p>
<pre><code>import hashlib, binascii, base58

dicerolls = &quot;0123456789abcdef000000000000000000000000000000000000000000000001&quot;

pkeyvbytes = &quot;80&quot;+dicerolls

firsthash = hashlib.sha256(binascii.unhexlify(pkeyvbytes)).hexdigest()

secondhash = hashlib.sha256(binascii.unhexlify(firsthash)).hexdigest()

createkey = pkeyvbytes+secondhash[:8]

WIF = base58.b58encode(binascii.unhexlify(createkey))

print(WIF)
</code></pre>

CC BY-SA 4.0
2022-02-04T04:57:16.753Z
2022-02-04T04:57:16.753Z
m1xolyd1an
<p>I don’t see how you can do that without trusting any program unless you do it by hand or you write your own program (which is probably going to depend on another program)</p>
<p>A more pragmatic solution is to use some program to generate your keys but use it in an air-gapped computer in order to prevent it from stealing your keys.</p>

CC BY-SA 4.0
2022-02-03T15:37:03.270Z
2022-02-03T15:37:03.270Z
Mike D
<p>I want to have a bitcoin wallet(public key and private key) <em><strong>without</strong></em>: downloading BTC blockchain (due to slow network, low disc space, expensive internet in my country)
Trust any program,app,website, ...
buying a cold wallet(Not enough fund, Its not profitable for me)
What is the solution?
your sincerely
Maysam</p>

<wallet>
Generating bitoin private key and public key(like paper walle) without trusting third party
maysam saeedi
# Generating bitoin private key and public key(like paper walle) without trusting third party

(Asked by: username_0 on 2022-02-03)

I want to have a bitcoin wallet(public key and private key) ***without***: downloading BTC blockchain (due to slow network, low disc space, expensive internet in my country)
Trust any program,app,website, ...
buying a cold wallet(Not enough fund, Its not profitable for me)
What is the solution?
your sincerely
username_0

**Tags:** wallet


---

## 3 answers

### Answer by username_1 on 2022-11-01. Score: 1

Then you probably want a light wallet that supports offline signing. Download [Electrum](https://electrum.org) and install it on 2 systems, one with access to Internet ("hot"), and one with no access to Internet ("cold").

On the "cold" system simply create a new wallet (file->new), and store your wallet seed phrase somewhere safe. Open the wallet and then open the information window (Wallet->Information). You should see a "master public key" displayed, starting with something like `xpub661MyMw...`. Copy the whole thing to a text file and save it to some USB drive.

On the "hot" system, go to (file->new/restore) and instead of creating a new wallet select "use public or private keys" and then paste the `xpub...` string from your text file into the box. This will create a "watch-only" wallet, one that is connected to the Internet and can see all the transactions that belong to you, but it cannot spend anything.

When you want to spend, you will have to use the "hot" wallet to create an unsigned transaction, save it into a file, transfer it to the "cold" wallet using USB drive, open the "cold wallet and sign the file, then transfer it back to the "hot" wallet and broadcast the transaction to the Bitcoin network.

Full guide on this procedure: <https://electrum.readthedocs.io/en/latest/coldstorage.html>


---

### Answer by username_2 on 2022-02-04. Score: 0

You're going to have to trust some program, such as your operating system. Up to you where you end up drawing the line but I have two suggestions, use bitcoin core (without downloading blockchain), or use python with just the binascii, hashlib and base58 libraries.

**Bitcoin Core method:**

I'd say if you want a key pair with the least amount of trust download bitcoin core and while it's still syncing you can go to Window->Console and then type in the commands:

`getnewaddress`  
It will output a bitcoin address.

Then to get the private key use dumpprivkey

`dumpprivkey 3SomeBTCAddress...`

Save the output. Then you can shut everything down before your PC has to download the whole blockchain.

====

**Python and 16-sided die method:**

You can use a 16-sided dice to create a 64 length long hexadecimal string that can be converted to a WIF private key. Roll the 16 sided die 64 times, convert (10 - 16) to (a - f).

```
import hashlib, binascii, base58

dicerolls = "0123456789abcdef000000000000000000000000000000000000000000000001"

pkeyvbytes = "80"+dicerolls

firsthash = hashlib.sha256(binascii.unhexlify(pkeyvbytes)).hexdigest()

secondhash = hashlib.sha256(binascii.unhexlify(firsthash)).hexdigest()

createkey = pkeyvbytes+secondhash[:8]

WIF = base58.b58encode(binascii.unhexlify(createkey))

print(WIF)

```


---

### Answer by username_3 on 2022-02-03. Score: 0

I don’t see how you can do that without trusting any program unless you do it by hand or you write your own program (which is probably going to depend on another program)

A more pragmatic solution is to use some program to generate your keys but use it in an air-gapped computer in order to prevent it from stealing your keys.


---

