Security foundations Public and private keys 2 min read

Public and private keys

Your computer downloads a signed update. The verification key is public. How can the updater tell that the publisher signed this exact file?

  1. The publisher signs with the private key

    The publisher produces a signature for the update with its private signing key. The update and signature can then travel together. The signing key stays with the publisher.

    The publisher signs an update and the updater verifies its signature with a trusted public key. PublisherSignsUpdateSignatureUpdaterVerifies

    In short The private key creates the signature.

  2. The updater verifies with the public key

    The updater uses a public key it already trusts to verify the signature against the downloaded file. If the bytes change after signing, verification fails. With a valid signature, the updater has evidence that the matching signing key signed those bytes.

    In short The public key verifies the signature for this file.

Where this example stops

A valid signature does not tell you whether the update is safe. Verification also depends on the updater already trusting the right public key and the publisher protecting its signing key.

Keep this

Keep the signing key private and establish trust in the verification key.

Verify the downloaded bytes before accepting the update.

Sources

Last reviewed 21 November 2026.

Next byte · Security foundations Why does security need randomness?