Skip to content
A valid DCC signature does not prove the value you imported

A valid DCC signature does not prove the value you imported

A DCC signature can verify while your import reads an unsigned value. How to bind imported as-found data to the signed element, and test it.

8 min read 1,484 words

The validator says the signature is valid. So why does the as-found value in the record not match the certificate open on the bench?

Loose steel gauge blocks wrung into a column beside a tablet showing an abstract structured-data layout on a matte inspection bench

"Signature valid" is a green tick on the screen. The supplier’s DCC arrives by e-mail, the import runs, the instrument’s record fills in, and the as-found value reads as a pass. Then someone opens the PDF rendering of the same certificate and finds the lab’s as-found value was out of tolerance. Nothing in the validator was wrong. It answered a different question from the one your record depends on.

Three checks that look like one

A Digital Calibration Certificate is a single XML document whose structure is fixed by the PTB/EURAMET DCC schema. Its two top-level sections are administrativeData, which describes the items, the laboratory, the customer and the procedure, and measurementResults, which carries the values, their SI units and their uncertainties. The schema also allows an XML digital signature (XMLDSig) to be attached. Three checks are involved, and they are easy to collapse into one tick:

  1. Schema validity. The file conforms to the DCC XSD for its declared version. This article assumes v3.3.0. The check says the structure is well formed. It says nothing about who produced the file.
  2. Signature validity. The reference digests match the signed content, and the signature value verifies against a signer certificate you trust. This says the signed bytes have not changed since signing, and who signed them.
  3. Binding. The element your importer reads is the element the signature covers. Only this check tells you that the imported values are the signed values.

Validators usually perform the first two. The third is where the gap sits.

Why the signature protects less than the whole file

Signature references point at elements by identifier, not by position. In the v3.3.0 schema documentation, the two top-level sections carry no ID attribute, so a signature cannot reference measurementResults as a whole. It references nested elements that declare an ID, such as an individual measurementResult. That is a reasonable design, but it means the signature protects specific nodes. Everything else in the file is only as trustworthy as the code that decides which node to read.

If the importer selects "the first measurementResult in the document", it has made a decision the signature never made. This is the core of XML signature wrapping, a class of attack documented since the mid-2000s and a known failure mode in SAML and SOAP implementations. The signed node stays intact and verifies, while an unsigned node is processed in its place. A DCC has the same shape, so the same failure applies.

A worked example with illustrative numbers

Take a click torque wrench set at 40 N·m with a tolerance of ±3 %. The lab’s signed measurementResult reports:

  • as-found: 41.5 N·m, +3.75 %, out of tolerance
  • as-left after adjustment: 40.1 N·m, +0.25 %

Now suppose the file also contains a second measurementResult, unsigned, placed ahead of the signed one, reporting an as-found of 40.6 N·m (+1.5 %, in tolerance). The signature still verifies, because the signed node is untouched. An importer that reads the first match records an in-tolerance as-found. The record shows a pass. No out-of-tolerance event is raised, and the products checked with that wrench since its last good calibration are never reviewed.

The figures are invented for illustration, and a real certificate would not be built this way. The failure is realistic, and it is the one ISO 9001 clause 7.1.5.2 is there to prevent. When measuring equipment is found out of conformity, you have to judge whether earlier results were adversely affected. You can only make that judgement if the as-found value you hold is the value the lab actually signed.

What a verified import has to do

Treat import as a binding problem with five requirements:

  • Validate against the declared XSD, matching on the namespace URI rather than the prefix, because prefixes are arbitrary.
  • Verify every XMLDSig signature in the file, including its reference digests, and record which algorithm passed. An open-source XML-signature library’s DCC test cases treat SHA-1 signatures as verifiable only under a policy that explicitly admits SHA-1. Admitting SHA-1 should be a decision you make, not a default you inherit.
  • Reject ambiguity. Duplicate identifiers, duplicate sections, or a signed node that is not where the importer expects it should stop the import, not be resolved by guessing.
  • Read from the signed node. Resolve the signature’s reference and take the values from that same node, through one selection path used for both verification and import. Two paths is how the gap opens. Read each value with its unit and uncertainty from the same quantity element.
  • Keep the evidence. Store the original file, its hash, the signature result and the source node for each imported value, so that "where did this as-found come from?" has an answer at audit.

Be clear about what the signature does not prove. A valid signature establishes integrity and signer identity. It does not establish that the measurement was correct, that the laboratory’s accreditation covered it, or that the traceability chain to a national metrology institute is sound. ISO/IEC 17025 clause 6.5 is where metrological traceability is defined and assessed. Those are judgements for the quality function, and the record should keep them separate from the signature result.

A coordinate measuring machine stylus touching a machined part on a granite table, the measurement a certificate describes

Where PrüfDesk fits, and where it stops

PrüfDesk is the system of record for the equipment, its calibration status and the evidence behind each entry. It is not a calibration laboratory. It does not perform the physical calibration, and it does not assign metrological traceability. Its role begins when the certificate arrives.

When a DCC is ingested, the instrument’s calibration record is populated from the file: the as-found and as-left values with their units, the calibration date, and the certificate attached to that event. Three things follow:

  • Re-keying leaves the path. The transcription step that introduces errors is gone for those fields, because nothing is typed from a PDF.
  • History stays queryable. As-found values remain structured across the instrument’s life, so "every instrument with an out-of-tolerance as-found in the last twelve months" is a query, not a folder search.
  • The next due date follows from the event. It is calculated from the calibration date and the interval your procedure defines. The overdue status it produces is what a hard or soft block enforces, as configured per tenant.

The binding in point three of the import requirements is the part to test rather than assume, in any import tool, PrüfDesk’s included. The next section shows how.

Test the binding on your own files

You can check the binding without relying on any vendor’s description. Work on a copy, never on the supplier’s original.

A click torque wrench in side profile on a matte bench, with a closed laptop softly out of focus behind it

  1. Insert an unsigned node ahead of the signed one. In the copy, add an unsigned measurementResult with a different as-found value, placed before the signed node. Where the signature references the signed node by its identifier, the copy still verifies after this change, which is exactly what makes the test meaningful. Run verification, then import, and check two things: whether the verifier reports the signed node it verified, and which as-found value reaches the record.
  2. Duplicate the signed node. In a second copy, repeat the signed node with the same identifier. A correct importer rejects the file as ambiguous rather than picking one of the two.
  3. Alter a signed value. Change one digit inside the signed node. Verification must fail. Changing a signed byte breaks the digest, and an import that still records the value has ignored the signature entirely.

Record the outcome. A pass is one line in your validation procedure. A fail means the import is not yet a verified import, whichever system produced it.

Objections worth taking seriously

"Our supplier’s software is trusted, so the signature is a formality." The signature is useful, but the failure in the worked example happens after cryptographic verification has passed, in the code that reads the document. Trust in the sender does not protect a bad read.

"We check the PDF rendering." The rendering is a human view of the document. It is not the data that drives due dates and tolerance decisions. Two views can disagree, and the binding check, not the picture, is what protects the record.

"A valid signature means the calibration is good." It means the document is what the signer produced and has not changed since. The correctness of the measurement, the scope of accreditation and the traceability chain are separate questions, and the record should not blur them.

Next step

If supplier DCCs reach you this quarter, run the three tests above on one copy and note which as-found value your import records. If you would like to see a supplier certificate populate an instrument’s calibration record in PrüfDesk, ask the team for a walkthrough using one of your own files, and include the binding test in it.