Code Signing

Code Signing

Code signing is a procedure that allows software developers to digitally sign their programs — so that any user can verify whether the software really comes from the stated manufacturer and has remained unchanged since its release.

Code signing means: a software developer equips their program with a digital signature. This signature is bound to a cryptographic key — that is, a very long, unique sequence of numbers — that belongs uniquely to the developer. Anyone who later downloads the software can use this signature to check two things: first, whether the program really comes from whoever claims to have written it. Second, whether the code was altered after signing. If even a single byte has been tampered with, the verification fails.

Protection against manipulated software

Without code signing, anyone could post a malicious copy of a well-known program online and claim it was the original. Users would hardly be able to tell. Code signing solves this problem because the signature cannot be forged — at least not without the developer’s secret key.

This is especially important for automatic updates. When your operating system installs a new version of a program, it checks the signature in the background. If it doesn’t match, the installation is aborted. This way, an attacker who manages to infiltrate the update channel cannot smuggle in manipulated software. This attack vector is called a supply chain attack — it targets not the program itself, but the path by which it reaches the user.

Code signing doesn’t just protect end users. Companies that integrate third-party software into their systems also rely on signatures to check whether delivered code is trustworthy.

How a digital signature is created

The developer first generates a key pair: a private key, which they keep secret, and a public key, which anyone may view. Then they compute a so-called hash from the finished program code — a compact checksum that uniquely describes the entire code. This hash is encrypted with their private key. The result is the signature.

On the user’s side, the process runs in reverse. The operating system decrypts the signature with the public key and simultaneously computes the hash of the program at hand itself. If both hashes match, the verification passes. A certificate authority — a trusted organization such as DigiCert or Sectigo — has previously confirmed that the public key actually belongs to the named developer or company. Without this confirmation, the signature would be worthless, because one still wouldn’t know whom one is trusting.

A common misconception: code signing says nothing about whether a program is secure or free of bugs. It only proves origin and integrity. A signed program can still contain vulnerabilities — or be deliberately malicious if the developer themselves acts in bad faith.

Code signing in operating systems and app stores

Windows displays a warning message when an unsigned program is launched: “Windows protected your PC — unknown publisher.” macOS goes even further and blocks unsigned apps completely by default, unless the user manually intervenes in the settings. Both are based on code signing.

In app stores — that is, the Apple App Store or the Google Play Store — code signing is mandatory. Without a valid signature, no app makes it into the store. The store checks with every upload whether the signature is correct and whether it comes from a registered developer account. This gives the platform operator a means of establishing liability: if an app causes harm, the developer can be clearly identified.

Code signing usually makes the news when something goes wrong: an attacker steals the private key of a software company and uses it to sign malware. The best-known case was the SolarWinds attack of 2020, in which hackers smuggled signed code into a widely used IT management program — with the signature marking the malware as trustworthy instead of exposing it.

Subscribe free. Unsubscribe the second it sucks.

High-signal news across AI, business, UX, and tech. Every morning.