{"id":15157,"date":"2021-11-22T09:50:00","date_gmt":"2021-11-22T14:50:00","guid":{"rendered":"https:\/\/www.thesslstore.com\/blog\/?p=15157"},"modified":"2023-05-24T09:22:59","modified_gmt":"2023-05-24T13:22:59","slug":"how-do-digital-signatures-work-a-look-at-how-a-pki-signature-works","status":"publish","type":"post","link":"https:\/\/www.thesslstore.com\/blog\/how-do-digital-signatures-work-a-look-at-how-a-pki-signature-works\/","title":{"rendered":"How Do Digital Signatures Work? A Look at How a PKI Signature Works"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-a-digital-signature-helps-you-prove-something-such-as-an-email-file-or-executable-is-legitimate-and-not-fake-we-ll-break-down-how-digital-signatures-work-to-protect-your-organization-s-communications-data-and-software-integrity\">A digital signature helps you prove something (such as an email, file or executable) is legitimate and not fake. We\u2019ll break down how digital signatures work to protect your organization\u2019s communications, data and software integrity<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.netskope.com\/netskope-threat-labs\/cloud-threat-report\">Netskope\u2019s July 2021 data<\/a> shows that malware delivered via the cloud has reached new record-setting levels. So, what are the two biggest culprits in terms of facilitating malware downloads? Cloud storage apps (66.4%) and malicious Office files (43%).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a time when we\u2019re dealing with astronomical levels of phishing and cyber scams, being able to verify someone (or something such as an email or a software update) is legitimate is crucial. Public key signatures \u2014 or what are known as PKI digital signatures \u2014 are one such tool in your arsenal to battle cybercriminals\u2019 evolving scam tactics.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we\u2019re not going to get into the technical details of what a <a href=\"https:\/\/www.thesslstore.com\/blog\/public-key-signature\/\">public key signature<\/a> is or why PKI signatures matter to your business. (We recently covered that information in another article, which we\u2019ve linked to in the previous sentence.) Here\u2019s a quick overview and then we\u2019ll jump straight into talking about how digital signatures work:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A digital signature is a type of electronic signature that binds your digital identity to a piece of data (i.e., a PKI digital certificate and a cryptographic key).<\/li>\n\n\n\n<li>Digital signatures are created using cryptographic techniques that are supported by <a href=\"https:\/\/www.thesslstore.com\/blog\/what-is-pki-a-crash-course-on-public-key-infrastructure-pki\/\">public key infrastructure<\/a>.<\/li>\n\n\n\n<li>Your digital signature can be applied to everything from software executables and Microsoft Office files to emails and even website connections.<\/li>\n\n\n\n<li>Digitally signing files and software identifies you (authentication) and helps you assert your identity in a way that ensures no one can say it wasn\u2019t you (non-reputation).<\/li>\n\n\n\n<li>Adding a digital signature helps to protect the integrity of your files and data by providing a way for users to verify whether it\u2019s been altered since you signed it. &nbsp;<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Got that? Good. Now that we know what a PKI signature is and why it matters, let\u2019s answer the question that you came here for: how do digital signatures work?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s hash it out.<span id=\"newline\"><\/span><\/p>\n\n\n<span style=\"display:none\" class=\"tl-placeholder-f-type-shortcode_12753\"><\/span>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-do-digital-signatures-work-a-brief-overview\">How Do Digital Signatures Work? A Brief Overview<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In a nutshell, a digital signature works by serving as an irrefutable piece of data that proves your digital identity and the authenticity of your communication. In other words, it proves:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The digital identity of the author (of the email, file, or other item in question), and<\/li>\n\n\n\n<li>The authenticity of the communication (i.e., that the email, file, or software hasn\u2019t been tampered with since the author signed it).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Digital signatures can be easily verified by the recipients\u2019 computers or servers, and they cannot be faked by hackers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Digital signatures are a key component of various types of PKI digital certificates. As a quick example, take a look at the certificate chain of trust for SSL\/TLS certificates. The SSL\/TLS certificate for the domain TheSSLStore.com uses a digital signature to prove that it\u2019s a valid certificate that was issued by a legitimate certificate authority (i.e., DigiCert). The domain\u2019s certificate was digitally signed by the DigiCert SHA2 Extended Validation Server CA, which is signed by DigiCert\u2019s High Assurance EV Root CA.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"472\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/thesslstore-digital-signature-SSL-TLS-chain-of-trust-example-1024x472.jpg\" alt=\"SSL\/TLS certificate chain of trust includes digital signatures\" class=\"wp-image-15159\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/thesslstore-digital-signature-SSL-TLS-chain-of-trust-example-1024x472.jpg 1024w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/thesslstore-digital-signature-SSL-TLS-chain-of-trust-example-300x138.jpg 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/thesslstore-digital-signature-SSL-TLS-chain-of-trust-example-768x354.jpg 768w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/thesslstore-digital-signature-SSL-TLS-chain-of-trust-example.jpg 1099w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">The SSL\/TLS certificate chain of trust information for the domain TheSSLStore.com. From right to left: The leaf certificate (right) is digitally signed by the intermediate certificate (middle), which is digitally signed by the publicly trusted root CA (left).<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">But how does all this work? Since this topic can get pretty technical, we\u2019re going to start with a quick (general) overview of how digital signing works before getting into the heavy stuff for our more technical readers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, you can use a document signing certificate to sign Microsoft Office files and PDFs. Let\u2019s quickly explore what happens is this basic process:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Take the file that you want to digitally sign and apply a hashing algorithm to it.<\/strong> This part of the digital signature process involves generating a hash value (i.e., an output that\u2019s a fixed-length string of characters) to uniquely identify the file. You can create a hash digest from a file, but you can\u2019t create a file from the hash value.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"832\" height=\"400\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-hashing-works-basic.png\" alt=\"A basic diagram illustrating how hashing works in general \" class=\"wp-image-15160\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-hashing-works-basic.png 832w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-hashing-works-basic-300x144.png 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-hashing-works-basic-768x369.png 768w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><figcaption class=\"wp-element-caption\">A basic graphic that illustrates how hashing works.<\/figcaption><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use your document signing certificate\u2019s cryptographic private key to encrypt that hash value.<\/strong> This generates your digital signature, which can also include a timestamp that shows the precise date and time when you digitally signed the file.<\/li>\n\n\n\n<li><strong>Send your public key and certificate along with the digitally signed file to your recipient.<\/strong> Because cryptographic keys come in pairs, your email recipient can use your public key to verify the digital signature. Your computer will then generate a hash digest and compare this hash value against the hash value in the signature. This allows you to know that the file is authentic and hasn\u2019t been altered since you signed it. (If the file was changed, the hash value would change also.)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">I know, that\u2019s a lot of \u201chash value\u201d this and \u201cdigital certificate\u201d that to follow&#8230; we\u2019ll speak more about each of those components momentarily. But first, let\u2019s consider a quick analogy to help you understand what a digital signature does in terms of data integrity and identity assurance\u2026<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-a-digital-signature-is-like-your-driver-license-s-security-measures\">A Digital Signature Is Like Your Driver License\u2019s Security Measures<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Using a digital signature to sign your files or software is akin to the fraud protection measures you\u2019ll find on a driver\u2019s license or ID card here in the U.S. This component affirms that this piece of identification was issued by an authority (i.e., your state\u2019s Department of Motor Vehicles) and that it\u2019s authentic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have this card, other parties who don\u2019t know you personally can trust that your identity is legitimate. Why? Because they know that you had to provide several pieces of verifying information to prove your identity before the DMV would issue the card.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These ID cards contain informational and visual components that help you verify the authenticity of your identity, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your full legal name,<\/li>\n\n\n\n<li>Physical identifying information (photograph, date of birth, and height),<\/li>\n\n\n\n<li>Your verifiable residential address,<\/li>\n\n\n\n<li>The driver\u2019s license number that\u2019s unique to you,<\/li>\n\n\n\n<li>A card issuance date and expiration date, and<\/li>\n\n\n\n<li>Security markers (holographic components, ultraviolet ink, etc.).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"798\" height=\"277\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/fl-drivers-license-example-graphic.jpg\" alt=\"A set of screenshots of an example Florida driver's license that demonstrates the concept of fraud security measures.\" class=\"wp-image-15161\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/fl-drivers-license-example-graphic.jpg 798w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/fl-drivers-license-example-graphic-300x104.jpg 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/fl-drivers-license-example-graphic-768x267.jpg 768w\" sizes=\"auto, (max-width: 798px) 100vw, 798px\" \/><figcaption class=\"wp-element-caption\">Image source: <a href=\"https:\/\/www.flhsmv.gov\/driver-licenses-id-cards\/newdl\/\">Florida Highway Safety and Motor Vehicles (FHSMV).<\/a> <\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you have an ID card that is missing any of this information or doesn\u2019t feature the fraud protection measures, you know that the ID may not be authentic and can\u2019t be trusted.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The big takeaway here is that a digital signature allows the other party you\u2019re communicating with (or the person who downloads your software or files) to know that it\u2019s legitimate and hasn\u2019t been modified without your knowledge or approval.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-now-let-s-take-a-look-at-the-components-involved-in-digital-signatures\">Now, Let\u2019s Take a Look at the Components Involved in Digital Signatures\u2026<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now that we have a general understanding of how digital signatures work, it\u2019s time to familiarize ourselves with the components that are central to the digital signature process.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>PKI digital certificate<\/strong> \u2014 This small digital file serves as your digital identifier and carries verified organizational information relating to a cryptographic key (which we\u2019ll also discuss momentarily). PKI digital certificates come in multiple forms that serve different purposes:\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.thesslstore.com\/blog\/what-is-a-website-security-certificate-and-what-does-it-do-for-your-business\/\"><strong>Website security certificate<\/strong><\/a><strong> (SSL\/TLS certificate)<\/strong>:This is the type of certificate that you use to assert your organizational identity on servers, websites, and web apps. It also helps you secure your data and connections using encryption.<\/li>\n\n\n\n<li><strong>Document signing certificate:<\/strong> This certificate allows you to digitally sign your documents to ensure users that your file is legitimate and hasn\u2019t been modified in any way. These certificates are offered as individual validation and organizational validation options. Some document signing certificates, such as <a href=\"https:\/\/www.thesslstore.com\/digicert\/document-signing.aspx\">those offered by DigiCert<\/a>, offer two-factor authentication. This provides an added layer of security by requiring you to enter a password and use a USB token to prove your identity when digitally signing a file.<\/li>\n\n\n\n<li><strong>Code signing certificate: <\/strong>A <a href=\"https:\/\/www.thesslstore.com\/blog\/protecting-your-software-from-cyberattacks-with-code-signing\/\">code signing certificate<\/a> is a nifty file that enables you to digitally sign your software, scripts, and other executables. Why? So, people know that the software \u2014 or any updates you release \u2014 were created by you and not some schmuck who wants to infect their device with malware.<\/li>\n\n\n\n<li><strong>Email signing certificate (<\/strong><a href=\"https:\/\/www.thesslstore.com\/blog\/what-you-need-to-know-about-s-mime\/\"><strong>S\/MIME certificate<\/strong><\/a><strong>):<\/strong> This type of PKI digital certificate allows you to digitally sign your emails while also offering the additional benefit of encrypting sensitive emails. For this to work, both you and your recipient must use email signing certificates, and you\u2019ll use the recipient\u2019s public key to encrypt the message, which they\u2019ll decrypt using their corresponding private key.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Cryptographic keys (public and private) <\/strong>\u2014 Every key pair, which contains a public and a private key, is tied to your digital identity. Both keys are unique strings of characters that allow you to perform cryptographic functions like encryption, hashing, etc. The private key is one you keep to yourself (secret), whereas the public key is something that you\u2019ll give to other parties (i.e., it\u2019s available to virtually everyone) as it\u2019s included in your digital certificate.<\/li>\n\n\n\n<li><strong>Encryption<\/strong> \u2014 <a href=\"https:\/\/www.thesslstore.com\/blog\/types-of-encryption-encryption-algorithms-how-to-choose-the-right-one\/\">Encryption<\/a> is a two-way cryptographic process that takes plaintext data (i.e., readable information) and uses a key to scramble it into an unrecognizable form. This process protects data by ensuring that only authorized users (i.e., the person with the decryption key) can decrypt and access that information. Even if someone gains access to encrypted data, they can\u2019t do anything with it without that secret key.<\/li>\n\n\n\n<li><strong>Hash algorithm<\/strong> \u2014 A hash algorithm, or what\u2019s also known as a <a href=\"https:\/\/www.thesslstore.com\/blog\/what-is-a-hash-function-in-cryptography-a-beginners-guide\/\">hash function<\/a>, is a type of mathematical equation that takes your input data and maps it to a data string of a specific length. <a href=\"https:\/\/www.thesslstore.com\/blog\/difference-encryption-hashing-salting\/\">Hashing<\/a> is a cryptographic process that\u2019s often confused with encryption. Unlike encryption, hashing is a one-way function, meaning that you can use it to generate a hash value, but it\u2019s infeasible to use that hash value to reverse engineer it to get the original input. (Encryption, on the other hand, is meant to be reversed using the secret decryption key.) Examples of common hashing algorithms include MD5, SHA-256, and SHA-384.<\/li>\n\n\n\n<li><strong>Hash value<\/strong> \u2014 This is a fixed-length string of characters that you generate by applying a hashing algorithm to the file or communication you digitally sign. For example, the single word \u201cboomerang\u201d would generate a hash value of the same length as all the text from the <em>Lord of the Rings<\/em> book series combined.<\/li>\n<\/ul>\n\n\n<span style=\"display:none\" class=\"tl-placeholder-f-type-shortcode_12653\"><\/span>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-digital-signatures-work-exploring-the-signing-verification-processes-in-depth\">How Digital Signatures Work: Exploring the Signing &amp; Verification Processes In Depth<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The digital signing process is a mix of cryptographic functions. In this case, it uses both hashing and encryption as part of the process to help you protect the integrity of the data and assert your organization\u2019s identity in a way that your recipient can verify.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As mentioned earlier, digital signatures can be applied to email communications, code for executables and software, and various types of files (such as PDFs and Office files). Let\u2019s say you need to generate a contract for a new customer and want to have a way to prove that you created the document and that it\u2019s authentic. We already briefly touched on the digital signing process earlier in this article, but now, it\u2019s time to look at its specifics more in depth.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this example, we\u2019ll explore how to digitally sign a PDF file. After that, we\u2019ll break down how to verify that the signature is legitimate and that the file hasn\u2019t been modified since you signed it. <em>(<strong>Note: <\/strong>The first three steps apply to you as the file creator. Steps four and five really apply to the person who downloads your file and needs to verify its authenticity.)<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-one-create-the-pdf-file-you-want-to-sign\">Step One: Create the PDF File You Want to Sign<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can\u2019t digitally sign something without first creating it. Create that communication or document first and ensure that it\u2019s in tip-top shape. (After all, once you sign the document, you can\u2019t make any changes without having to re-sign the file because) once that\u2019s ready to go, move on to step two.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-two-apply-your-digital-signature-to-your-files-or-communications\">Step Two: Apply Your Digital Signature to Your Files or Communications<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For this part of the process, you\u2019ll take the PDF file that you wish to digitally sign (input) and apply a hashing algorithm to it. For example, you could use the SHA-256 hashing algorithm for this task, which will generate a hash value (output) of 256 bits. This will be visually represented by a fixed-length string of 64 hexadecimal characters.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"841\" height=\"407\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-hashing-a-digital-file-works-diagram.png\" alt=\"A basic diagram that illustrates how hashing a digital file works\" class=\"wp-image-15162\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-hashing-a-digital-file-works-diagram.png 841w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-hashing-a-digital-file-works-diagram-300x145.png 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-hashing-a-digital-file-works-diagram-768x372.png 768w\" sizes=\"auto, (max-width: 841px) 100vw, 841px\" \/><figcaption class=\"wp-element-caption\">A basic illustration that showcases the process for digitally signing a PDF file. This is an example to answer the question &#8220;how do digital signatures work?&#8221;<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Of course, the cryptographic processes occur in the background when you\u2019re signing PDFs in Adobe. It\u2019s kind of like the process of how sausages are made \u2014 you don\u2019t necessarily need to see the process to know that the results are good. (Then again, using that analogy, it\u2019s often better to NOT see the process so you can continue enjoying the taste of the sausage without thinking about what went into making it!)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s an example of what a PDF digital signature looks like in Adobe Acrobat:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"790\" height=\"600\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/adobe-pdf-digital-signature.png\" alt=\"How do digital signatures work? This digital signature process screenshot  showcases one of the steps for applying a digital signature to a PDF file\" class=\"wp-image-15163\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/adobe-pdf-digital-signature.png 790w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/adobe-pdf-digital-signature-300x228.png 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/adobe-pdf-digital-signature-768x583.png 768w\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s a quick screenshot as well of the certificate details information, which shows that the certificate is intended to serve as means for adding a digital signature.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"808\" height=\"959\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/adobe-pdf-digital-signature-information.png\" alt=\"This digital signature process screenshot  showcases the digital signature-related information for a digitally signed PDF file\" class=\"wp-image-15164\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/adobe-pdf-digital-signature-information.png 808w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/adobe-pdf-digital-signature-information-253x300.png 253w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/adobe-pdf-digital-signature-information-768x912.png 768w\" sizes=\"auto, (max-width: 808px) 100vw, 808px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">But if you\u2019re curious as to what this type of process looks like, here are the steps that happen behind the scenes. Let\u2019s consider an example of how this would work in Windows PowerShell. Say, you apply a hash function such as a SHA-256 to your PDF file. This will result in it spitting out a random hash digest like the following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"899\" height=\"460\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-hash-a-file-powershell-example2.png\" alt=\"A screenshot of file hashing in Microsoft PowerShell\" class=\"wp-image-15165\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-hash-a-file-powershell-example2.png 899w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-hash-a-file-powershell-example2-300x154.png 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-hash-a-file-powershell-example2-768x393.png 768w\" sizes=\"auto, (max-width: 899px) 100vw, 899px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To generate your hash value using the SHA-256 hashing algorithm, use the command illustrated above:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em>get-filehash -algorithm SHA256 [file-you-want-to-hash]<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-three-encrypt-the-hash-value-using-your-private-key\">Step Three: Encrypt the Hash Value Using Your Private Key<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Next comes the fun part, which requires the use of a PKI document signing certificate and its corresponding cryptographic keys. Once you\u2019ve generated the hash value of your PDF file, you\u2019ll want to use your private key to encrypt the hash value. This process creates your PKI digital signature, which ensures the integrity of your file. &nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remember the example diagram we shared earlier? Here\u2019s a basic illustration of how this process looks by building upon that process from earlier:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1008\" height=\"341\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-digitally-sign-a-pdf-file.png\" alt=\"How do digital signatures work? This basic diagram illustrates the concept of how the digital signature process works\" class=\"wp-image-15166\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-digitally-sign-a-pdf-file.png 1008w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-digitally-sign-a-pdf-file-300x101.png 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-digitally-sign-a-pdf-file-768x260.png 768w\" sizes=\"auto, (max-width: 1008px) 100vw, 1008px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it for the digital signing process itself. Once these two steps are complete and you have your digitally signed PDF file, you can put the document to use however you planned. For example, when you send the file to your customer, you\u2019ll include with it a copy of your public key, which will come in handy for them in the next steps.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let\u2019s explore how your recipient can use this digital signature to verify your identity and the file\u2019s authenticity.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-four-decrypt-the-hash-value-of-the-encrypted-file-or-email\">Step Four: Decrypt the Hash Value of the Encrypted File or Email<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now, this next part happens partially on the backend, out of the view of the user who receives the file. When they download or receive your digitally signed PDF file, their server will also receive your document signing certificate\u2019s public key. They can use this key to decrypt the digital signature to gain access to your document\u2019s hash value. This brings us to our next step\u2026<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-five-generate-a-new-hash-value-compare-it-to-the-hash-value-from-the-document\">Step Five: Generate a New Hash Value &amp; Compare It to the Hash Value from the Document<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Alright, this last section will talk about how to check whether the file\u2019s hash value is legitimate. When you digitally sign your PDF using Adobe, this process occurs in the background. But if you were to do this process manually, it would involve generating a hash value of the file and comparing it to the file\u2019s known hash value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Many companies often provide file checksum information on their website. Users can use this information in the next step that involves comparing the hash value they generate to the one the company provides.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-how-to-check-a-file-s-checksum-manually-using-windows-powershell\">How to Check a File\u2019s Checksum Manually Using Windows PowerShell<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019re one of those do-it-yourself types or someone who doesn\u2019t trust the automated process, no worries. You can check the hash value yourself. To check the hash value of your file against the known hash digest, use the following command in Windows PowerShell:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em>certutil -hashfile [file-you-want-to-check] [hash algorithm]<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019ll look something like the following example, which confirms that the hash value is the same as the one used in our example in step two:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"945\" height=\"368\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-check-file-hash-value-powershell.png\" alt=\"A screenshot of hashed file's checksum process in Microsoft PowerShell\" class=\"wp-image-15167\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-check-file-hash-value-powershell.png 945w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-check-file-hash-value-powershell-300x117.png 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-to-check-file-hash-value-powershell-768x299.png 768w\" sizes=\"auto, (max-width: 945px) 100vw, 945px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Check out this quick how-to video that will walk you through the process in Windows PowerShell:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to quickly verify MD5, SHA1 and SHA2 (256, 384, 512) Checksum in Windows using Command Prompt\" width=\"960\" height=\"540\" src=\"https:\/\/www.youtube.com\/embed\/YM2CE6zKvoo?start=4&#038;feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-what-happens-if-the-hashes-don-t-match\">What Happens If the Hashes Don\u2019t Match?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Now, if one or both of these results fail \u2014 for example, the hash value you generate doesn\u2019t match the known hash value of the file \u2014 then it means that the file integrity hasn\u2019t been proven. This will trigger an error message that basically warns you that the file may be compromised. So, if you decide to trust that file after receiving that message, you\u2019re doing so at your own risk.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-a-digitally-signed-file-looks-like\">What a Digitally Signed File Looks Like<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Below, you\u2019ll find a couple of quick examples of information you\u2019ll see when you receive a digitally signed PDF. (Thanks to our friends at <a href=\"https:\/\/www.digicert.com\/\">DigiCert<\/a> for providing these example graphics!):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"795\" height=\"395\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/digicert-digital-signature-example.png\" alt=\"An example digital signature on a PDF from DigiCert\" class=\"wp-image-15168\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/digicert-digital-signature-example.png 795w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/digicert-digital-signature-example-300x149.png 300w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/digicert-digital-signature-example-768x382.png 768w\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"807\" height=\"893\" src=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/digicert-digital-signature-example2.png\" alt=\"An example digital signature on a PDF from DigiCert\" class=\"wp-image-15169\" srcset=\"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/digicert-digital-signature-example2.png 807w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/digicert-digital-signature-example2-271x300.png 271w, https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/digicert-digital-signature-example2-768x850.png 768w\" sizes=\"auto, (max-width: 807px) 100vw, 807px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-final-thoughts-on-how-digital-signatures-work-how-they-help-your-business\">Final Thoughts on How Digital Signatures Work &amp; How They Help Your Business<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We hope that this article has sufficiently answered your question, \u201chow do digital signatures work?\u201d To quickly summarize:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Digital signatures are a way for you to assert your individual or organizational digital identity and ensure file integrity.<\/li>\n\n\n\n<li>These types of electronic signatures have many applications, including being applied to emails, files, and software.<\/li>\n\n\n\n<li>Digital signatures \u2014 and the verification of these security attributes \u2014 are possible thanks to digital certificates, cryptographic keys, and the public key infrastructure that supports them.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Needless to say, whether you\u2019re looking to protect the integrity of your software, provide assurance to customers that your invoices are legitimate, digital signatures are playing an increasingly important role in digital security.<\/p>\n\n\n<span style=\"display:none\" class=\"tl-placeholder-f-type-shortcode_12763\"><\/span>","protected":false},"excerpt":{"rendered":"<p>A digital signature helps you prove something (such as an email, file or executable) is legitimate and not fake. We\u2019ll break down how digital signatures work to protect your organization\u2019s&#8230;<\/p>\n","protected":false},"author":17,"featured_media":15174,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":"","tve_updated_post":"","tve_custom_css":"","tve_user_custom_css":"","tve_globals":{},"tcb2_ready":0,"tcb_editor_enabled":0,"tve_landing_page":"","_tve_header":"","_tve_footer":""},"categories":[16,10200],"tags":[8348,13146,13144],"class_list":["post-15157","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hashing-out-cyber-security","category-monthly-digest","tag-digital-signatures","tag-how-digital-signatures-work","tag-pki-signature","post-with-tags"],"views":26227,"jetpack_featured_media_url":"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2021\/11\/how-do-digital-signatures-work-feature.jpg","_links":{"self":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts\/15157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/comments?post=15157"}],"version-history":[{"count":0,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts\/15157\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/media\/15174"}],"wp:attachment":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/media?parent=15157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/categories?post=15157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/tags?post=15157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}