LAAVAT signing-tool
ℹ️ Verified releases — used in production by LAAVAT customers. Every release is published with verifiable provenance — see Verifying the download.
Provided under the License below.
LAAVAT is an EU-hosted PKI and code-signing platform for embedded and IoT device manufacturers: HSM-backed secure-boot and firmware signing, device identities (IDevID/LDevID) and CA hierarchies, delivered as a service.
signing-tool is the official command-line and Python client for the LAAVAT REST API. It runs in build systems and CI/CD pipelines — not on devices — and signs firmware, boot images and other artifacts with keys that are generated in, and never leave, FIPS-mode AWS CloudHSM. Use it directly in a pipeline or as the basis of your own integration.
What it signs
The client drives the platform's signing and encryption operations, each covered in the documentation:
- NXP i.MX secure boot — HAB (via the NXP CST) and AHAB (via SPSDK). See CST/HAB signing.
- U-Boot FIT images — FIT signing.
- Xilinx Zynq UltraScale+ boot images (Bootgen) — Xilinx signing.
- MCUboot images — MCUboot signing.
- RAUC update bundles — RAUC signing.
- Detached digest signatures and OCI/container images — signing overview.
- Post-quantum ML-DSA signatures (FIPS 204) over a message — see below.
- AES image encryption — AES image encryption.
- Device identity certificates (IDevID/LDevID) and PKI/CA management — documentation.
Keys are held in FIPS-mode AWS CloudHSM. The platform supports RSA (2048/3072/4096-bit) and EC (secp256r1/secp384r1/secp521r1) keys with SHA-256 and SHA-512, and ML-DSA (post-quantum, FIPS 204) keys: MLDSA44, MLDSA65 and MLDSA87. See Supported keys and algorithms for the authoritative list.
An ML-DSA key signs the message itself rather than a digest. Pass the message base64-encoded with -p and -H NONE to a DigestSigning operation backed by an ML-DSA key, and you get the raw FIPS 204 signature (--format CMS is not available for it):
signing-tool -n test.ini imagesigning add DigestSigning -P "$PRODUCT" --operid "$OPER" \
-N msg -D "ML-DSA signature" -p "$(base64 -w0 message.bin)" -H NONE -O message.sig
openssl pkeyutl -verify -pubin -inkey mldsa.pub.pem -rawin -in message.bin -sigfile message.sig
Verifying needs OpenSSL 3.5 or later.
Installation
Install from PyPI when released:
pip install signing-tool
Verifying the download
Releases on PyPI are published with PEP 740 digital attestations, signed via Sigstore. The attestation provides a publicly verifiable, transparency-logged link proving that a given signing-tool artifact was built and published by Laavat's official GitLab CI pipeline for this project — it lets you detect a tampered or substituted artifact before you run it.
You can see the attestation on the release's PyPI page (under the file's "Provenance" / "Verified details"). To verify a downloaded artifact yourself:
python3 -m pip install pypi-attestations
# Verify a published file directly against PyPI (downloads the file and its
# attestation for you); pass the exact released filename after "pypi:":
python3 -m pypi_attestations verify pypi \
--repository https://gitlab.com/laavat/laavat-product/architecture/dist \
pypi:signing_tool-<version>-py3-none-any.whl
A successful verification confirms the artifact's provenance (who built it, from which repository). What it does not do: it is not a guarantee about the contents of the code (it is provenance, not a security audit of the source).
The
verifycommand above works against production PyPI. (Attestation verification of TestPyPI artifacts is not supported by the currentpypi-attestationsrelease.)
A CycloneDX Software Bill of Materials (SBOM) listing the package's dependencies is produced for each release: it is bundled inside the source distribution (.tar.gz) as sbom.json, and is also published as a per-version build artifact (signing-tool-sbom.json) by the release pipeline.
Quick Start
Display help:
signing-tool --help
Secure token input
Do not pass the token literally (-t "$TOKEN") and do not store it inline in a config file — in both cases the secret is exposed (shell history, process listings such as ps / /proc/<pid>/cmdline, or plaintext on disk). The tool accepts curl-style references that keep the secret out of the command line; in order of preference:
-
-t @/path/to/tokenfile(recommended) — read the token from a file (the tool warns if the file is group/world-readable; usechmod 600):signing-tool -c -t @/run/secrets/jwt -a https://app.laavat.io/<CustomerName>/api/v1 product getall
-
-t @-— read the token from stdin:printf '%s' "$TOKEN" | signing-tool -c -t @- -a https://app.laavat.io/<CustomerName>/api/v1 product getall
In a configuration file, reference the token by file instead of inlining it (an inline token = still works but is deprecated and warns on use):
[service]
url = https://app.laavat.io/<CustomerName>/api/v1
token_file = /run/secrets/jwt
These forms integrate cleanly with CI secret managers, which expose secrets as files or on stdin. TLS verification is on by default; --skipssl disables it and is intended for local development only.
The API address must be https://: the token travels with every request, so a plain http:// address is refused (exit 2) before anything is sent. http:// is accepted only for a loopback address (localhost, 127.0.0.1, ::1), for a local test service.
A leading
@is interpreted as a stdin/file reference (the curl convention). OAuth2/JWT tokens never start with@, but if you ever need a literal token that does, escape it as\@token.
Recommended usage
Supply the token without exposing it on the command line (see Secure token input), and keep the rest of the settings in a configuration file referenced with -n.
A configuration file that references the token by file (the token itself is never stored in the config):
# test.ini
[service]
url = https://app.laavat.io/<CustomerName>/api/v1
token_file = /run/secrets/jwt
signing-tool -n test.ini product getall
Or pass everything on the command line, reading the token from stdin:
printf '%s' "$TOKEN" | signing-tool -c -t @- -a https://app.laavat.io/<CustomerName>/api/v1 product getall
TLS verification is on by default.
--skipssldisables it and is for local development only.
Configuration file
The config file has a single [service] section:
| Key | Description |
|---|---|
url |
API address, e.g. https://app.laavat.io/<CustomerName>/api/v1. Must be https:// (plain http:// only for a loopback address) |
token_file |
Path to a file containing the token (preferred — keeps the secret out of the config) |
token |
The token. token = @/path/to/file reads it from a file; an inline literal token is deprecated and warns on use |
skipssl |
True disables TLS verification (local development only); defaults to False |
You can generate a config file with the config-init helper. Prefer -t @/path/to/tokenfile so it writes a token_file = reference (the secret stays out of the config); -t @- reads the token from stdin; a literal -t <token> is written inline and warns. The file is created owner-only (0600) on POSIX.
config-init -n test.ini -t @/run/secrets/jwt -a https://app.laavat.io/<CustomerName>/api/v1
signing-tool -n test.ini product getall
Quick test
For a quick one-off command without setting up a config file, pipe the token in via stdin (-t @-) so it stays out of your shell history and process listings:
printf '%s' "$TOKEN" | signing-tool -c -t @- -a https://app.laavat.io/<CustomerName>/api/v1 product getall
Note: Some commands are interactive and prompt for input:
escrow add,group add, and theescrow,groupandproductapprovals. They cannot read the token from stdin, so do not use-t @-/token = @-with them; supply the token via-t @/path/to/fileor atoken/token_fileentry in a-nconfig file instead. They have no machine-readable form either, and refuse--json.
Client-key password:
secrets getandsecrets getkeysdecrypt with the client private key given by-C. If that key is password-protected, pass the password with--password-file /path/to/file(keep itchmod 600).--keypass <password>still works but warns, because it is visible in shell history and process listings. With neither, an encrypted key prompts for its password when run from a terminal.
Strict mode for CI
The practices above are warnings by default. A pipeline that must never pass a credential insecurely can set SIGNING_TOOL_STRICT=1, which turns each of them into a usage error (exit 2) raised before any credential is sent: a literal -t, --keypass or --approver-token; a token stored inline in a config file; a group- or world-readable token, config or password file; disabled TLS verification; and a username or password in the API address.
export SIGNING_TOOL_STRICT=1
signing-tool -n test.ini imagesigning get -I "$RID" --wait -O u-boot.bin.signed
--wait checks the request every 30 seconds. Set SIGNING_TOOL_POLL_INTERVAL to another number of seconds (for example 2 in tests); a value that is not a positive number is a usage error (exit 2).
Output files: exports of secret or verification material (
secrets get/getkeys, certificates, CSRs,product getpubkey, fusemaps) never overwrite an existing file and fail instead. Re-fetchable outputs — the JSON fromproduct get -O/group get -Oand the signed artifact fromimagesigning get -O— are refreshed in place on every run. Signed artifacts follow your umask (0644under the usual022); only exported key material is0600.
What imagesigning get verifies
Two different questions, answered by two different digests:
| Check | Answers | Default |
|---|---|---|
modifiedSHA256 (automatic) |
Did the artifact arrive intact? | Always on; refuses to install on mismatch or when the service reports no digest |
originalSHA256 (--expect-input FILE) |
Was it signed over the bytes I still hold? | Off — you have to name the file |
The first cannot answer the second. Approval is a human step that can take days, and over that gap the build tree moves — a rebuild, another branch, a stale request id in a resume file — so a perfectly intact artifact can carry a signature over an input you no longer have.
signing-tool -n test.ini imagesigning get -I "$RID" --wait \
--expect-input u-boot.bin -O u-boot.bin.signed
The input is checked before the download, so a mismatch costs nothing. --expect-input requires -I, and a request reporting no input digest — usually one that is not Ready yet — is an error rather than a silent pass. --allow-unverified downgrades both checks to warnings.
-O writes the artifact whether the service stores it base64-encoded or as it is: the reported digest decides, so --skipBase64 is needed only to keep the stored bytes as downloaded. On a request with several payloads, --payload NAME picks the one -O writes; --bundle gets them all once the request is Ready. A request that ends Failed or Rejected exits 4, and the error names its errorStatus and errorDetail and, on a request with several payloads, the ones that failed.
Exit codes and --json
The tool is meant to be driven from a script, so an error means a non-zero exit and error text goes to stderr:
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Error - API, HTTP, transport, anything unclassified |
2 |
Usage - a missing or malformed option, a token that cannot be resolved, a plain http:// API address, or anything SIGNING_TOOL_STRICT refuses |
3 |
Not ready - --wait ran out of time with the request still pending. The request is alive; approve it and re-run |
4 |
The request is Rejected or Failed, so it can never produce a payload and retrying is pointless |
130 |
Interrupted with Ctrl-C |
An API error is one line on stderr, such as ERROR: HTTP 401 Unauthorized: Token has expired. Add --debug to also print the HTTP response headers and body. In both modes, tokens and presigned-URL signatures in the output are masked, because stderr usually ends up in a build log.
--json prints exactly one JSON document on stdout and nothing else, across every command family, so stdout stays parseable:
# The request id, without scraping it out of prose
ID=$(signing-tool --json -n test.ini imagesigning add SignUBoot \
-N build-42 -D "u-boot" -P "$PRODUCT" --operid "$OPER" \
-F u-boot.imx | jq -r .id)
The whole round trip in one command
imagesigning sign submits, waits, verifies both digests and installs the result, and records the pending request in --state-dir so an interrupted run resumes it instead of submitting again. That last part matters on a four-eyes operation: a resubmitted request spends a second human approval on bytes that did not change.
signing-tool -n test.ini imagesigning sign \
--operation SignUBoot -P "$PRODUCT" --operid "$OPER" \
-F u-boot.imx -O u-boot.imx.signed \
--state-dir "$HOME/.cache/laavat-requests"
Omit --approver-token and the command waits for a human to approve; pass it and the same run approves its own request, which is what an unattended pipeline on a single-approver operation wants. It takes the same forms as -t: pass it as a file, --approver-token @/run/secrets/approver-jwt (a literal token warns). If that file cannot be read, the command stops before submitting anything.
CMS settings, envelopes and the result bundle
--format CMS on a digest subcommand takes settings that shape the CMS: --cms-cert for your certificate chain, --cms-signed-attributes, --cms-signer-id, --cms-embed, --cms-content, --cms-extra-attributes, --cms-content-type, or a preset that fills them for a consumer. For SWUpdate or RAUC:
signing-tool -n test.ini imagesigning add DigestSigning -P "$PRODUCT" --operid "$OPER" -N swu -D "sw-description" \
-p "$(openssl dgst -sha256 -binary sw-description | base64)" -H SHA256 \
--format CMS --cms-preset swupdate --cms-cert chain.pem
signing-tool -n test.ini imagesigning get -I "$RID" --wait -O sw-description.sig --bundle swu.json
imagesigning envelope signs formats that are not CMS from local files - only digests are sent - and verifies each output before writing it:
signing-tool -n test.ini imagesigning envelope kernel-module -P "$PRODUCT" --operid "$OPER" --state-dir .sign \
-F a.ko -F b.ko -O signed/ --cms-cert signer.pem
signing-tool -n test.ini imagesigning envelope jws -P "$PRODUCT" --operid "$OPER" --state-dir .sign \
-F manifest.json -O manifest.jws --alg ES256
Kinds: jws, cose-sign1 (needs pip install 'signing-tool[cose]'), dsse, kernel-module, ima, mender. See the signing overview for the platform's signing operations.
Operations that sign a set of files
Three operations take a tar.gz rather than a single artifact - OP-TEE trusted applications, RAUC bundles and Xilinx bootgen - and multi-stage i.MX boot images take a rendered request alongside the payload. Three verbs cover those, and none of them talks to the service, so they need no credentials:
| Verb | What it does |
|---|---|
imagesigning pack |
Packs files into a deterministic tar.gz - same inputs, same bytes, so an unchanged build does not open a new request |
imagesigning hab-request |
Renders a hab-archive-v1 request.json for a multi-stage i.MX boot image, reading the stage layout out of the image itself |
imagesigning unpack |
Installs the signed members of a result archive over their unsigned originals, bounded and staged so a rejected member cannot leave the tree half replaced |
imagesigning sign --payload hab-archive-v1 packs the request.json named by -F together with the binaries it names, and installs the patched member named by --member - required when the request patches more than one.
Requirements
- Python 3.9 or newer
- No separate SDK install. The generated SigningService API client is vendored inside the package (
signingtool.SigningService), sopip install signing-toolis the whole installation
Why it matters for the EU Cyber Resilience Act
The Cyber Resilience Act's Annex I expects connected products to ship with secure boot, a secure update mechanism and strong device identity. LAAVAT provides the key management and signing behind all three; it does not by itself make a product compliant. Start with the CRA compliance guide and the solution guides.
Support and links
- Documentation
- CRA compliance guide
- Solution guides
- FAQ
- Website: www.laavat.io
- Contact: www.laavat.io/contact · contact@laavat.com
To report a security issue, email contact@laavat.com.
License
Proprietary — © Laavat Oy, all rights reserved. Published on PyPI so that Laavat customers and evaluators may install and use it with the LAAVAT PKI & Signing Platform; installing it grants no other rights, and the software is provided "as is", without warranty. See LICENSE for the full terms.
Metadata
Release files for signing-tool 3.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| signing_tool-3.11.0.tar.gz | 343.7 kB | With provenance | Details for signing_tool-3.11.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| signing_tool-3.11.0-py3-none-any.whl | Python 3 | none | any | Details for signing_tool-3.11.0-py3-none-any.whl |
Total release size: 1.4 MB
Release files / signing_tool-3.11.0.tar.gz
| Download URL | signing_tool-3.11.0.tar.gz |
|---|---|
| Size | 343.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc09fbc91fb329accf586943a94724b3b240329660aa2882b800fc483babca50
|
|
BLAKE2b-256 checksum How to use checksums |
014369af6ffa66a7e3b4129551b8365759bd1d87cdc58343561cfad839bbba36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.12.15
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / signing_tool-3.11.0-py3-none-any.whl
| Download URL | signing_tool-3.11.0-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6753c9e276f75cc38d6d8c455ae99eb58bdcc1807982a95a680cdc86070c583b
|
|
BLAKE2b-256 checksum How to use checksums |
65929d4e489fcd508c567f1841cbc330865781607346256f3dfcacf6835de432
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.12.15
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Oct 19, 2026.
Transparency logSecurity for signing-tool 3.11.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for signing_tool-3.11.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Oct 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.