A digital signature scheme is a triple of algorithms over a key pair , where is the private signing key held only by the signer and is the public verification key.
- Key generation
Produces . is published, often in a certificate; is kept secret.
Outputs a signature computed from the message and . In practice (a hash function ) is used instead of . The digest is fixed size, so signing cost stays constant for any length, and it avoids mathematical structure exploits that come from signing large raw data blocks directly.
Deterministic check that returns accept only if matches under .
The signature is a mathematical function of both and . Changing either input changes the valid signature.
Properties
- Authentication
A valid proves the message came from the holder of . - Integrity
Any change to after signing makes reject. - Non-repudiation
is bound uniquely to , which is known only to the signer, so no one else could have produced it. The signer cannot later deny signing .
Forgery
The signing oracle is the honest signer seen as a black box: they submit a chosen message and receive , without learning .
An adaptive chosen-message attack lets them query the oracle on messages of their choice, each query picked after seeing earlier answers.
- Existential forgery
They output one valid pair where was never queried to the oracle. The message need not be meaningful. - Selective forgery
They forge a signature on a target message fixed in advance. - Universal forgery
They can sign any message, equivalent to recovering .
A scheme is secure when existential forgery under an adaptive chosen-message attack is infeasible.
RSA Digital Signature
Uses the same key pair as RSA encryption, with the roles of and reversed. Here is the RSA modulus, the private exponent, the public exponent, and a hash function.
The two modes differ in whether the message is put through RSA directly or only its hash is, and in what gets transmitted.
- With message recovery
The message itself is signed: . Only is sent, and is recovered during verification. Requires , so it fits only short messages. - Without message recovery
Only the digest is signed: . The pair is sent, so travels in the clear. Works for any message length. This is the form used in practice.
Verification
- With recovery
Compute using the signer’s public key, and check it matches the expected message. - Without recovery
Compute and , accept iff .
Signing cost is a hash plus a single exponentiation with a full-length exponent . Verification cost is a hash plus a single exponentiation with the small exponent , plus a comparison.
Paper vs Digital
- Paper signature
A static mark tied to the physical medium. The same mark is used regardless of the document text, so it does not depend on the content. - Paper verification
Subjective visual comparison against a reference, or forensic handwriting analysis by an expert. - Digital signature
A value derived from the message content and , so it differs for every message. - Digital verification
Deterministic checking of , with trust in established through a Public Key Infrastructure and its certificate trust chains.