Saturday, November 28, 2026

DICOM Digital Signatures: How They Work and Why They Matter

DICOM Digital Signatures

It's been a while, I know. But, you have to believe me, it's not that I didn't work. It's just that I didn't have time to write about it. So, now is the time. Digital Signatures! Let's go. 

I'm going to pitch digital signatures here. It's powerful and important but somehow not very common in healthcare medical imaging. Nobody seems to bother implementing digital signatures or require them just like almost nobody uses secure DICOM networking. Everyone seems to rely on perimetral defense and that's odd. Very odd considering the cyber security threats and actual attacks and compromises that happen every day. Somehow, the industry ignores the security profiles that are part of the DICOM standard (PS3.15).

HRZ's MODALIZER+ implements DICOM security profiles and our latest release, MODALIZER+ version 7.1, adds the creation and validation of DICOM digital signatures. This post is about how digital signatures are used to validate the content and authenticate the origin of DICOM objects.

In this post I'll discuss:

  1. What a digital signature is.

  2. Why we need digital signatures in medical imaging.

  3. How and why DICOM digital signatures differ from other digitally signed files.

  4. How a DICOM digital signature looks inside the object.

  5. What’s new in MODALIZER+ and how to use it.

What is a Digital Signature?

And even before, why signatures, digital or physical matter? 


A signature is a proof of identity. If we recognize the signature on a letter we confirm the identity of the sender. 


We used to have seals. Think of a wax seal on an envelope. If it's not broken it confirms the integrity of the message inside.


Just the same, for digital objects, a digital signature is a proof of authenticity and integrity of a digital object. 


If we have a proof for the signer identity and can confirm the message integrity, then we can enforce accountability and in healthcare accountability matters. 


So in the end, DICOM digital signatures are necessary for enforcing accountability. You want to make sure the images are original? Sign them! You want to know who scanned the papers? sign them! You want to know who wrote this report? Sign it! You want to make sure your report is not tampered? Sign it!


Ok, then what do we need? A method to confirm identity, means to verify integrity and a way to combine the two.


Let's start with confirming identity.

Digital Certificates

How do you confirm the identity of a person in real life? You ask for an official ID, right? A passport, a driving license, any official certificate. Now what's all these plastic cards have in common? You can verify them. Your identity card has a stamp on it, a hologram, QR code, a chip, fraud prevention features and so on. If you recognize who issued the ID and you trust them, then you can assume the card holder is who he claims to be.


A digital certificate is just the same, but digital. Now here comes my confession. I started this post like 100 times and never completed it. I always break down when starting to explain how the digital certificates work, SHA, hash, RSA, CA’s, private key, public key and all that. I’m not going to do this again. It’s long, it’s complicated, you can read about it in so many other places and most of all, I’m not sure that I 100% understand it myself. I do but not in a way that you will read this post to the end. So if you really want to dig into how digital certificates work, go ask your favorite AI or dig in somewhere. 


Why DICOM digital signatures matter

DICOM objects travel a lot. An image is created by a modality, sent to the PACS, retrieved by a workstation, burned on a CD, imported in another hospital, and so on. On the way, every application that touches it may change something, sometimes on purpose (a PACS that fixes the patient ID) and sometimes by mistake. A digital signature answers three questions that secure networking (TLS) can't answer, because TLS only protects the data while it's on the wire:

  1. Integrity – was this object changed since it was signed? For example, did someone change the patient name or replace the pixel data?

  2. Authenticity – who created or approved this object? A specific device, a specific person, a specific organization.

  3. Accountability – the signer can't later say "it wasn't me". With a trusted timestamp you can also prove when it was signed.

Think of a report signed by a radiologist, an image used as evidence in court, or a clinical trial where you must prove that the images weren't touched. In all these cases "I got it from the PACS" is not a good enough answer.

DICOM digital signatures vs. regular file signatures

So why not just sign the DICOM file like we sign a PDF or an executable? A regular file signature signs the bytes of the file and is usually kept next to the file (a .p7s file) or appended to its end. This works great for an installer that nobody is supposed to touch or a PDF. But a DICOM object is never kept as is. When you send it with C-STORE there is no file at all, just a data set sent over the association. Remember that a DICOM file has a file meta header (part 10 file) that is added by the application that save the file to disk. The receiving PACS writes it to disk with its own File Meta Information, may change the transfer syntax, add, change or remove some elements and so on. So the DICOM file changes every time you send or receive it with a C-STORE.

DICOM digital signatures solve this in this way:

  • The signature lives inside the object. It is a set of DICOM data elements that we add to the object.

  • You sign elements, not bytes. The signature carries a list of the tags that were signed. Elements that are not in the list can be added or changed without breaking the signature. Change one of the signed elements, and the signature breaks. What this means is that you can sign only part of the content inside the DICOM object. For example you can sign your own annotation, or if you added some tags you can sign just them.

  • The encoding is fixed. The hash is calculated over the signed elements encoded in a specific transfer syntax that's written in the signature (usually Explicit VR Little Endian), regardless of how the object is actually stored. So the receiving side can re-encode the object and still verify it. Note that this doesn't cover compression: if someone compresses the pixel data, the pixel data changes and the signature will break.

  • More than one signature. An object can have several signatures, each covering a different list of elements. For example, the modality signs everything when it creates the image, and later the radiologist adds a signature after approving it.

So with a file signature you can say "this file was not changed". With a DICOM signature you can say "these elements of this object were not changed" and that's a much more useful statement in a world where objects move around all the time.

How DICOM digital signatures work: inside a signed DICOM object

If you remember, in chapter 4 we said that everything in DICOM is elements. Well, signatures are elements too. Two sequences do all the work, and they are defined in PS3.15 (the mechanism) and PS3.3 (the Digital Signatures Macro):

  1. MAC Parameters Sequence (4FFE,0001) says what was signed and how: the list of signed tags (Data Elements Signed), the hash algorithm (MAC Algorithm) and the transfer syntax used to encode the elements before hashing.

  2. Digital Signatures Sequence (FFFA,FFFA) holds the signature itself: the certificate of the signer, the date and time, a UID for the signature, the Signature value and optionally a certified timestamp.

Each signature has one item in each sequence, and the two items are matched by the MAC ID Number. That's how one object can carry several signatures, each with its own list of elements.

Another important detail: the hash covers not only the listed elements but also the signature's own UID, date and time, certificate type and certificate. So nobody can take your signature and pretend it was made at another time or with another certificate. And because (FFFA,FFFA) is the highest tag possible, the Digital Signatures Sequence is always the last element in the data set, after the Pixel Data.

Does your PACS keep DICOM signatures? Digital Signature levels

This part is often overlooked. Signing an object is only half of the story, the other half is what happens to the signature when the object lands in an archive. PS3.4 section B.4.1 defines three levels of Digital Signature support for a Storage SCP:

  1. Level 1 – the SCP may not preserve the signatures and doesn't replace them. In other words, your signature may simply disappear.

  2. Level 2 – the SCP doesn't preserve the incoming signatures but replaces them with signatures of its own.

  3. Level 3 – the SCP is bit-preserving and stores all the elements, including the ones it doesn't know, so the signatures survive.

Every Storage SCP should declare its level in its DICOM conformance statement. I did a quick survey of published conformance statements of some of the big PACS vendors and most of the ones that state a level declare Level 1, I found only one that declares Level 3, and many don't say anything at all. So before you rely on signatures end to end, open the conformance statement of your PACS and search for "Digital Signature". If it says Level 1, your signatures may not make it to the reading room.

MODALIZER+ as well as ZiKiT are Level 3. They store the instances exactly as received and don't strip anything.

Signing and verifying DICOM files with MODALIZER+

Now let's see how this is implemented in MODALIZER+.

Everything starts in the new Digital Signatures section of the Settings screen. Check Enable digital signing, select the Windows certificate store (Current User or Local Machine), click BROWSE and pick your signing certificate. The certificate must have a private key in order to sign. SHA256 is the default and I suggest you leave it like that unless you have a good reason. MD5 and SHA1 are available for compatibility with existing systems and are not recommended for new signatures.

MODALIZER+ Digital Signatures settings panel

Once a certificate is configured, MODALIZER+ can sign:

  1. New instances – images, video, PDF's and reports that you create in the procedure wizard. There's a new Sign option in the Convert screen, and if you check Automatically sign instances in the settings, it's checked by default.

  2. Studies in the Local Archive – right click a study and sign all its instances. This is useful for studies received from other sources and want to sign as "received and checked".

  3. Things you save from the viewer – presentation states with your measurements and annotations, and objects edited with the DICOM Editor.

MODALIZER+ signs all the elements of the data set (except group 0002 and the signature sequences themselves). If the object already has signatures, you can choose to append yours (Append signature to existing) or replace them.

You can also add a trusted timestamp to the signature. MODALIZER+ sends the signature to an RFC 3161 Time Stamp Authority (TSA) that returns a signed token with the time, and the token is stored in the signature item. This is proof from a third party that the signature existed at that time. Some TSA's require a login, so you can set a username and password or a client certificate, and there's a TEST button to check the connection before you sign anything for real.

On the other side, verification. You can verify the signatures of a study from the Local Archive or from the viewer, and the DICOM Header view (CTRL-H) shows the status of each signature in the object. For every signature, MODALIZER+ recalculates the MAC, checks it with the public key in the signer's certificate and then decides if the signer is trusted. How it decides is up to you:

  • None – any certificate that's not expired is trusted.

  • Trust Chain – the certificate chain is checked by Windows against the certificate store, just like TLS.

  • Thumbprint – only certificates whose thumbprints you listed in Approved signers are trusted. Simple, and good for small closed environments.

Note that valid and trusted are two different things. A signature can be perfectly valid (nothing changed) but signed by someone you don't trust, and MODALIZER+ will tell you exactly that.

To see the status at a glance, the Local Archive has two new columns: SIGN STAT, an icon at the beginning of each row that shows the signature status of the study, and VERIFIED, the time the signatures were last verified. The same icon also appears next to the study in the patient tree of the viewer.

[You can download MODALIZER+ and try digital signatures yourself from www.dicomizer.com.]

DICOM digital signatures FAQ

Does DICOM support digital signatures? Yes. Digital signatures were added to DICOM by Supplement 41 and are defined in PS3.15 (the profiles) and PS3.3 (the Digital Signatures Macro). The signature is stored inside the DICOM object itself.

Which hash algorithms can a DICOM signature use? The standard lists RIPEMD-160, MD5, SHA-1 and the SHA-2 family (SHA256, SHA384, SHA512), and the MAC is encrypted with an RSA private key. Local rules may prohibit the weaker ones, and SHA256 or stronger is recommended for new signatures.

Isn't TLS enough? No. TLS protects the data only while it's on the wire. Once the object is stored, TLS can't tell you if it was changed or who created it. A signature stays with the object forever.

Does a DICOM signature survive compression or anonymization? No, and it shouldn't. Compressing the pixel data or removing patient details changes signed elements, so the signature breaks. The application that made the change can add a new signature of its own.

What's the difference between a valid and a trusted signature? Valid means the signed elements didn't change since signing. Trusted means you trust the certificate of whoever signed it. You want both.

What tools can sign and verify DICOM files? MODALIZER+ signs and verifies from the UI. For developers, the open source DCMTK toolkit has dcmsign, a command line tool and library for signing and verifying DICOM files.

Summary

Let's summarize what we've covered in this post:

  1. A digital signature is a hash of the data encrypted with the signer's private key, and a certificate tells us who the signer is.

  2. Signatures give us integrity, authenticity and accountability, things that TLS alone can't give.

  3. A DICOM signature lives inside the object and signs a list of elements, not the bytes of a file, so it survives the trip from the modality to the PACS and beyond.

  4. Two sequence data elements do the job: the MAC Parameters Sequence says what was signed and how, and the Digital Signatures Sequence holds the signature and the certificate.

  5. MODALIZER+ can now sign new and existing instances, add trusted timestamps and verify signatures with the trust method of your choice.

That's it. I know and you know by now, DICOM is Easy, even the security part. As always, comments and questions are most welcome.

References


No comments:

Post a Comment

Hi, Thank you for commenting. Please note that comments are moderated and will not show immediately. Please don't put links in your comments as they will not be published.