Digital Signature

A mechanism that uses cryptographic techniques to prove the identity of the creator of digital data and to verify that the data has not been tampered with. It is implemented by combining public-key cryptography with hash functions.

A digital signature is a cryptographic mechanism that guarantees "who created" (authentication) and "whether the content has been altered" (integrity) for a digital document. It is the digital equivalent of a handwritten signature or seal on a paper document, but with cryptographic backing that makes forgery extremely difficult. Digital signatures underpin trust in the digital world, from electronic contracts and software distribution to email authentication.

The process works in three steps. First, the signer computes a hash value (a fixed-length digest) of the document. Second, the signer encrypts that hash with their private key to produce the signature data. Third, the verifier decrypts the signature with the signer's public key and checks whether it matches a freshly computed hash of the document. If they match, the document is proven to have been created by the signer and to have remained unaltered since signing.

The connection between character count and digital signatures shows up in the properties of hash functions. SHA-256 always outputs a 256-bit hash (64 hexadecimal characters) regardless of the input length. Whether the input is a single character or a million characters, the hash is the same size. Yet changing even one character in the input produces a completely different hash, making tampering detectable.

The size of the signature data depends on the algorithm used. An RSA-2048 signature is 256 bytes; an ECDSA (P-256) signature is roughly 64 bytes. Because the signature is appended to the document, the overall file size increases. In a PDF with a digital signature, the certificate chain and timestamp are also embedded, adding several kilobytes to tens of kilobytes.

In Japan, the Electronic Signature Act of 2001 grants digital signatures that meet certain requirements the same legal force as handwritten signatures. Electronic contract services such as CloudSign, DocuSign, and Adobe Sign are built on this legal framework. The legal validity of a digital signature is unaffected by the character count of the contract it covers.

Code signing applies digital signatures to software distribution. By signing an application's executable, the developer certifies their identity and the integrity of the code. Operating systems display warnings for unsigned software, making code signing effectively mandatory for earning user trust. Cryptography books on Amazon provide thorough coverage of these topics.

Share this article