Model signing

On this page 7

Model signing is the practice of attaching a cryptographic signature to a machine learning model and its accompanying files so that anyone who downloads or deploys the model can verify who produced it and that it has not been modified since signing. In AI security, it is a core control of AI supply chain security, because models are shared, fine-tuned and redistributed through hubs, registries and internal pipelines where tampering would otherwise go unnoticed.

A signed model does not prove that the model is safe or well behaved. It proves integrity and provenance: the bytes in use are the bytes the named publisher released. That guarantee closes an important gap in Artificial intelligence deployments, where a swapped weight file or a malicious serialized object can compromise every system that loads it.

How model signing works

Model signing applies the same public-key cryptography used for software releases to model artifacts. The signer first computes a cryptographic hash of every file in the model, such as weights, tokenizer files and configuration, and collects those digests into a manifest. The signer then signs the manifest with a private key or a short-lived identity-bound certificate.

Hashing the files individually matters because modern models can exceed hundreds of gigabytes and are split into many shards. A manifest lets a verifier check each shard in parallel and detect added, removed or renamed files, not only changed contents. The signature, manifest and certificate chain are usually stored together in a bundle next to the model.

The table below lists the main elements of a signed model.

ElementPurposeTypical form
File digestsDetect any byte-level changeSHA-256 hash per file
ManifestBind all files into one statementJSON list of paths and digests
SignatureProve the manifest came from the signerECDSA or Ed25519 signature
Certificate or public keyIdentify the signerX.509 certificate or published key
Transparency log entryRecord the signing event publiclyInclusion proof from a log
Elements of a signed model package

Signing approaches and standards

Two families of approaches are common. Key-based signing uses a long-lived private key held by the publisher, often in a hardware security module. Keyless signing, popularized by the Sigstore project, binds a short-lived certificate to an OpenID Connect identity, such as a build system or a corporate account, and records the event in a public transparency log.

The OpenSSF model signing specification, released in 2025, defines a manifest format for models and supports both Sigstore and traditional key or certificate signing. Container registries can also carry signed models packaged as OCI artifacts, which lets organizations reuse existing image-signing policies.

ApproachKey managementMain advantageMain drawback
Long-lived key pairPublisher stores private keyWorks offline and air-gappedKey theft compromises all releases
Keyless with SigstoreEphemeral keys and identity certificatesNo key to protect or rotateDepends on identity provider and log
PKI certificatesCorporate certificate authorityFits enterprise trust modelsRevocation can be complex
OCI artifact signingRegistry tooling such as Cosign or NotationReuses container policiesRequires OCI packaging of models
Comparison of signing approaches

Threats that model signing addresses

Model signing defends against tampering between the publisher and the consumer. That includes an attacker who replaces weights on a model hub, a compromised mirror, a manipulated internal registry, or a typosquatted repository that imitates a well-known model.

It is especially important against model serialization attacks. Formats based on Python pickle can execute arbitrary code when loaded, so a tampered file can become a remote code execution vector. Signature verification before deserialization stops a modified file from ever being loaded, although it does not make an unsafe format safe if the original publisher was malicious.

ThreatCovered by signingComplementary control
Weight file replaced in transitYesTransport security
Malicious code in pickle fileOnly if added after signingSafetensors and file scanning
Poisoned training dataNoData provenance and evaluation
Backdoor added by publisherNoRed teaming and behavioral testing
Stolen signing keyNoHardware keys, rotation and transparency logs
What signing does and does not cover

Verification in the deployment pipeline

Signing creates value only when verification is enforced. Mature organizations verify signatures at several gates: when a model enters the internal registry, when a CI/CD pipeline promotes it to staging, and when the serving platform loads it into memory. Admission policies can refuse any model whose signer identity is not on an allowlist.

Signing also links naturally to other supply chain records. A signed manifest can reference an AI bill of materials that lists datasets, base models and training code, and attestations in formats such as in-toto can describe how and where the model was built. Together, these records establish model lineage that auditors and incident responders can trust.

  • Sign at the end of training, inside the trusted build environment, not on a developer laptop.
  • Re-sign after fine-tuning or quantization, because these steps create a new artifact.
  • Verify before loading, never after the file has already been deserialized.
  • Pin the expected signer identity, not merely the presence of a valid signature.

Limitations and common mistakes

The most common mistake is treating a valid signature as a statement of safety. A signature says nothing about bias, jailbreak resistance or hidden backdoors; it only confirms origin and integrity. Another frequent error is verifying that a signature exists without checking that it belongs to the expected publisher, which an attacker can satisfy by signing a malicious model with a personal account.

Operational gaps also weaken the control. Teams may sign the weights but omit tokenizer or configuration files, which can still change model behavior, or they may skip verification in development environments that later feed production. Finally, adoption on public model hubs is still uneven, so many consumers must decide how to treat unsigned third-party models, usually by isolating, scanning and testing them before use.

In everyday language

A machine learning model is a large set of files. People download these files from the internet or from company servers. Someone could secretly change them along the way. Model signing works like a tamper-evident seal on a medicine bottle.

The publisher seals the files with a digital signature. Before using the model, a computer checks the seal. If anything changed, the check fails. A signed model tells you who made it and that nobody altered it. It does not tell you whether the model is good.

Seen in the real world

A health insurance company fine-tunes an open language model to summarize claim documents. The machine learning platform team signs every model at the end of the training job, using keyless signing tied to the identity of the build pipeline. The serving cluster runs an admission policy that loads only models signed by that pipeline identity.

Months later, a contractor copies a modified model with the same file names into the shared storage bucket, hoping to test a change quickly. The serving system computes the file digests, finds that two weight shards no longer match the signed manifest and refuses to load the model. The security team receives an alert, traces the change in minutes and confirms that no altered model ever processed customer data. The same control would have stopped a deliberate attacker who gained write access to the bucket.