Pcornel
Security · Asymmetric Cryptography

Digital Signatures

Cheat sheet · https://pcornel.dk/topic.php?topic=4704

Back to the Topic

Answer

A digital signature is created with a private key over a hash of data, and anyone with the public key can verify that the data is unchanged and came from the key holder. It underpins certificates and code signing.

Remember

  • Sign with the private key; verify with the public key.
  • The signature covers a hash of the data.
  • Trust depends on how the public key is obtained.

First checks

  • gpg --verify file.sig file — verify signature
  • cosign verify --key cosign.pub <image> — container signature
  • Get-AuthenticodeSignature <file.exe> — Windows code signing

Verify in this order

artifact → signature → verify with trusted key

Where it usually breaks

First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4704

Confirmation

Confirm action

Continue?