Cryptographically signed export (asymmetric signature)
Sign the integrity manifest with an ECDSA key so a recipient can check, with standard JWS tooling, that an export has not changed since your key signed it.
Problem
A SHA-256 hash manifest detects accidental corruption, but anyone who edits the file can recompute the hash and rewrite the sidecar. It proves nothing about who produced the file. For a clinical-legal or clinical-trial chain of custody you need a signature that only the holder of a private key can make, so a recipient who knows your key fingerprint can tell your export from one signed again by someone else.
The app signs the integrity manifest with an asymmetric ECDSA P-256 (ES256) key. The .dcm.sig sidecar is a JWS JSON Serialization envelope whose signature covers the whole manifest body (the DICOM byte hash and the audit snapshot), so any later modification fails verification unless the manifest is signed again. The public key travels inside the sidecar, so a file signed again with another key verifies under that key’s fingerprint: the fingerprint, compared with one the sender gave you, is what ties the manifest to a known key. It does not show who holds that key. The sidecar verifies with off-the-shelf JWS tooling (jose, python-jose, OpenSSL) without any dcmage code.
Scope. This is a detached sidecar signature over the export plus its audit snapshot. It is not a DICOM PS3.15 in-file signature (CMS/PKCS#7 inside the
.dcm), which targets PACS interoperability and stays deferred.
Steps
Establish a signing identity
-
Open Settings → Signing identity (or run “Signing identity…” from the command palette). A persistent ECDSA P-256 keypair is generated in your browser on first use, or import an existing key (JWK or PKCS#8 PEM).
-
The tab shows the key fingerprint (SHA-256 thumbprint), algorithm, and creation date. Use Download private key (.jwk) to back it up, and Download public key (.jwk) to share with recipients. In the desktop app each one opens a save panel. Give recipients the fingerprint through a channel other than the file itself, so they have something to compare against. Regenerate and Remove are confirmation-gated.
Export a signed manifest
- Open the file (⌘O), then Click Export → Export with Integrity Manifest…. Two files are saved: the
.dcmand the signed.dcm.sigmanifest. The browser downloads both. The desktop app asks where to save the.dcm, then opens a second save panel for the.dcm.sigin the same folder; if you cancel the first, nothing is saved. The signing identity is established automatically if you have not set one up.
Verify signature and signer
-
Open the Verify integrity manifest window. ⌘K → “verify”.
-
Upload the
.dcmand the.dcm.sig; a ✓ indicator confirms each file loaded. -
Click Verify. A matching, unmodified pair reads “Signature verified” and displays the signer fingerprint taken from the embedded public key. Compare it with the fingerprint the sender gave you.
-
Tamper test. Flip a byte of the
.dcm, or forge an entry inside the manifest, then re-verify: the modal reads “Verification FAILED”. A public key swapped into the envelope without a new signature, a legacy unsigned manifest, or a malformed envelope all fail closed too.
Result
The exported .dcm.sig is an ES256 JWS that shows the file has not changed since a holder of the signing key signed it. Verification confirms the signature against the embedded public key and shows the signer fingerprint; a match with the fingerprint the sender gave you ties the manifest to that key, not to a person. Any change to the file or the manifest without a new signature, a key swapped in without one, or a legacy/malformed manifest fails closed.