Bitcoin Forum
July 20, 2019, 07:03:59 PM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Signing a message with a private key  (Read 101 times)
irukandji
Sr. Member
****
Offline Offline

Activity: 587
Merit: 251



View Profile
March 27, 2018, 02:00:38 AM
 #1

Gavin Andresen said that CSW used
Quote
the private key from the very first bitcoin block
  and signed messages with it.
https://www.youtube.com/watch?v=pNZyRMG2CjA

I send Bitcoin using private keys, but what does it mean to sign a message with a private key?
1563649439
Hero Member
*
Offline Offline

Posts: 1563649439

View Profile Personal Message (Offline)

Ignore
1563649439
Reply with quote  #2

1563649439
Report to moderator
1563649439
Hero Member
*
Offline Offline

Posts: 1563649439

View Profile Personal Message (Offline)

Ignore
1563649439
Reply with quote  #2

1563649439
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1563649439
Hero Member
*
Offline Offline

Posts: 1563649439

View Profile Personal Message (Offline)

Ignore
1563649439
Reply with quote  #2

1563649439
Report to moderator
RGBKey
Hero Member
*****
Offline Offline

Activity: 840
Merit: 629


rgbkey.github.io/pgp.txt


View Profile WWW
March 27, 2018, 02:22:44 AM
 #2

To sign a message with a private key is to provide cryptographic proof that the message signed is coming from the person in control of the private key. For example, if you sign a message with the private key belonging to one of your Bitcoin addresses, anybody could tell that the owner of a certain Bitcoin address (you) was the one that wrote that message.
irukandji
Sr. Member
****
Offline Offline

Activity: 587
Merit: 251



View Profile
March 27, 2018, 02:39:51 AM
 #3

To sign a message with a private key is to provide cryptographic proof that the message signed is coming from the person in control of the private key. For example, if you sign a message with the private key belonging to one of your Bitcoin addresses, anybody could tell that the owner of a certain Bitcoin address (you) was the one that wrote that message.

Where do you write the message and where do you send it to?
bitmover
Hero Member
*****
Offline Offline

Activity: 546
Merit: 873



View Profile
March 27, 2018, 02:45:51 AM
 #4

Where do you write the message and where do you send it to?

There are many wallets that are able to sign messages, and many that are not.

Segwit addresses can sign messages, but there is no standard to verify, so it's better to use a Legacy address (starting with 1).

The easiest way to sign I think is using Coinomi. Just download Coinomi Wallet, click on the upper right corner and choose sign message

                                         

More details here:
https://medium.com/@bytether/how-to-sign-a-message-with-a-coinomi-android-wallet-9ebdda63e912
Images from the site above.

nydiacaskey01
Legendary
*
Offline Offline

Activity: 1582
Merit: 1029


Bitsler.com


View Profile
March 27, 2018, 02:48:52 AM
 #5

Where do you write the message and where do you send it to?
Here's a complete step by step information on how to sign a message depending on what you are going to use. This is being updated from time to time by shorena https://bitcointalk.org/index.php?topic=990345.0

irukandji
Sr. Member
****
Offline Offline

Activity: 587
Merit: 251



View Profile
March 27, 2018, 05:19:56 AM
 #6

Thanks for all the replies. Smiley

So if i send you some bitcoin and i sign a message.... like..."hello from Irukandji". Only the receiver will be able to see it?  And will it remain somewhere for ever or be deleted?
starmyc
Member
**
Offline Offline

Activity: 195
Merit: 88

Software engineer


View Profile WWW
March 27, 2018, 05:41:44 AM
Last edit: March 27, 2018, 05:55:21 AM by starmyc
 #7

Signing is not encryption. When you sign a message, you guarantee anyone that you and only you wrote it and sign it. The message can't be changed or the signature will become invalid. But the message won't be encrypted, and then everybody who gets it will be able to read it.

In Bitcoin, spent transactions are signed to prove than only the owner of the private key want to spend the transaction. But the transaction will still be clear and everybody will be able to see it (that's why the blockchain is said "public"). There is no encryption involved in Bitcoin (Edit: besides encrypting the wallet.dat file).

Software engineer.
Tip me if you find my help useful: 3QBRMM2CLUTd7hqL4T9Ja2wy6B1VkbXyZ3
mocacinno
Legendary
*
Offline Offline

Activity: 1652
Merit: 1638


https://unblur.ninja =>lightning network testsite


View Profile WWW
March 27, 2018, 05:45:43 AM
 #8

Thanks for all the replies. Smiley

So if i send you some bitcoin and i sign a message.... like..."hello from Irukandji". Only the receiver will be able to see it?  And will it remain somewhere for ever or be deleted?

starmyc already answered the first part of your question: he's correct, signing is not equal to encrypting.
As for the second part of your question: a signed message is just a piece of ascii text, it isn't automatically stored on the blockchain. Usually, you send a signed message to somebody to proof you own the private key to a certain (staked) address. The message will exist as long as you and the receiver don't delete said message from your sent messages/inbox (or whatever other way you used to send the signed message).

You CAN include some text in a transaction using op_return, but this is rather technical, you'd have to craft a transaction in a "non-standard" way in order to do this. (with non-standard, i mean that if you use a standard wallet like core or electrum in a standard-gui way, there won't be an option available afaik)
here's a funny website to look at op_return's in some of the latest transactions: http://coinsecrets.org/

HeRetiK
Legendary
*
Offline Offline

Activity: 1176
Merit: 1083


the forkings will continue until morale improves


View Profile
March 27, 2018, 10:01:08 AM
 #9

Thanks for all the replies. Smiley

So if i send you some bitcoin and i sign a message.... like..."hello from Irukandji". Only the receiver will be able to see it?  And will it remain somewhere for ever or be deleted?

It will only remain in the blockchain if you craft a special transaction as mentioned by mocacinno above.

While asymmetric encryption is sometimes used to ensure that only the receiver can decrypt the message, the use case you've been asking about is only about verifying the identity of the signer and the integrity of the message: https://simple.wikipedia.org/wiki/Digital_signature

Note that sending bitcoins is technically not different from signing a message -- the message effectively being "Irukandji is sending X BTC to Y".

leonair
Sr. Member
****
Offline Offline

Activity: 686
Merit: 292

Oldaweyap!


View Profile
March 27, 2018, 07:05:51 PM
 #10

Most of the people who told you about Signing a message is correct and will really help you out and I just would like to add up.

Signing a message with a private key is one of the best identifier here in the forum in case your account get hack by someone.
Theymos posted it here


You can verify signed messages here https://tools.bitcoin.com/verify-message/

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!