Bitcoin Forum
May 05, 2024, 11:35:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Want to understand bitcoin wallet  (Read 786 times)
johnsm79 (OP)
Full Member
***
Offline Offline

Activity: 224
Merit: 101


trade.io - Join the Trading Revolution


View Profile WWW
June 20, 2017, 09:18:52 PM
 #1

Lets say I create a paper wallet using bitaddress.org which I saw a YouTube video explaining that is best to do this offline, using a pc not connected to the internet before.

I create a single paper wallet with a BIP38 Encrypt (my secret password).

Once I copy-paste into https://blockchain.info search bar the Share address of the wallet, it can give me all its information e.g. transaction history, final balance, etc.

My 1st question is: How come when I was offline I create a new wallet, and immediately this wallet was available to view?

In my understanding this wallet pre-existed.

My second question:
if it pre-existed, how come was it given to me?
Since I did this offline, couldn't another person create the same wallet at the same time at an offline environment and set a different BIP38 Encrypt?
When I created the BIP38 Encrypt since it was offline how has this circulated to the blockchain?


▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  TRADE.IO       ║     WHITEPAPER  •  ANN THREAD  •  TELEGRAM     ║     JOIN THE TRADING REVOLUTION
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714952129
Hero Member
*
Offline Offline

Posts: 1714952129

View Profile Personal Message (Offline)

Ignore
1714952129
Reply with quote  #2

1714952129
Report to moderator
TryNinja
Legendary
*
Offline Offline

Activity: 2828
Merit: 6977



View Profile WWW
June 20, 2017, 10:57:20 PM
 #2

Lets say I create a paper wallet using bitaddress.org which I saw a YouTube video explaining that is best to do this offline, using a pc not connected to the internet before.

I create a single paper wallet with a BIP38 Encrypt (my secret password).

Once I copy-paste into https://blockchain.info search bar the Share address of the wallet, it can give me all its information e.g. transaction history, final balance, etc.

My 1st question is: How come when I was offline I create a new wallet, and immediately this wallet was available to view?
Every address already exists in the network. When you create a new wallet, you are choosing a random private key which controls your new address. Because of that, you will be able to spend all the coins received and owned by that address. Something like that.

In my understanding this wallet pre-existed.
That's true.

if it pre-existed, how come was it given to me?
Since I did this offline, couldn't another person create the same wallet at the same time at an offline environment and set a different BIP38 Encrypt?
Your wallet just designated that random address to you. Therefore, there is always a chance that someone generate an address you already controls, but this simple won't happen because there are near 2^160 addresses (~1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976) in the Bitcoin ecosystem, which means that it's near to impossible to generate the same address two times in a row.

I can't really comment on your question about the BIP38 encryption because I don't really know about the subject.

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

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

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

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

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

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











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











▄▄▄▄█
vh
Hero Member
*****
Offline Offline

Activity: 699
Merit: 666


View Profile
June 21, 2017, 12:51:54 AM
 #3


My 1st question is: How come when I was offline I create a new wallet, and immediately this wallet was available to view?


When nothing is found on the blockchain regarding the address, it has 0 balance and no transactions (assumed).


In my understanding this wallet pre-existed.

My second question:
if it pre-existed, how come was it given to me?


It doesn't pre-exist unless someone else has the same private key you do.
The wallet or key generating software need some good randomness fed into it (mouse movement) to prevent that from happening.


Since I did this offline, couldn't another person create the same wallet at the same time at an offline environment and set a different BIP38 Encrypt?

Just for clarification, the "paper" itself is the wallet.  
It holds the private key.

When you encrypt your key with bip38 before you put it on paper, it becomes a BIP38 Encrypted Paper Wallet.


When I created the BIP38 Encrypt since it was offline how has this circulated to the blockchain?


Sending:
You need the sign transactions with the private key offline and send it online to get the transaction on the blockchain.

Receiving:
Someone else signs a transaction with your public address as a destination and it gets on the blockchain.


johnsm79 (OP)
Full Member
***
Offline Offline

Activity: 224
Merit: 101


trade.io - Join the Trading Revolution


View Profile WWW
June 21, 2017, 04:45:10 AM
 #4




Sending:
You need the sign transactions with the private key offline and send it online to get the transaction on the blockchain.

Receiving:
Someone else signs a transaction with your public address as a destination and it gets on the blockchain.



Thanks for your replies!

As to the private key being eligible (lets call it like that) you say above you need to sign transactions while sending.

How does that work?

Lets say I create a wallet (offline) of any kind with the key. Someone sends me 1BTC which I just leave on that wallet for some time.

Has the key come into effect? Is it locked? If I try to open my wallet at another location (anywhere in the world), I would guess the key has not gone into effect.

At this stage what do I do, to secure my 1BTC?

Would I need to send a part of it somewhere else to secure my wallet with the key?


▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  TRADE.IO       ║     WHITEPAPER  •  ANN THREAD  •  TELEGRAM     ║     JOIN THE TRADING REVOLUTION
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4166


View Profile
June 21, 2017, 05:42:44 AM
 #5

Thanks for your replies!

As to the private key being eligible (lets call it like that) you say above you need to sign transactions while sending.

How does that work?

Lets say I create a wallet (offline) of any kind with the key. Someone sends me 1BTC which I just leave on that wallet for some time.

Has the key come into effect? Is it locked? If I try to open my wallet at another location (anywhere in the world), I would guess the key has not gone into effect.

At this stage what do I do, to secure my 1BTC?

Would I need to send a part of it somewhere else to secure my wallet with the key?
I'll just explain how transactions work. When you generate a Bitcoin address, you are given the private and public keypair, with the public key hash being the address. When you share the public key hash to others, they can send Bitcoins to that address.

Now, how do transaction work? A transaction will reference the inputs that is used in the transaction, together with the signature that verifies that the transaction is authorised to spend the inputs. The transaction will also contain the conditions that is required to be fulfilled before the outputs can be spent, ie. only the valid signature from a specific address can spend it. The outputs will spawn new inputs for the address to spend. The transaction is signed with the private key and the public key is included in the signature. When it is broadcasted, the nodes will check the transaction with its UXTO and if the inputs exist and has the correct signature, the transaction is valid.

The next person can then script a transaction which can fulfill the criteria of the outputs and spend it. You don't need your wallet to be online to spend the coins. You just need the private key to generate the correct signature to spend the coins.

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

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

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

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

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

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











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











▄▄▄▄█
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
June 21, 2017, 05:42:52 AM
 #6

Thanks for your replies!

As to the private key being eligible (lets call it like that) you say above you need to sign transactions while sending.

How does that work?

Lets say I create a wallet (offline) of any kind with the key. Someone sends me 1BTC which I just leave on that wallet for some time.

Has the key come into effect? Is it locked? If I try to open my wallet at another location (anywhere in the world), I would guess the key has not gone into effect.

At this stage what do I do, to secure my 1BTC?

Would I need to send a part of it somewhere else to secure my wallet with the key?
There is no answer to these questions as that is not how Bitcoin works.

Bitcoin works by spending transaction outputs and creating transaction outputs. Each transaction output contains script, a partial mini program (i.e. you can't actually run it). When you spend Bitcoin, you are spending from a previous transaction output and creating another script as the input script. Both the output script and input scripts are combined to create a full mini program (i.e. one that actually runs). When a node receives the transaction, it runs that program and it must output true (well the symbols representing true, not the string itself) for the script to be valid. If the script is valid, then that input is validly spending the output.

One part of the standard script operations is a digital signature check. The output script of most outputs specifies that the input script must contain a public key and digital signature which is valid, and that the public key must hash to the hash specified in the output script. That hash is also encoded as your Bitcoin address. So when you spend, you create a digital signature using your private key which verifies to your corresponding public key and put those in the input script.

As you can see, there is nothing that your private key does except for creating the digital signature. There is no "key goes into effect" thing nor is any part of it sent anywhere when you spend or receive. The only thing that has to be sent that is related to your private key is the address as that is the hash of the public key that corresponds to your private key. There are no such objects as a Bitcoin; they are just values assigned to the output scripts.

Since everyone on the network uses the same digital signature algorithm that has a predefined private key range and public key range, there is no need for any keys to be registered anywhere or sent anywhere; everyone already knows them. As such, anyone can easily check all transactions in the blockchain to see if any public keys in input scripts hash to the hash specified by a Bitcoin address or if any hashes in the output scripts match the hash specified by a Bitcoin address.

vh
Hero Member
*****
Offline Offline

Activity: 699
Merit: 666


View Profile
June 21, 2017, 01:37:14 PM
 #7


Lets say I create a wallet (offline) of any kind with the key. Someone sends me 1BTC which I just leave on that wallet for some time.

Has the key come into effect? Is it locked? If I try to open my wallet at another location (anywhere in the world), I would guess the key has not gone into effect.


The key is not needed to receive or view balance.   The key is still protected.



At this stage what do I do, to secure my 1BTC?

Would I need to send a part of it somewhere else to secure my wallet with the key?


It is secured at this stage.   The private key in the wallet is absolutely needed for sending.  As long as someone never gets your key the 1BTC is secured.  You can hide the paper wallet however you see fit, but if you lose that key, you can forever see the 1BTC but never use it.


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!