Skip to content
ecdsa.com

Detached signature

A signature stored separately from the data it signs — such as an OpenPGP .sig or .asc file, an SSHSIG file or a CMS signature without encapsulated content — so the original file stays unchanged.
Also written asdetached signature.sig file.asc signaturedetached PGP signature

gpg --detach-sign file writes file.sig (binary) and --armor writes file.asc; gpg --verify file.asc file checks it. SSH signatures (ssh-keygen -Y sign), Sigstore bundles, JWS with detached payload and S/MIME multipart/signed parts work the same way. The verifier must receive exactly the same bytes that were signed; line-ending changes or re-compression break verification.

A valid detached signature proves only that some key signed those bytes: the verifier still needs to decide whether the key belongs to the expected publisher, ideally by a pinned fingerprint or identity, not by whatever key the signature names.

Standards and references

All terms