{"id":28683,"date":"2014-05-12T17:03:48","date_gmt":"2014-05-12T17:03:48","guid":{"rendered":"http:\/\/ci027cfe7af00926c3"},"modified":"2014-05-12T17:03:48","modified_gmt":"2014-05-12T17:03:48","slug":"bitcoin-address-sign-1399914228","status":"publish","type":"post","link":"https:\/\/bitcoinmagazine.com\/technical\/bitcoin-address-sign-1399914228","title":{"rendered":"What is a Bitcoin Address and How Do You Sign It?"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/what-is-a-bitcoin-address-and-how-do-you-sign-it.png\" title=\"\"><\/figure>\n<p><strong>Short Answer:<\/strong> A Bitcoin address is a unique number that \u201cholds\u201d bitcoin currency. You use the address to receive and send bitcoins.<\/p>\n<p><strong>Medium Sized Answer:<\/strong> A Bitcoin address is the public key half of the public-private key pair that enables the validation of ownership of that address. WHOAH there, what in tarnation does that mean??<br \/> Bitcoin addresses are created as part of a key generation process that creates a pair of keys. They are a matched set, where one is public and the other is private. When you \u201csign\u201d a bitcoin address you are running the public and private keys through an algorithm that checks to see that those keys belong together. Usually signing is talked about in the context of a message. Someone sends you a signed message and you can verify that the message came from the genuine person. You can verify the message because it was signed with their private key and you match it to their public key. When sending bitcoins the signed message is a portion of the bitcoin transaction and you do not explicitly see the message, it is just part of the transaction. This lets you validate the ownership of the address. The transaction (the transfer of value) was signed with the owner\u2019s private key and you check that it\u2019s valid using their public key.<\/p>\n<p>A little diversion \u2013 public key cryptography is a really cool technology developed in the mid 1970\u2019s. The amazing thing about public-private key pairs is that everyone can know the public key and the owner of the private key can prove that he is the owner of the message sent with the associated public key. For more information on PKI (Public Key Infrastructure) upon which much of bitcoin\u2019s security is based see Mike Hearn\u2019s (a core bitcoin developer) great description of many issues in \u201c<a href=\"https:\/\/blog.plan99.net\/why-you-think-the-pki-sucks-b64cf5912aa7?gi=646819d791ad\" target=\"_blank\" rel=\"noopener\">Why you think the PKI sucks\u2026but can\u2019t do any better<\/a>\u201c.<\/p>\n<p><strong>A Longer Story:<\/strong> Let look at the sequence of actions to create and then use the key pairs. First we need to generate the key pair, which will result in two keys the public and private keys. The Bitcoin address is actually a form of the public key (it\u2019s a hash of the public key). From the Bitcoin protocol specification at: https:\/\/en.bitcoin.it\/wiki\/Protocol_specification#Signatures<\/p>\n<blockquote>\n<p>A bitcoin address is in fact the hash of a ECDSA public key<\/p>\n<\/blockquote>\n<p>Since anyone can know the public key and really the Bitcoin address is the public key, it\u2019s perfectly OK to give out the Bitcoin address. So now we have a Bitcoin address, what\u2019s next?<br \/> Let\u2019s say that I want to get paid for something, say writing this article! I can advertise a Bitcoin address, and since you are all so thrilled to read this, you have an overwhelming urge to send me some coins. You would open up your Bitcoin wallet, enter my address as the address to send bitcoins to; click send; and I would happily receive some bitcoins. Recall that I and only I have the private key matching the public key (address) which enables me to be the only person that could spend the bitcoins I just received.<br \/> If you wanted to double check that I was actually the owner of the address before you sent me coins you could ask that I send a signed message associated with address proving it\u2019s mine. I could create a message and sign the address. You would then take the message I sent, and put it into your wallet along with my address to prove that I am the \u201cowner\u201d of the address. Bitcoin wallets usually contain this message signing and verification functionality.<br \/> An address is used to \u201chold\u201d bitcoins, however the concept of an address holding bitcoins or that you are the \u201cowner\u201d of a Bitcoin address is a misnomer. Recall that the address is one half of a public-private key pair. The reason you \u201cown\u201d an address and have control over the coins associated with that address is simply that you also know the other half of the public-private key pair, the private key. If someone else learns the private key to an address then that person has just as much control and \u201cownership\u201d over the address, as you. In other words that person can spend your bitcoins. The solution is quite simple, make sure you and only you control the public keys to your bitcoin addresses. From a practical point of view this means that you create a good, not easy to guess, Bitcoin wallet password, and\/or keep it in a safe place. Some excellent security practices are outlined at the Bitcoin Foundation\u2019s site at: <a href=\"https:\/\/bitcoin.org\/en\/secure-your-wallet\" target=\"_blank\" rel=\"noopener\">https:\/\/bitcoin.org\/en\/secure-your-wallet<\/a>.<br \/> Since Bitcoin addresses are one of the cornerstones to using Bitcoin, it is instructive to play around with addresses to get a better understanding of just what exactly a Bitcoin address is all about. A particularly good website to play around with is <a href=\"https:\/\/www.bitaddress.org\/bitaddress.org-v3.3.0-SHA256-dec17c07685e1870960903d8f58090475b25af946fe95a734f88408cef4aa194.html\" target=\"_blank\" rel=\"noopener\">bitaddress.org<\/a>. After generating a new Bitcoin address play around with the various options and observe the public and private keys it generates. Just don\u2019t go putting real bitcoins into an address while also displaying the private key. Keep the private key private!<\/p>\n<p>As always keep up with my Bitcoin musings here and at: <a href=\"http:\/\/www.bitcoininplainenglish.com\" target=\"_blank\" rel=\"noopener\">BitcoinInPlainEnglish<\/a> http:\/\/www.bitcoininplainenglish.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Short Answer: A Bitcoin address is a unique number that \u201cholds\u201d bitcoin currency. You use the address to receive and send bitcoins. Medium Sized Answer: A Bitcoin address is the public key half of the public-private key pair that enables the validation of ownership of that address. WHOAH there, what in tarnation does that mean?? [&hellip;]<\/p>\n","protected":false},"author":3653,"featured_media":28682,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[410,329,1698],"class_list":{"0":"post-28683","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-technical","8":"tag-addresses","9":"tag-cryptography","10":"tag-keys"},"author_data":{"id":3653,"name":"Sandy Ressler","nicename":"sandy-ressler","avatar_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/12\/cropped-bitcoin-schmitcoin-promo-image-1-2-96x96.png"},"featured_image_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/what-is-a-bitcoin-address-and-how-do-you-sign-it.png","_links":{"self":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/28683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/users\/3653"}],"replies":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/comments?post=28683"}],"version-history":[{"count":0,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/28683\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media\/28682"}],"wp:attachment":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media?parent=28683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/categories?post=28683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/tags?post=28683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}