Bitcoin Forum

Other => Beginners & Help => Topic started by: hoody26 on January 07, 2021, 02:10:01 PM



Title: beginners. Understanding bitcoin private key
Post by: hoody26 on January 07, 2021, 02:10:01 PM
Hi,

A couple of years ago, I bought some bitcoin ( about £10gbp) . Then I forgot all about it, and forgot what I did with it.

Now that the bitcoin rate has gone up, I decided to search for any trace of the purchase.

I eventually found what looked like a "key" which I had emailed to myself - a string of numbers and letters. I didnt write anything else, just this string of numbers and letters.

I have mycoleum with  "Bitcoin HD" account. I decided to enter this string of numbers and letters. I can't remember exactly how i did this to be honest, i think it was trying to import this key. anyway, I can't be certain, but I "think" this import seemed to work. mycoleum now has two accounts: the already-existing "Bitcoin HD" (hierarchal deterministic) which I had before, and a new "Bitcoin SA" , (SA - which Im guessing could mean Satoshi? ).

Anyway, a few questions:

Have I done this correctly, and can I now use this imported bitcoin in mycoleum and convert it to GBP?
If someone had "gotten" hold of my private key before I added it to mycoleum, would adding it to mycoleum still have worked?
When adding this private key, what exactly is it that I added? Is it a wallet?

Thanks


Title: Re: beginners. Understanding bitcoin private key
Post by: jackg on January 07, 2021, 02:32:43 PM
Can you see a balance in mycelium? If not then you might have found a key for the wrong thing or something. How did you go about finding the key, was it in a file somewhere or something?


Title: Re: beginners. Understanding bitcoin private key
Post by: HeRetiK on January 07, 2021, 04:56:15 PM
I have mycoleum with  "Bitcoin HD" account. I decided to enter this string of numbers and letters. I can't remember exactly how i did this to be honest, i think it was trying to import this key. anyway, I can't be certain, but I "think" this import seemed to work. mycoleum now has two accounts: the already-existing "Bitcoin HD" (hierarchal deterministic) which I had before, and a new "Bitcoin SA" , (SA - which Im guessing could mean Satoshi? ).

"SA" means "single address" which is used for single imported private keys, so if you see a "Bitcoin SA" wallet it seems to have worked.


Have I done this correctly, and can I now use this imported bitcoin in mycoleum and convert it to GBP?

If you can see a balance in your Bitcoin SA wallet, then yes, it has worked, and you can sell the coins for GBP on the exchange of your choice.


If someone had "gotten" hold of my private key before I added it to mycoleum, would adding it to mycoleum still have worked?

Adding it to Mycelium would have worked, but your balance would most likely have been empty due to the other person having moved your coins to a different address that is out of your control.


When adding this private key, what exactly is it that I added? Is it a wallet?

When adding a private key you are literally just adding a private key that enables you to spend money from that particular address. A wallet usually consists of multiple private keys / addresses, usually derived from a single seed phrase, ie. the list of words you get to write down for backup purposes.

A private key is what enables you to prove to the network that you are allowed to move the coins on the corresponding address. When sending coins you are essentially just using the private key to sign a message that says: "I, hoody26, send x bitcoins to this new address" using asymmetric cryptography:
https://en.wikipedia.org/wiki/Public-key_cryptography


Title: Re: beginners. Understanding bitcoin private key
Post by: hoody26 on January 07, 2021, 05:14:34 PM
Can you see a balance in mycelium? If not then you might have found a key for the wrong thing or something. How did you go about finding the key, was it in a file somewhere or something?

Yes, I do see the balance.
I emailed the key to myself, so technically, its very risky I'm guessing, since i just added the key to mycelium, and just like that, i got a balance.

Thanks for your help dude


Title: Re: beginners. Understanding bitcoin private key
Post by: nc50lc on January 08, 2021, 03:55:58 AM
Yes, I do see the balance.
I emailed the key to myself, so technically, its very risky I'm guessing, since i just added the key to mycelium, and just like that, i got a balance.
I eventually found what looked like a "key" which I had emailed to myself - a string of numbers and letters. I didnt write anything else, just this string of numbers and letters.

I have mycoleum with  "Bitcoin HD" account. I decided to enter this string of numbers and letters. I can't remember exactly how i did this to be honest, i think it was trying to import this key.
Before concluding that you have the balance, click the "SEND" button in Mycelium's 'Balance' tab while the "SA Account" in 'Accounts' tab is selected.

Because you can create a watch-only SA account if you've pasted a bitcoin address instead of the private key (and it'll not be labeled as watch-only).
And since private keys and bitcoin addresses both consist of "numbers & letters", the one in the email could also be an address.

To clear the doubt, try to click "send", if it continues instead of a long watch-only note, then it's spendable.


Title: Re: beginners. Understanding bitcoin private key
Post by: hoody26 on January 08, 2021, 08:39:59 AM
Yes, I do see the balance.
I emailed the key to myself, so technically, its very risky I'm guessing, since i just added the key to mycelium, and just like that, i got a balance.
I eventually found what looked like a "key" which I had emailed to myself - a string of numbers and letters. I didnt write anything else, just this string of numbers and letters.

I have mycoleum with  "Bitcoin HD" account. I decided to enter this string of numbers and letters. I can't remember exactly how i did this to be honest, i think it was trying to import this key.
Before concluding that you have the balance, click the "SEND" button in Mycelium's 'Balance' tab while the "SA Account" in 'Accounts' tab is selected.

Because you can create a watch-only SA account if you've pasted a bitcoin address instead of the private key (and it'll not be labeled as watch-only).
And since private keys and bitcoin addresses both consist of "numbers & letters", the one in the email could also be an address.

To clear the doubt, try to click "send", if it continues instead of a long watch-only note, then it's spendable.

Oh no!! You are right, it is a watch-only account!
Well I'm stuffed then. it says i need to import the corresponding private key. I don't have it.
Ah well, easy come, easy go.

Damn, this bitcoin stuff is incredibly complicated.

Not the news I was hoping for, but thank you anyway.


Title: Re: beginners. Understanding bitcoin private key
Post by: Upgrade00 on January 08, 2021, 08:53:48 AM
Sorry for your loss.
Damn, this bitcoin stuff is incredibly complicated.
It could be complicated, but all you need is a bit of research, a lot of people played around with Bitcoin early on without fully understanding it and lost access to their coins through carelessness. The simple rule to follow is 'not your keys, not your coins'. So basically having access to your private keys gives you ownership of your Bitcoins, preventing anyone else from having that access protects you from loss and backing up your private keys means you can always recover it in case you lose your device.
Private keys are represented as 'seed phrase' or 'recovery phase' which consists of group of 12-24 words. This makes it much easier to back up.

Better luck care next time.


Title: Re: beginners. Understanding bitcoin private key
Post by: hoody26 on January 08, 2021, 09:05:01 AM
Sorry for your loss.
Damn, this bitcoin stuff is incredibly complicated.
It could be complicated, but all you need is a bit of research, a lot of people played around with Bitcoin early on without fully understanding it and lost access to their coins through carelessness. The simple rule to follow is 'not your keys, not your coins'. So basically having access to your private keys gives you ownership of your Bitcoins, preventing anyone else from having that access protects you from loss and backing up your private keys means you can always recover it in case you lose your device.
Private keys are represented as 'seed phrase' or 'recovery phase' which consists of group of 12-24 words. This makes it much easier to back up.

Better luck care next time.

Cheers mate.


Title: Re: beginners. Understanding bitcoin private key
Post by: nc50lc on January 09, 2021, 03:14:40 AM
-snip-
To clear the doubt, try to click "send", if it continues instead of a long watch-only note, then it's spendable.
Oh no!! You are right, it is a watch-only account!
Well I'm stuffed then. it says i need to import the corresponding private key. I don't have it.
Ah well, easy come, easy go.
-snip-
Note: If you decided to look for the private key, The common format WIF Private key should start with 5, L or K and is 51 or 52 characters long.
But there are other formats that you might need to catch sight of, but those aren't commonly used.

If you have the time, read this: https://en.bitcoin.it/wiki/Private_key#Base58_Wallet_Import_format (https://en.bitcoin.it/wiki/Private_key#Base58_Wallet_Import_format)

If your balance is up to date then you probably have recovered your wallet if not then you still have to either search for the right private key or make sure you follow the right procedure to recover the wallet properly.
The balance is correct but if you've read his last reply, it's a watch-only wallet that can't be spent; in other words, he wont be able to send the balance.


Title: Re: beginners. Understanding bitcoin private key
Post by: mike2077 on January 18, 2021, 08:32:37 PM
What about public key? Is it supposed to be shared?


Title: Re: beginners. Understanding bitcoin private key
Post by: fancynancy on January 18, 2021, 09:19:41 PM
it seems like you emailed the public wallet to yourself but not the private key itself.
watch only account can be created with the public walled for receiving (from what i read so far)
as many people saying "not your keys, not your coins"
in first place, you should always keep your seed/private key in order to own your funds.
next time dealing with crypto should be with hardware wallet like ledger/trezor hardware (check google)


Title: Re: beginners. Understanding bitcoin private key
Post by: sheenshane on January 18, 2021, 11:25:38 PM
What about public key? Is it supposed to be shared?
Hey, welcome to the forum. 
About your question, that is your Bitcoin address and yes, it supposed to be shared and that is different from a private key, which is means private not to be shared with someone and you should be the one who controls it, exposure may lead to getting scammed.

Note: If you decided to look for the private key, The common format WIF Private key should start with 5, L or K and is 51 or 52 characters long.
But there are other formats that you might need to catch sight of, but those aren't commonly used.
If I'm not mistaken, the private key that starts with the number 5 is 51 characters long and the and capital letters L and K were 52 characters long.

It really sad to the OP and sorry for your loss, because unfortunately, your Bitcoin can't be recovered at all.  It's stuck on the address where you stored it on watch-only wallet address.


Title: Re: beginners. Understanding bitcoin private key
Post by: OcTradism on January 19, 2021, 01:06:41 AM
I don't use hardware wallet but if you need to learn about private key. The book is good for you Mastering Bitcoin (https://github.com/bitcoinbook/bitcoinbook)
- Chapter 4: Key, addresses (https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch04.asciidoc)
- Chapter 5: Wallets (https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc)

Quote
Table 2. Private key representations (encoding formats)
Type   Prefix   Description
Raw   None    32 bytes

Hex     None   64 hexadecimal digits

WIF     5     Base58Check encoding: Base58 with version prefix of 128- and 32-bit checksum

WIF-compressed    K or L   As above, with added suffix 0x01 before encoding


Title: Re: beginners. Understanding bitcoin private key
Post by: blue Snow on January 19, 2021, 06:47:20 AM
What about public key? Is it supposed to be shared?
it's same as your address. when you want your friend come to your home you have to share it. when you want receive bitcoin you have to share it, Public key is bitcoin address, but you have to careful to share it if you want people know how rich you. https://en.wikipedia.org/wiki/Public-key_cryptography


Title: Re: beginners. Understanding bitcoin private key
Post by: pooya87 on January 19, 2021, 07:06:59 AM
it's same as your address. when you want your friend come to your home you have to share it. when you want receive bitcoin you have to share it, Public key is bitcoin address, but you have to careful to share it if you want people know how rich you. https://en.wikipedia.org/wiki/Public-key_cryptography
Public key and address are not the same.
Public key is the x and y coordinate of a point that is generated from your private key and is used during transaction signature verification so it has to be provided.
A bitcoin address has always been the encoding of a hash that is usually hash of the public key (but it may be hash of a script too).


Title: Re: beginners. Understanding bitcoin private key
Post by: Maus0728 on January 19, 2021, 07:16:40 AM
About your question, that is your Bitcoin address and yes,
it's same as your address. when you want your friend come to your home you have to share it. when you want receive bitcoin you have to share it, Public key is bitcoin address
That's not accurate. Bitcoin addresses that is used for receiving and depositing crypto are different from public keys. This is the common misconception with regards to this subject.

Let's say for example you have created a bitcoin address. The process goes like this.

k(Private Key) ==> Elliptic Curve Cryptography ==> K(Public Key) ==> SHA256 ==> bitcoin address.


bitcoin addresses are created due to the existence of public key wherein the public keys are derived from the private key. Public keys are derived using the elliptic curve cryptography which is in fact irreversible.



Title: Re: beginners. Understanding bitcoin private key
Post by: pooya87 on January 19, 2021, 08:47:15 AM

k(Private Key) ==> Elliptic Curve Cryptography ==> K(Public Key) ==> SHA256 ==> bitcoin address.

Hash algorithm used in addresses (or more accurately in the standard and most common scripts) is usually HASH160 which is RIPEMD160 hash of SHA256 hash of the public key.
It is true for P2PKH, P2WPKH and it is also the same for P2SH (hash of the script).
The only place a single SHA256 is used is in P2WSH (hash of the script not pubkey).