Bitcoin Forum
April 19, 2024, 07:41:27 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: At what point does Electrum decipher a private key?  (Read 81 times)
RealMinecache (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 6


View Profile
April 14, 2021, 07:58:47 PM
 #1

Hi there,

When you create a new wallet in Electrum and opt to 'Import Bitcoin addresses or private keys' as the next step, at what point does Electrum decipher the private key? I've noticed that on the 'Import Bitcoin Addresses' window if you do not enter a valid private key the 'Next' button is greyed out until you do. Does that mean that at the point of entering in a valid private key and the Next button becomes ungreyed that Electrum as deciphered the private key as valid?

Sorry if noob question.

 
1713555687
Hero Member
*
Offline Offline

Posts: 1713555687

View Profile Personal Message (Offline)

Ignore
1713555687
Reply with quote  #2

1713555687
Report to moderator
1713555687
Hero Member
*
Offline Offline

Posts: 1713555687

View Profile Personal Message (Offline)

Ignore
1713555687
Reply with quote  #2

1713555687
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713555687
Hero Member
*
Offline Offline

Posts: 1713555687

View Profile Personal Message (Offline)

Ignore
1713555687
Reply with quote  #2

1713555687
Report to moderator
1713555687
Hero Member
*
Offline Offline

Posts: 1713555687

View Profile Personal Message (Offline)

Ignore
1713555687
Reply with quote  #2

1713555687
Report to moderator
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 14, 2021, 08:42:40 PM
 #2

Any number is technically a valid private key (once the remained is taken of division of the limit to the function - p)..

What electrum is actually checking is that the checksum and private key match. In one format I remember this being 7 characters at the end of the key (im not sure what format that was though).

Electrum may also check the checksum is present too.
RealMinecache (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 6


View Profile
April 14, 2021, 09:21:07 PM
 #3

Thanks. What I am really trying to understand is is it possible for my to validate my private key using Electrum on an offline PC but without creating a new wallet or sweeping it? What I've noticed is that if I enter the private key in that window the Next button becomes ungreyed. However if I enter that private key with a single character deviation the Next button remains greyed out. In essence I have an old priavte key that I would like to test is still valid but without moving the funds from it.
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4158


View Profile
April 15, 2021, 12:37:37 AM
 #4

Thanks. What I am really trying to understand is is it possible for my to validate my private key using Electrum on an offline PC but without creating a new wallet or sweeping it? What I've noticed is that if I enter the private key in that window the Next button becomes ungreyed. However if I enter that private key with a single character deviation the Next button remains greyed out. In essence I have an old priavte key that I would like to test is still valid but without moving the funds from it.
It is possible.

Electrum will derive the address using the private key that you've provided. The reason why it becomes greyed after a small deviation is due to the fact that there is a checksum in the last few digits of the private key which checks whether the key is entered correctly. This helps the user to identify if they've mistyped their keys. If you're able to derive the correct address from the private key offline, then it would be valid. You don't have to be online to do so, Electrum doesn't interact with any server to generate an address.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10491



View Profile
April 15, 2021, 03:38:27 AM
 #5

Bitcoin private keys are strings that are encoded using a special encoding called Base58. This encoding uses a checksum in it which helps you quickly figure out if the input has any mistakes in it such as a typo. Because of this you can validate a bitcoin private key string easily by a simple decoding and a SHA256 (checksum) computation.
You can read about this encoding and the way private keys (aka WIFs) are encoded in the following two links:
https://en.bitcoin.it/wiki/Wallet_import_format
https://en.bitcoin.it/wiki/Base58Check_encoding

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5493


Self-proclaimed Genius


View Profile
April 15, 2021, 03:44:05 AM
 #6

-snip- What I've noticed is that if I enter the private key in that window the Next button becomes ungreyed.
Sorry if noob question.
The "checksum" that was mentioned in the first post and had been mentioned repeatedly is the keyword.

Without going technical and disregarding the Base58 decode part:
It's basically the last few characters of the WIF private key, that was created by hashing the other parts of the prv key and it's inserted at the end as a the checksum.
So changing a character from the first few characters of the private key will produce a different hash that will mismatch with the checksum.
Or changing a character from the last few characters (checksum) will make the checksum different than the hash of the rest of the characters.
A mismatch means an invalid WIF (Wallet Import Format) private key.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
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!