{"id":2912,"date":"2024-10-22T11:09:01","date_gmt":"2024-10-22T11:09:01","guid":{"rendered":"https:\/\/apex-aiexperts.com\/?p=2912"},"modified":"2024-10-22T11:09:01","modified_gmt":"2024-10-22T11:09:01","slug":"how-do-digital-signatures-work","status":"publish","type":"post","link":"https:\/\/apex-aiexperts.com\/ja\/how-do-digital-signatures-work\/","title":{"rendered":"\u30c7\u30b8\u30bf\u30eb\u7f72\u540d\u306e\u4ed5\u7d44\u307f"},"content":{"rendered":"<p class=\"wp-block-paragraph\">In this lesson, we\u2019re going to learn how a digital signature actually works in Bitcoin and other cryptocurrencies.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In order to get to this point, we\u2019ve had to learn several technical concepts first since they are the \u201cbuilding blocks\u201d needed to create a digital signature:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.babypips.com\/crypto\/learn\/what-is-hashing\" target=\"_blank\" rel=\"noreferrer noopener\">Hash functions<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.babypips.com\/crypto\/learn\/what-is-a-bitcoin-wallet\" target=\"_blank\" rel=\"noreferrer noopener\">Private and public keys<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.babypips.com\/crypto\/learn\/what-is-asymmetric-encryption\" target=\"_blank\" rel=\"noreferrer noopener\">\u975e\u5bfe\u79f0\u6697\u53f7\u5316<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re NOT familiar with these concepts, they were explained in a noob-friendly way in previous lessons. Explore the links above to learn more.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How is a digital signature created?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s take a look at how a digital signature is step-by-step:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>When you want to send bitcoin, your wallet creates a\u00a0<strong>transaction message<\/strong>. This message contains information like the amount of bitcoins you wish to send and the recipient\u2019s address.<\/li>\n\n\n\n<li>This message is run through a\u00a0<strong>\u30cf\u30c3\u30b7\u30e5\u95a2\u6570<\/strong>.<\/li>\n\n\n\n<li>The hash function produces an output known as the \u201c<strong>message hash<\/strong>\u300c\u307e\u305f\u306f\u5358\u306b\"<strong>\u30cf\u30c3\u30b7\u30e5<\/strong>\".<\/li>\n\n\n\n<li>This message hash is then\u00a0<em>e<\/em><strong><em>ncrypted<\/em>\u00a0with your private key<\/strong>.<\/li>\n\n\n\n<li>\u306b\u3064\u3044\u3066\u00a0<em>\u6697\u53f7\u5316<\/em>\u00a0message hash becomes the \u201c<strong>\u30c7\u30b8\u30bf\u30eb\u7f72\u540d<\/strong>\".<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s a flowchart of this process:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/03\/03100351\/how-digital-signature-is-created.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/03\/03100351\/how-digital-signature-is-created.png\" alt=\"How a Digital Signature is Created\" class=\"wp-image-220159\" title=\"How a Digital Signature is Created\"\/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So at the end of this process, your wallet has created two \u201citems\u201d:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Transaction message<\/strong><\/li>\n\n\n\n<li><strong>Digital signature<\/strong>\u00a0(an encrypted hash of the transaction message)<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">At this point, nothing has been sent out to the Bitcoin network yet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you didn\u2019t notice, the transaction message itself is needed as an \u201cingredient\u201d to create the digital signature.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So you don\u2019t just use your private key to create a digital signature\u2026 you use your&nbsp;<strong>private key AND the hash<\/strong>&nbsp;of the transaction message.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This means you can\u2019t use this digital signature for another transaction.&nbsp; If you tried to use this digital signature in a second transaction, it would be rejected by the Bitcoin network because the digital signature is solely based on the data from the first transaction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Every digital signature is unique to a specific transaction<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How is a digital signature verified?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u306e\u305f\u3081\u306b\u306f&nbsp;<strong>spend bitcoins from a particular Bitcoin address<\/strong>, one must&nbsp;<strong>prove \u201cownership\u201d (or: knowledge) of the private key that\u2019s paired with the public key<\/strong>&nbsp;associated with that&nbsp;<strong>\u4f4f\u6240<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But you want to do this&nbsp;<em>\u306a\u3057<\/em>&nbsp;having to reveal your private key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A&nbsp;<strong>\u30c7\u30b8\u30bf\u30eb\u7f72\u540d<\/strong>&nbsp;is something you can use to&nbsp;<strong>PROVE that you know the private key<\/strong>&nbsp;that\u2019s connected to a public key, without having to reveal the actual private key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s see this works:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>When you initiate a Bitcoin transaction, your wallet software actually provides three \u201citems\u201d to the Bitcoin network: the original\u00a0<strong>transaction message<\/strong>\u305d\u306e\u00a0<strong>\u30c7\u30b8\u30bf\u30eb\u7f72\u540d<\/strong>, and your\u00a0<strong>\u516c\u958b\u9375<\/strong>\u00a0(that\u2019s tied to the address where the bitcoin you wish to send is currently stored).<\/li>\n\n\n\n<li>Once a Bitcoin node receives these \u201citems\u201d, it will separate them out.<\/li>\n\n\n\n<li>It will take the original transaction message and run it through the same hash function that you used earlier. (All Bitcoin software uses the same hash function.)\u00a0 As for the digital signature, it will use the public key you provided to decrypt it.<\/li>\n\n\n\n<li>Both hashes will then be compared.<\/li>\n\n\n\n<li>Are both hashes an exact match?<\/li>\n\n\n\n<li>If both hashes match, then this proves that you are the actual owner of the bitcoin you wish to send.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s a flowchart of this process:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/03\/03103947\/how-digital-signature-is-validated.png\" alt=\"How a Digital Signature is Verified\" class=\"wp-image-220164\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">There are two things to point out here:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Being able to decrypt with the public key proves the sender\u2019s identity.<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In step 3, once a node is able to decrypt the digital signature, this proves your \u201cidentity\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remember, since a private key and public key are mathematically linked, if you\u2019re able to decrypt a message with my&nbsp;<em>\u516c\u958b<\/em>&nbsp;key, that means I encrypted it with my&nbsp;<em>private<\/em>&nbsp;key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you weren\u2019t able to decrypt the message, that means it was encrypted by somebody else\u2019s private key. And that means the message didn\u2019t come from me.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Hashes that are an exact match prove that the message wasn\u2019t altered.<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In step 6, checking to make sure both hashes are an exact match ensures that the original message&nbsp;<strong>has not been altered.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is important to know because unlike the digital signature is encrypted, the original transaction message is in plaintext because all Bitcoin transactions are public for all to see.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remember, any slight change would produce a totally different hash. So if someone were to intercept the original transaction message on its way to a node and modify it (like to send the bitcoin to his address instead), when the message goes through the hash function, it would produce a totally different hash from the digital signature.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similar to how a handwritten signature links a person to a specific document, a \u201cdigital signature\u201d using cryptography\u2026.<em>cryptographically<\/em>\u2026.<strong>links identity to a specific message<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6982\u8981<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you understand how a digital signature is created and how it is verified, here\u2019s a BIG picture view of what \u201csigning\u201d a transaction actually means and how the sender\u2019s \u201cdigital signature\u201d is used to verify ownership of the bitcoins he\/she wishes to send:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bpcdn.co\/images\/2022\/03\/03161222\/digital-signature-process.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/bpcdn.co\/images\/2022\/03\/03161222\/digital-signature-process.png\" alt=\"Digital Signature Process\" class=\"wp-image-220175\" title=\"Digital Signature Process\"\/><\/a><\/figure>","protected":false},"excerpt":{"rendered":"<p>In this lesson, we\u2019re going to learn how a digital signature actually works in Bitcoin and other cryptocurrencies. In order to get to this point, we\u2019ve had to learn several technical concepts first since they are the \u201cbuilding blocks\u201d needed to create a digital signature: If you\u2019re NOT familiar with these concepts, they were explained in a noob-friendly way in previous lessons. Explore the links above to learn more. How is a digital signature created? Let\u2019s take a look at how a digital signature is step-by-step: Here\u2019s a flowchart of this process: So at the end of this process, your wallet has created two \u201citems\u201d: At this point, nothing has [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,12],"tags":[],"class_list":["post-2912","post","type-post","status-publish","format-standard","hentry","category-beginners-guide-to-digital-signatures","category-learn-crypto"],"_links":{"self":[{"href":"https:\/\/apex-aiexperts.com\/ja\/wp-json\/wp\/v2\/posts\/2912","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apex-aiexperts.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/apex-aiexperts.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/apex-aiexperts.com\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apex-aiexperts.com\/ja\/wp-json\/wp\/v2\/comments?post=2912"}],"version-history":[{"count":1,"href":"https:\/\/apex-aiexperts.com\/ja\/wp-json\/wp\/v2\/posts\/2912\/revisions"}],"predecessor-version":[{"id":2913,"href":"https:\/\/apex-aiexperts.com\/ja\/wp-json\/wp\/v2\/posts\/2912\/revisions\/2913"}],"wp:attachment":[{"href":"https:\/\/apex-aiexperts.com\/ja\/wp-json\/wp\/v2\/media?parent=2912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/apex-aiexperts.com\/ja\/wp-json\/wp\/v2\/categories?post=2912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/apex-aiexperts.com\/ja\/wp-json\/wp\/v2\/tags?post=2912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}