- Is a digital signature the same as encryption?
No. Encryption hides data; signatures authenticate it. A signed message is readable by anyone (unless separately encrypted), but any reader can verify who produced it and that it was not modified. A protocol that needs both (TLS, S/MIME) applies signatures and encryption as separate steps.
- What is the difference between RSA, ECDSA and EdDSA?
RSA uses modular exponentiation and produces large signatures; ECDSA uses elliptic curves and produces shorter signatures for the same security level; EdDSA (Ed25519) is a modern deterministic scheme with fast verification. All three are approved by FIPS 186-5. RSA remains the most interoperable; Ed25519 is preferred in new systems for speed and simplicity.
- Can I sign a hash instead of the data?
Yes, and it is standard practice: most signature schemes operate on a hash of the data, not the data itself. But the hash must be computed over the exact bytes you intend to sign and protected together with the data. Signing a hash that is published separately from the data leaves a substitution window: an attacker who controls the data can substitute an unsigned payload for a signed hash.
- What happens if the private key is leaked?
Every signature produced by that key becomes suspect, and any signature the attacker creates with the key will verify. The response is to revoke the key, publish the revocation through the same trust infrastructure that publishes the key (CRL, OCSP, transparency log), and re-sign existing artifacts with a new key. Short-lived keys, rotated automatically, reduce the exposure window from years to hours.
- Do I need signatures in my internal pipeline, or only for public distribution?
Both. Public distribution needs signatures to establish trust with external consumers, but internal pipelines also benefit: signatures let you prove that a deployed artifact came from your build system and not from someone who gained access to the cluster. The two use cases use the same primitives; the trust model differs.