Bitcoin Forum
July 02, 2024, 07:09:25 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: A question about the address generation from QT-wallets  (Read 241 times)
xiaohang07 (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 253


Open and Transparent Science Powered By Blockchain


View Profile
June 07, 2017, 03:59:37 AM
 #1

I am always wondering whether the address generated from an unsynced QT-wallet (say, litecoin QT-wallet) is valid or not. Based on my observation, it seems the address generated from an unsynced QT-wallet is valid.

I also tested the offline case, in which I downloaded the qt-wallet, then I disconnected the internet and opened the qt-wallet. It seems that the address can even be generated from a QT-wallet without internet connection. How does the qt-wallet guarantee that the address generated in different computers are not the same?

Hazard
Legendary
*
Offline Offline

Activity: 980
Merit: 1000



View Profile WWW
June 07, 2017, 04:10:04 AM
 #2

Private key space is 2^256 but address space is only 2^160, so there are effectively 2^160 possible addresses. When you're creating a new address, what you're essentially doing is generating a random number between 1 and 2^160 (1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976). Due to how large this space is, it is all but impossible for the same number to be generated twice. Oversimplified of course, but that's the gist of it.

xiaohang07 (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 253


Open and Transparent Science Powered By Blockchain


View Profile
June 07, 2017, 04:15:17 AM
 #3

Private key space is 2^256 but address space is only 2^160, so there are effectively 2^160 possible addresses. When you're creating a new address, what you're essentially doing is generating a random number between 1 and 2^160 (1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976). Due to how large this space is, it is all but impossible for the same number to be generated twice. Oversimplified of course, but that's the gist of it.
Thank you for sharing your insight.

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!