Bitcoin Forum
May 07, 2024, 03:33:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how to check is private key valid?  (Read 2303 times)
fred21 (OP)
Member
**
Offline Offline

Activity: 154
Merit: 29


View Profile
June 20, 2017, 10:30:31 AM
 #1

Hello,

I have created a paper wallet. I have a encrypted private key with password and a bitcoin public address.

using bitaddress.org, Ihave tried to decrypt the private key with password (doing this offline) and this worked fine : I recover the BTC address and the private key with no encryption...

However, I am wondering if this is enough to make sure that my private key is valid?

thanks

 
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715052828
Hero Member
*
Offline Offline

Posts: 1715052828

View Profile Personal Message (Offline)

Ignore
1715052828
Reply with quote  #2

1715052828
Report to moderator
1715052828
Hero Member
*
Offline Offline

Posts: 1715052828

View Profile Personal Message (Offline)

Ignore
1715052828
Reply with quote  #2

1715052828
Report to moderator
1715052828
Hero Member
*
Offline Offline

Posts: 1715052828

View Profile Personal Message (Offline)

Ignore
1715052828
Reply with quote  #2

1715052828
Report to moderator
CoinLearn
Sr. Member
****
Offline Offline

Activity: 329
Merit: 251


View Profile
June 20, 2017, 12:28:15 PM
 #2

Hello,

I have created a paper wallet. I have a encrypted private key with password and a bitcoin public address.

using bitaddress.org, Ihave tried to decrypt the private key with password (doing this offline) and this worked fine : I recover the BTC address and the private key with no encryption...

However, I am wondering if this is enough to make sure that my private key is valid?

thanks

 

IMHO, a good way to cross verify is using https://coinb.in. Download the source from Github and open it offline. Then provide your private key in WIF to see if that corresponds to the same bitcoin address as generated by bitaddress.org.
krogothmanhattan
Cypher Hodl LLC
Legendary
*
Offline Offline

Activity: 2520
Merit: 3236


The Stone the masons rejected was the cornerstone.


View Profile WWW
June 20, 2017, 12:56:00 PM
 #3

I had the same question...go here



https://bitcointalk.org/index.php?topic=1965815.msg19583573#msg19583573

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
fred21 (OP)
Member
**
Offline Offline

Activity: 154
Merit: 29


View Profile
June 21, 2017, 08:32:17 PM
 #4

IMHO, a good way to cross verify is using https://coinb.in. Download the source from Github and open it offline. Then provide your private key in WIF to see if that corresponds to the same bitcoin address as generated by bitaddress.org.

Is that not doing the same thing as using "wallet details" section offline of bitaddress.org?

thanks
fred21 (OP)
Member
**
Offline Offline

Activity: 154
Merit: 29


View Profile
June 22, 2017, 10:32:08 AM
Merited by ABCbits (1)
 #5

 if I understand well : private key is a combining of random number between 1 and 10^77.

From this private key is derived a bitcoin address with a precise algorithm.

As long as you send BTC to this bitcoin address which has been derived from your private key : you can safely say that you have the control of your fund and that your private key is valid.

can someone confirm?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4623



View Profile
June 22, 2017, 12:28:59 PM
 #6

if I understand well : private key is a combining of random number between 1 and 10^77.

From this private key is derived a bitcoin address with a precise algorithm.

As long as you send BTC to this bitcoin address which has been derived from your private key : you can safely say that you have the control of your fund and that your private key is valid.

can someone confirm?

Correct.
adaseb
Legendary
*
Online Online

Activity: 3752
Merit: 1710



View Profile
June 23, 2017, 07:46:39 PM
 #7

I had the same paranoia. There are a few things you can do.


1) Print like 10 private keys, send money to 9 of them. If they all work then chances are the remaining one should work also. Bitaddress.org I think prints 7 pub+priv key pairs at a time.

2) Sign and Verify your private key. This will confirm if the private key can actually send funds from the public key.

3) Use something like Electrum with a 2nd computer. You sign the transaction on the offline computer, and broadcast on the online computer. So you can send a small amount of BTC to an address, and try to send it, if it works then just reuse that address again.
Yes I know reuseing addresses is not recommended but quantum computers are decades away.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
fred21 (OP)
Member
**
Offline Offline

Activity: 154
Merit: 29


View Profile
June 25, 2017, 08:21:21 AM
 #8

How specifically I can " Sign and Verify your private key."? thanks
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
June 25, 2017, 08:45:39 AM
 #9

How specifically I can " Sign and Verify your private key."? thanks
You can't sign a message with some body else private key, you'll need to find "sign/verify message" in Electrum menu and if you own an address you will just have to put address in it's place in the middle, then write a message where it says "Message" and click on sign it will then gives you the signature, if you want to verify then you'll just copy paste a signature an address with message and click on verify.

🖤😏
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1076


I may write code in exchange for bitcoins.


View Profile
June 25, 2017, 07:30:03 PM
 #10

if I understand well : private key is a combining of random number between 1 and 10^77.

From this private key is derived a bitcoin address with a precise algorithm.

As long as you send BTC to this bitcoin address which has been derived from your private key : you can safely say that you have the control of your fund and that your private key is valid.

can someone confirm?

Correct.

If I recall correctly you can actually generate two bitcoin addresses from a given random number.  But it's certainly correct that the process is completely specified.  There's a python library that you can use to play around with keys from numbers, maybe 'ku' (key utils), don't remember.  Anyway, python is convenient for learning, I think, the code is pretty readable and you can use the REPL to explore interactively.
HI-TEC99
Legendary
*
Offline Offline

Activity: 2772
Merit: 2846



View Profile
June 26, 2017, 12:23:37 AM
Last edit: April 27, 2018, 11:37:24 PM by HI-TEC99
 #11

if I understand well : private key is a combining of random number between 1 and 10^77.

From this private key is derived a bitcoin address with a precise algorithm.

As long as you send BTC to this bitcoin address which has been derived from your private key : you can safely say that you have the control of your fund and that your private key is valid.

can someone confirm?

Correct.

If I recall correctly you can actually generate two bitcoin addresses from a given random number.  But it's certainly correct that the process is completely specified.  There's a python library that you can use to play around with keys from numbers, maybe 'ku' (key utils), don't remember.  Anyway, python is convenient for learning, I think, the code is pretty readable and you can use the REPL to explore interactively.

Yes, the example in the quote below shows the two different valid addresses derived from the same private key (extremely long random number).

The first notepad screenshot is of the extremely long number (in hex format) that the two Bitcoin addresses were derived from.








This is the private key copied from notepad and pasted into an offline copy of the bitaddress wedsite. Click the view details button to get the private key converted to normal formats.





This is my multibit wallet's address 1F84fkbMng6dJpGZmtycRbUe72B7XSYbeT shown on the right hand side of bitaddress. Every raw private key can convert into two different bitcoin addresses, which is why there's two.




fred21 (OP)
Member
**
Offline Offline

Activity: 154
Merit: 29


View Profile
June 26, 2017, 10:00:16 AM
 #12

HI-TEC99,

Talking about the two address (or public keys) do you mean "Bitcoin address" and "Bitcoin Adress compressed". Because this is the same thing (same address. Just one is compressed?

thanks
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
June 26, 2017, 11:34:53 AM
 #13

They're technically two different addresses... and act as such as far as transactions and balance are concerned. They are just derived from the same private key.

So, you can send coins to 1bitcoinAddress and the coins won't show in 1bitcoinCompAddr... likewise, you can send to 1bitcoinCompAddr and the coins won't show in 1bitcoinAddress. However, if you have the private key you can spend coins sent to either address.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
fred21 (OP)
Member
**
Offline Offline

Activity: 154
Merit: 29


View Profile
June 26, 2017, 12:24:42 PM
 #14

So there are exactly two public address derived from a private key. No more no less... right?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4623



View Profile
June 26, 2017, 01:56:42 PM
 #15

Talking about the two address (or public keys) do you mean "Bitcoin address" and "Bitcoin Adress compressed". Because this is the same thing (same address). Just one is compressed?

Compressed does not mean that the address is compressed.  The address is generally the same size in either.

The full name would be "compressed key address".  In other words, the key is compressed (the public key), not the address.

Addresses don't actually exist at the transaction or blockchain level.  Addresses are just an abstraction wallets use to make it easier for us humans to talk about transferring control over value.  Those addresses get translated into scripts when the wallet builds the transaction.

There are several different types of scripts, and as such a single private key can result in MANY different scripts.  Many of them would have a unique address associated, some wouldn't have any address at all, but would still be valid transactions with spendable outputs.

Pay-to-PubKeyHash (P2PKH) scripts are represented with the type of address that starts with a "1".  In that case, you must supply the public key when you spend it.  Using a compressed key address means that when you spend that output you'll only need to supply half of the public key (32 bytes).  The other half can be computed from that, which saves you 32 bytes when you spend it and results in a cheaper transaction fee.

So there are exactly two public address derived from a private key. No more no less... right?

  • There is exactly 1 uncompressed key P2PKH address
  • There is exactly 1 compressed key P2PKH address
  • There are ~2160 P2SH addresses (Addresses that start with a "3")
  • Segwit will eventually introduce 1 or more additional address types
  • There are many spendable output scripts that don't translate to an address
TechPriest
Sr. Member
****
Offline Offline

Activity: 377
Merit: 282


Finis coronat opus


View Profile
June 27, 2017, 09:48:40 PM
Last edit: June 27, 2017, 10:09:42 PM by TechPriest
 #16

1) Print like 10 private keys, send money to 9 of them. If they all work then chances are the remaining one should work also. Bitaddress.org I think prints 7 pub+priv key pairs at a time.

Sorry, but i think it's to complicated and the last key could be invalid.
If 9 keys works fine, you don't need the last one  Smiley

If I recall correctly you can actually generate two bitcoin addresses from a given random number.
Only one if you're using one algo.

But it's certainly correct that the process is completely specified.  There's a python library that you can use to play around with keys from numbers, maybe 'ku' (key utils), don't remember.  
And what name of this library? I will be very appreciate you

In science we trust!
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1076


I may write code in exchange for bitcoins.


View Profile
June 29, 2017, 05:15:32 PM
 #17

But it's certainly correct that the process is completely specified.  There's a python library that you can use to play around with keys from numbers, maybe 'ku' (key utils), don't remember.  
And what name of this library? I will be very appreciate you

Here: https://github.com/richardkiss/pycoin
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!