Introduction

Every day your devices accept messages from strangers: a banking app, a software update, a website's certificate. How does each one know the message truly came from who it claims — and that nobody changed a single byte along the way?

A digital signature answers both questions at once. You hold two keys that belong together: a private key you keep secret, and a public key you hand to the whole world. You sign a message with the private key; anyone can check the signature with the matching public key. If it checks out, the message is genuinely yours and untouched.

The magic is the asymmetry. Verifying a signature is fast and open to everyone. Producing one without the private key is, as far as we know, computationally hopeless. That gap is exactly what makes trust on the open internet possible.

Try It

Below is a tiny RSA-style keypair. Type a message, sign it with the private key, and a signature appears. Then verify it with the public key — only the public key is needed to check.

<p class="hint">{{hint}}</p>
<label class="lbl">{{lbl_message}}</label>
<textarea id="msg" rows="2">{{default_message}}</textarea>
<div class="btns">
  <button id="sign" type="button">{{btn_sign}}</button>
  <button id="verify" type="button">{{btn_verify}}</button>
  <button id="tamper" type="button" class="ghost">{{btn_tamper}}</button>
</div>
<div class="row"><span class="tag">{{tag_signature}}</span><code id="sig">—</code></div>
<div class="status" id="status">{{status_initial}}</div>
<div class="keys">
  <span>{{key_public}} (<b id="pe">17</b>, <b id="pn">3233</b>)</span>
  <span class="secret">{{key_private}}</span>
</div>
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; color: #222; margin: 0; }
.hint { font-size: .9rem; color: #444; margin: 0 0 .7rem; line-height: 1.45; }
.lbl { font: 600 .8rem system-ui; color: #1d3557; display: block; margin-bottom: .25rem; }
textarea { width: 100%; font: 500 14px ui-monospace, monospace; padding: .5rem;
           border: 1px solid #cdd9e3; border-radius: 8px; resize: vertical; }
.btns { display: flex; gap: .5rem; flex-wrap: wrap; margin: .7rem 0; }
.row { display: flex; align-items: center; gap: .5rem; margin: .4rem 0; }
.tag { font: 600 .72rem system-ui; background: #e8eef3; color: #1d3557;
       padding: .15rem .5rem; border-radius: 6px; }
code { font: 600 13px ui-monospace, monospace; color: #1d3557; word-break: break-all; }
.status { font-size: 1rem; font-weight: 600; margin: .5rem 0; min-height: 1.4em; }
.status.ok { color: #0a7d33; }
.status.bad { color: #c92f3c; }
.keys { font: 500 .8rem ui-monospace, monospace; color: #555; display: flex;
        flex-direction: column; gap: .2rem; margin-top: .6rem; }
.keys .secret { color: #c92f3c; }
button { font: 600 14px system-ui, sans-serif; padding: .45rem .9rem; border: 1px solid #1d3557;
         background: #1d3557; color: #fff; border-radius: 8px; cursor: pointer; }
button.ghost { background: #fff; color: #1d3557; }
// Code not found

Now press Tamper to flip a single character, and verify again. The signature was bound to the exact original message, so the check fails immediately. Notice the asymmetry once more: signing used the secret key, but verifying — and detecting the tampering — needed only the public one. Real keys are 2048 bits or larger; the principle is identical. The hardness underneath is the same one explored in factoring.

The Real Complexity

What makes a signature trustworthy is not secrecy of the method — the algorithm is public — but the computational gap between checking and forging.

  • Verifying is cheap: a fixed number of modular multiplications, fast for anyone.
  • Forging without the private key means inverting a one-way function. For RSA (Rivest, Shamir and Adleman, 1977) that amounts to factoring a huge number into its two prime factors — a problem with no known efficient classical algorithm.
  • The status is "believed hard," not "proven hard." No one has shown forgery is impossible; security rests on a hardness assumption. If a fast factoring algorithm appeared, RSA signatures would collapse.
  • This is open, not settled. Whether such one-way functions truly exist is tied to the deepest open question in the field, P vs NP — a Millennium Prize problem.

So a digital signature is a wager on intractability: we trust it because, after decades of effort, the shortcut nobody can rule out has also never been found. Quantum computers add a twist — Shor's algorithm could factor efficiently — which is why post-quantum signatures are now being standardized.

Where It Matters

Once you can prove "this came from me, unaltered" without a shared secret, an enormous amount of the digital world becomes possible:

  • The secure web (HTTPS/TLS): the padlock in your browser is a chain of signed certificates vouching for a site's identity.
  • Software updates and app stores: your phone installs an update only if its signature matches the vendor's public key, blocking tampered code.
  • Cryptocurrencies and blockchains: every transaction is a signed message proving the owner authorized the transfer.
  • Documents and email: e-signatures, signed PDFs and S/MIME email carry legal weight by proving authorship and integrity.

Understand digital signatures and you have met the engine of online trust — and the factoring hardness it leans on, the same family of assumptions that secures nearly everything you do online.

Conclusion

A digital signature does something a handwritten one never could: it proves both who wrote a message and that not one character changed afterward — and it does so in public, with no shared secret. The whole edifice balances on a single asymmetry: verifying is effortless, forging is believed to be intractable.

That "believed" is the honest word. The safety of your bank login, your software updates and the entire secure web rests on a hardness assumption no one has proven — a quiet cousin of P vs NP. Trust on the internet, it turns out, is a bet that some problems really are hard.

Share this article

Pick a channel — or use your device's native share sheet.

Comments

Loading comments...

https://www.kipuhub.com/en/article/digital-signatures/Content licensed under CC BY-NC 4.0.