A digital signature is a mathematical system that verifies the authenticity and integrity of electronic messages, documents, and software packages. Understanding how digital signatures work begins with public-key cryptography, where a signer uses a private key to create a unique mark and any recipient checks it using a linked public key. Unlike handwritten signatures on paper that can be copied between pages, a digital signature binds mathematically to the exact bitstring of the message. Because any modification to the underlying data breaks this connection, recipients can confirm that the content came from a known sender and remained unaltered in transit [1].
- Core Principles of How Digital Signatures Work
- Mathematical Foundations and Key Generation
- The Signing and Verification Process
- Why Hash Functions Matter for Integrity
- How Digital Signatures Work in Public Standards
- Vulnerabilities from Nonce Reuse to Replay Attacks
- How Digital Signatures Work in Bitcoin Networks
- Post-Quantum Schemes for Long-Term Security
Core Principles of How Digital Signatures Work
Whitfield Diffie and Martin Hellman first introduced the theoretical concept of a digital signature scheme in 1976, conjecturing that such systems could function using trapdoor one-way permutations. Shortly after their paper appeared, Ronald Rivest, Adi Shamir, and Len Adleman invented the RSA algorithm, which provided a practical foundation for primitive digital signatures. Early software implementations soon followed, and Lotus Notes 1.0 became the first widely marketed commercial software package to offer digital signatures when it launched in 1989. Other early designs included Lamport signatures, Rabin signatures, and Merkle signatures built on hash trees [1].
In 1988, researchers Shafi Goldwasser, Silvio Micali, and Ronald Rivest published the first rigorous definitions of security requirements for signature schemes, introducing the concept of existential unforgeability under chosen-message attack. Known in modern cryptography as EUF-CMA, this mathematical standard proves that an adversary cannot forge a valid signature on any new message even if they can request signatures on chosen messages of their choice. Cryptographers Moni Naor and Moti Yung later designed signature schemes that avoided trapdoor permutations altogether, relying instead on a simpler family of functions based on one-way permutations [1].
A formal digital signature scheme consists of three distinct probabilistic polynomial-time algorithms designated as key generation, signing, and verification. The key generation algorithm takes a security parameter and produces a private key alongside its corresponding public key. The signing algorithm takes the message and the private key to output a mathematical tag, while the verification algorithm evaluates the message, the public key, and the tag to return an acceptance or rejection decision. These algorithms guarantee correctness so that legitimate signatures generated with the private key always pass verification under the matching public key [1].
Mathematical Foundations and Key Generation
Public-key cryptography splits security roles between two complementary numbers that share a strict mathematical relationship. In an RSA setup, key generation creates a public modulus by multiplying two secret large prime numbers, alongside public exponent e and private exponent d chosen so their product equals one modulo the totient of the modulus. The signer publishes the modulus and exponent e for anyone to inspect, while keeping exponent d secret to prevent unauthorized signature creation. An attacker cannot invert the mathematical transformation without factoring the large modulus into its original prime factors [1].
The Digital Signature Algorithm relies on modular exponentiation and the discrete logarithm problem rather than integer factorization [11]. In standard OpenSSL library implementations, a DSA key structure stores large numbers as BIGNUM components, including prime modulus p, a 160-bit subprime divisor q, and a subgroup generator g. The user selects a private integer x between one and q minus one, then calculates public key y by raising generator g to the power of x modulo p. Verification functions query these components through formal API calls to ensure hardware security engines run without corrupting memory [7].

Elliptic Curve Digital Signature Algorithm designs replace large composite integers with algebraic points on a curve, reducing key sizes while preserving cryptographic strength [12]. In October 2026, Anthropic researchers investigated the origins of NIST elliptic curve seeds published in FIPS 186-2, showing that seeds for curves like P-256 came from the standard C library lrand48 generator seeded with Unix timestamps from 1997 and 1998. The discovery settled twenty-five years of speculation about deliberate weaknesses, showing that candidate 1,842 produced the standardized P-256 seed through straightforward pseudorandom sampling [8].
The Signing and Verification Process
To sign a digital record using ECDSA, the sender first converts the document into a numeric digest using a secure cryptographic hash function such as SHA-2. The sender picks a secret random integer k for that specific transaction, computes a temporary curve point by multiplying k with the fixed base point G, and sets signature value r to the horizontal coordinate modulo order n. Next, the sender calculates second value s using secret key integer dA, hash digest z, and the modular inverse of nonce k. The resulting pair of numbers (r, s) forms the complete digital signature delivered with the message [12].
A verifier receives the original message text, the claimed signer’s public key point QA, and signature numbers r and s. By taking the modular inverse of s, the verifier computes two weighting values that combine the base point G and public key QA on the curve. If the resulting curve point yields an x-coordinate that matches value r modulo n, the verifier accepts the message as authentic. Because this mathematical check succeeds only when the creator held private key dA, third parties gain complete certainty about authorship [12].
Non-repudiation ensures that signers cannot plausibly claim that someone else created a verified signature after a transaction settles. In a 2019 NIST draft standard, researcher A. Regenscheid noted that digital signatures serve as legally persuasive evidence to third parties regarding the true origin of electronic records. Because this draft document was released as an unreviewed preprint publication, cryptographic engineers monitored its updates closely as federal agencies prepared to replace older algorithms with newer standards. Legal frameworks worldwide recognize this binding power in commercial contracts [2].

Why Hash Functions Matter for Integrity
Why can systems not simply sign an entire raw document directly? In practice, asymmetric cryptographic operations are computationally slow when applied to massive data streams. Real cryptographic systems use a hash-then-sign approach where an approved hash algorithm converts input data of arbitrary length into a fixed-length string called a message digest. Signing large files directly without hashing would require separating data into multiple tiny blocks, leaving systems slow and making it hard for receivers to detect missing blocks. By applying a reverse trapdoor function only to the short padded digest, the signing program runs fast and produces compact signatures [1].
Cryptographic hash functions provide strong collision resistance, meaning that two distinct input messages cannot produce the identical hash output. If an attacker alters a single character or adds extra digits to a financial transfer, the recalculated hash digest changes completely. When the verifier evaluates the received signature against this new digest, the mathematical relationship fails immediately and the system rejects the file. This binding between hash output and private key ensures data integrity during transmission [1].
Organizations rely on digital signatures to distribute official public records without paper. The United States Government Printing Office applies digital signatures to electronic copies of federal budgets, public statutes, and congressional bills to prevent tampering. Universities like Stanford, Penn State, and the University of Chicago issue official electronic student transcripts backed by digital signatures. Software vendors distribute patches and operating system updates using public signatures, so customer machines verify code authenticity before installing files and avoid malware infections [1].
How Digital Signatures Work in Public Standards
Federal standards track how digital signatures work as computing requirements change over time. In 1991, the National Institute of Standards and Technology proposed DSA for the Digital Signature Standard, adopting it formally as FIPS 186 in 1994 despite complaints from software companies using RSA. The government released successive revisions over three decades: FIPS 186-1 in 1998, FIPS 186-2 in 2000, FIPS 186-3 in 2009, and FIPS 186-4 in 2013. A 1993 Freedom of Information Act request by Dave Banisar confirmed that the National Security Agency originally designed the underlying DSA algorithm [11].
Early adoption of digital signatures faced legal hurdles regarding intellectual property. DSA was covered by U.S. Patent 5,231,668, filed in July 1991 by former NSA employee David W. Kravitz and assigned to the United States Department of Commerce, which made it available royalty-free worldwide. Meanwhile, German cryptographer Claus P. Schnorr claimed his own patent 4,995,082 covered DSA mechanics, creating a dispute that slowed competitive implementations until both patents expired. These disputes pushed developers toward open cryptographic standards [11].

In February 2023, NIST finalized FIPS 186-5, which formally prohibited using DSA to generate new signatures while allowing verification of legacy records [11]. Draft proposals leading up to this retirement noted that industry products had shifted overwhelmingly toward elliptic curve algorithms. Standard bodies adopted Ed25519 and Ed448 under the EdDSA framework specified in RFC 8032, alongside deterministic ECDSA under RFC 6979 [6]. Software teams followed this guidance, and OpenSSH announced the complete removal of DSA support in version 10.0 [11].
Vulnerabilities from Nonce Reuse to Replay Attacks
The security of ECDSA depends entirely on selecting a fresh, unpredictable nonce value k for every signature generated by a private key. If an implementation signs two distinct messages using the identical integer k, an observer can compute the secret key dA using elementary modular arithmetic. This fatal weakness surfaced publicly when attackers extracted the master private key used to secure the Sony PlayStation 3 console. In August 2013, a flawed random number generator in Android caused Bitcoin wallet users to generate duplicate nonces, resulting in stolen funds [12].
A valid digital signature confirms message authenticity but cannot prevent an unauthorized party from capturing and resending that exact payload. In banking networks, an attacker could intercept an authorized transfer request and replay it multiple times to drain customer accounts. To block replay attacks, protocols must attach unique sequential transaction identifiers or timestamps inside the signed data string. Without external state tracking, signature validation alone cannot tell whether an approved request has already executed. Systems must manage sequence counters carefully to maintain security [1].
Signature malleability presents another risk in distributed networks where signature values can be altered without invalidating mathematical checks [1]. In ECDSA, both (r, s) and (r, -s mod n) represent mathematically valid signatures for the identical message, meaning malicious actors can alter the signature string without access to private keys [12]. Systems that treat signature bitstrings as unique transaction identifiers risk severe accounting errors. Furthermore, verifying a signature with a known key does not authenticate the public key itself, requiring external public-key certificates. Trust anchors remain necessary across distributed communication systems [1].
How Digital Signatures Work in Bitcoin Networks
Cryptographic signatures form the foundation of distributed ledger networks by guaranteeing transaction authorization without central banks. In EURASIP Journal on Wireless Communications and Networking, researchers note that non-repudiation protects decentralized ledgers from unauthorized asset transfers [10]. Bitcoin deployed ECDSA on the secp256k1 curve, requiring users to validate each input signature individually with script opcodes like OP_CHECKSIG. As transaction volume expanded, validating individual signatures for complex multisignature contracts consumed significant computational capacity and block space across network nodes [9].
To improve transaction processing, Bitcoin developers prioritized replacing ECDSA with Schnorr signatures. Schnorr schemes support native multisignature aggregation, enabling multiple signers to combine individual keys into a single joint public key and produce one constant-size signature. In a 50-of-50 multisignature transaction, the resulting signature takes the same space as a single-signer payment, reducing bandwidth and obscuring complex spending policies from public observers. As developer Pieter Wuille noted at the Scaling Bitcoin Milan conference, multi-key setups also faced cancellation attacks where malicious participants subtract keys, requiring delinearization techniques to secure inputs [9].
Bitcoin developer Gregory Maxwell proposed extending aggregation beyond collaborative signers by allowing network validators to compress all signatures within a transaction into one master signature. Analysis showed this protocol-level aggregation would reduce historical signature data to one byte per input plus one master signature, cutting blockchain storage and network bandwidth by at least 25%. By replacing traditional OP_CHECKMULTISIG execution with stacked, delinearized keys, decentralized networks lower validation costs while preserving cryptographic security. Nodes verify entire transaction blocks with fewer computations [9].
Post-Quantum Schemes for Long-Term Security
Modern engineering teams use dedicated hardware accelerators to speed up signature generation on high-throughput network interfaces. In IEEE Transactions on Very Large Scale Integration Systems, researchers M. Bisheh-Niasar, R. Azarderakhsh, and M. M. Kermani presented FPGA architectures for the Ed25519 signature algorithm on a Xilinx Zynq-7020 chip. Their high-performance design achieved a 21-fold speedup over earlier benchmarks, processing more than 6,200 digital signature operations per second while maintaining security comparable to AES-128. Their optimized architecture also integrated countermeasures against physical side-channel analysis [3].
Because future quantum computers could solve discrete logarithms and factor large integers, cryptographers are designing post-quantum signature schemes based on mathematical lattices. In 2018, L. Ducas and fellow researchers introduced CRYSTALS-Dilithium, a lattice-based signature scheme submitted to NIST post-quantum standardization efforts. Dilithium avoids complex discrete Gaussian sampling to prevent timing leaks and uses the number theoretic transform to achieve an AVX2 implementation running twice as fast as earlier algorithms, offering public keys 2.5 times smaller than competing designs. Lattice constructions provide robust security against known quantum attacks [4].
Researchers are also exploring quantum digital signatures that derive unforgeability directly from quantum physics rather than computational assumptions [13]. In National Science Review, H. Yin and colleagues demonstrated an experimental quantum network where a 384-bit quantum key signed documents of lengths up to 2^64 bits, improving efficiency by more than 10^8 times over earlier quantum protocols [5]. Earlier work by V. Dunjko, P. Wallden, and E. Andersson in Physical Review Letters proved that quantum signatures can operate without fragile quantum memory by using linear optics [14]. These physical approaches establish unforgeable communication across distances exceeding 100 kilometers [13].
- WEBSITE Wikipedia. (n.d.). Digital signature. [Article Link]
- PREPRINT Regenscheid, A. (2019). Digital Signature Standard (DSS). [Article Link]
- ACADEMIC JOURNAL Bisheh-Niasar, M., Azarderakhsh, R., & Kermani, M. M. (2021). Cryptographic Accelerators for Digital Signature Based on Ed25519. IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 29(7), 1297-1305. [Article Link]
- ACADEMIC JOURNAL Ducas, L., Kiltz, E., Lepoint, T., Lyubashevsky, V., Schwabe, P., Seiler, G., & Stehlé, D. (2018). CRYSTALS-Dilithium: A Lattice-Based Digital Signature Scheme. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2017, 238-268. [Article Link]
- ACADEMIC JOURNAL Yin, H., Fu, Y., Li, C., Weng, C., Li, B., Gu, J., Lu, Y., Huang, S., & Chen, Z. (2022). Experimental quantum secure network with digital signatures and encryption. National Science Review, 10(4), nwac228. [Article Link]
- WEBSITE National Institute of Standards and Technology. (2019). Federal Information Processing Standard (FIPS) 186-5 (Withdrawn), Digital Signature Standard (DSS). [Article Link]
- WEBSITE OpenSSL Project. (n.d.). DSA – Digital Signature Algorithm. [Article Link]
- WEBSITE Anthropic. (2026). Claude reveals ECDSA curve origins. [Article Link]
- WEBSITE Bitcoin Core. (2017). Technology roadmap – Schnorr signatures and signature aggregation. [Article Link]
- ACADEMIC JOURNAL Fang, W., Chen, W., Zhang, W., Pei, J., Gao, W., & Wang, G. (2020). Digital signature scheme for information non-repudiation in blockchain: a state of the art review. EURASIP Journal on Wireless Communications and Networking, 2020(1). [Article Link]
- WEBSITE Wikipedia. (n.d.). Digital Signature Algorithm. [Article Link]
- WEBSITE Wikipedia. (n.d.). Elliptic Curve Digital Signature Algorithm. [Article Link]
- ACADEMIC JOURNAL Yin, H., Fu, Y., & Chen, Z. (2016). Practical quantum digital signature. Physical Review A, 93(3), 032316. [Article Link]
- ACADEMIC JOURNAL Dunjko, V., Wallden, P., & Andersson, E. (2014). Quantum Digital Signatures without Quantum Memory. Physical Review Letters, 112(4), 040502. [Article Link]
Cover image: Nicobon / Wikimedia Commons, CC BY-SA 4.0