Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Provenance for Scientific Detector Data

We are developing an open specification and software tools that allow images, movies, and spectra recorded by scientific detectors to carry a cryptographic record of where they came from. Data signed inside the detector can be verified by anyone, offline, using only the detector manufacturer’s published public key.

Motivation

Generative models, together with the accurate simulation codes developed for microscopy and crystallography, can now produce diffraction patterns, micrographs, and spectra that are very difficult to distinguish from real measurements. Zecca et al. found that researchers identified real electron micrographs 63% of the time and generated micrographs 78% of the time, but that their accuracy fell to 50% once real and generated images were mixed together (Zecca et al., Microsc. Microanal. 2023). A survey of more than 250 scientists reached the same conclusion across six imaging modalities (Davydiuk et al., Nat. Nanotechnol. 2025). Image manipulation also occurs without generative models, and Bik et al. found problematic image duplication in 3.8% of more than 20,000 biomedical papers (Bik et al., mBio 2016).

A raw data file today is an unsigned sequence of bytes, and the scientific community relies on institutional trust when it assumes that a file came from a real measurement. Detecting fabricated data statistically is an arms race, because anyone producing fake data can train their generative model against the detection method. We propose signing measurements inside the detector, so that genuine data carry evidence that cannot be produced without physical access to the instrument. The threat model describes the reasoning behind this choice.

Detector signatures

The detector holds a private signing key inside a secure element, which is a tamper-resistant chip that generates the key and never allows it to be exported. The manufacturer issues a certificate that binds this key to the detector’s serial number, using the same public key infrastructure (PKI) that secures web traffic. During acquisition, the detector computes a cryptographic digest of every frame and signs the complete run with a single signature. Anyone can then check that each file is unmodified, and that it was signed by a specific instrument certified by its manufacturer. Signing and verification describes the keys, certificates, signatures, and verification steps.

Demonstration

The demonstration verifies and signs files entirely in your web browser, using sample files that cover every possible result. Files are never uploaded.

Integrity and assurance

A valid signature by itself establishes very little, because anyone can generate a key and use it to sign a fabricated file. We therefore report two separate results for every file: integrity, which states whether the bytes have changed since signing, and assurance, which states what the signature establishes about the origin of the file. Only data signed during a physical exposure by a manufacturer-certified key inside the instrument passes verification. A signature cannot establish that the experiment itself was honest, since a real detector recording a fabricated sample produces genuine frames. Assurance levels defines each level.

Users

Data formats

The specification keeps the signing and verification machinery separate from the file format, so that the same approach applies to diffraction frames, images, movies, and spectra. The current implementation signs X-ray diffraction frames in the Crystallographic Binary File (CBF/imgCIF) format, HDF5 files such as HyperSpy .hspy, EMD and NeXus files, and Zarr stores such as quantEM files and HyperSpy .zspy, in each case inside the file, which still opens in its usual software. For these formats the signature covers the decoded values and the metadata, so it remains verifiable after lossless recompression or repacking. Any other file can be signed byte for byte with a separate signature file, and proprietary formats can be converted to HyperSpy .hspy first.

Project status

This project is at an early stage. We have a working reference implementation in Python, an independent verifier that runs entirely in a web browser, and hardware-backed signing using the Trusted Platform Module (TPM) or Secure Enclave built into standard computers. No detector currently signs data in hardware. Project status describes the current infrastructure, remaining work, and open questions.

References
  1. Zecca, P. A., Marcella, R., Andrea, B., Marina, P., Marina, B., & Mario, R. (2023). The Dark Side of Artificial Intelligence: The Possible Risk of Falsifying Images for Scientific Articles. Microscopy and Microanalysis, 29(5), 1688–1693. 10.1093/micmic/ozad093
  2. Davydiuk, N., Krieg, E., Gaitzsch, J., McCall, P. M., Auernhammer, G. K., Yang, M., Tracy, J. B., Bals, S., Parak, W. J., Kotov, N. A., Liz-Marzán, L. M., Fery, A., Faria, M., & Besford, Q. A. (2025). The rising danger of AI-generated images in nanomaterials science and what we can do about it. Nature Nanotechnology, 20(9), 1174–1177. 10.1038/s41565-025-02009-9
  3. Bik, E. M., Casadevall, A., & Fang, F. C. (2016). The Prevalence of Inappropriate Image Duplication in Biomedical Research Publications. mBio, 7(3). 10.1128/mbio.00809-16