XMLDSig debugging utility

XML Signature Digest & Canonicalization Inspector

Validate supported Reference digests and SignatureValue, inspect canonicalized SignedInfo and digest bytes, review KeyInfo, and see exactly which XML content a signature covers.

Security reminder. Do not paste real patient data, credentials, private keys, production identifiers, or confidential signed messages. Use synthetic or properly de-identified test XML only.

XML Signature debugger

Paste signed XML or a SOAP envelope

The tool validates supported same-document Reference digests, canonicalizes SignedInfo, and verifies supported RSA SignatureValue algorithms using public key material resolved from KeyInfo. It is a practical debugging aid, not a certified XML Signature or certificate-trust validator.

The XML stays in your browser and is not saved by this tool.

No signature loadedPaste signed XML and click Inspect signature.

Supported in this version

Reference and SignatureValue debugging

Reference targets

Empty-document URIs and short same-document #ID references resolved from common ID-style attributes, including namespaced Id attributes such as wsu:Id.

Canonicalization

Canonical XML 1.0, Canonical XML 1.1, and Exclusive XML Canonicalization 1.0, including comments variants and Exclusive C14N InclusiveNamespaces PrefixList.

Digest methods

SHA-1, SHA-256, SHA-384, and SHA-512 through the browser Web Crypto API.

Signature methods

RSA-SHA1, RSA-SHA256, RSA-SHA384, and RSA-SHA512 using PKCS#1 v1.5 verification.

KeyInfo

ds:X509Certificate, ds:RSAKeyValue, and WS-Security SecurityTokenReference values that resolve to an X.509 BinarySecurityToken.

Deliberate limits

No private keys, certificate trust validation, revocation checks, external URI fetching, XPointer, XPath, XSLT, DSA, ECDSA, HMAC, or unsupported transforms. Unsupported processing is reported instead of guessed.

FAQ

XML Signature inspector questions

What does core validation show?

The tool separates Reference digest validation from cryptographic SignatureValue verification. A supported signature is marked valid only when all supported References match and SignatureValue verifies with supported public key material resolved from KeyInfo.

Why show canonicalized SignedInfo?

SignatureValue is calculated over the canonical form of SignedInfo. The SignedInfo view and byte preview expose the exact supported UTF-8 input passed to RSA verification.

What does “What is signed?” mean?

The tool lists the resolved Reference targets and their exact document paths. It also checks whether common SOAP Body, WS-Security Timestamp, and WS-Addressing Action, To, or MessageID elements are inside a resolved referenced node. Coverage is an inspection aid, not an application-specific security-policy verdict.

What are duplicate ID warnings?

Duplicate ID-style values make short same-document Reference resolution ambiguous and can be relevant to XML signature wrapping or substitution problems. The tool refuses to guess a target and shows every matching path.

Does a valid SignatureValue mean I trust the signer?

No. It only means the cryptographic SignatureValue verifies with a supported public key found in KeyInfo. The tool does not validate certificate trust chains, revocation, or signer identity.

Does O'BRIEN differ from O'BRIEN?

After XML parsing, O'BRIEN and a literal apostrophe represent the same text value. Literal ' represents different character data and remains visibly escaped in canonical XML. The diagnostics highlight suspicious double-escaped entity text in the raw XML.

Can I paste real healthcare messages?

No. Use synthetic or appropriately de-identified test data only.

Practical guide

Trace XML signature verification in the same order as the verifier

XML Digital Signature verification has two related checks. Each Reference digest proves that selected XML content produced the expected hash after its declared transforms. The SignatureValue then proves that canonicalized SignedInfo was signed by the private key corresponding to the verification key.

Reference digest sequence

  1. Read the Reference URI and locate the target element by its ID.
  2. Apply the declared transforms in order, including enveloped-signature removal where applicable.
  3. Canonicalize the transformed XML with the declared canonicalization algorithm.
  4. Hash the canonical bytes using the DigestMethod.
  5. Base64-encode the result and compare it with DigestValue.

SignatureValue sequence

  1. Canonicalize the complete SignedInfo element using its CanonicalizationMethod.
  2. Use the SignatureMethod to determine the digest and public-key verification algorithm.
  3. Resolve the verification key from supported KeyInfo material or the selected certificate.
  4. Verify the decoded SignatureValue over the canonical SignedInfo bytes.

Worked example

Why visually identical XML can produce a different digest

<name>O&apos;BRIEN</name>
<name>O'BRIEN</name>

These strings do not necessarily represent the same parsed character data. In the first, &amp;apos; can result in the literal text &apos; after one parsing layer; in the second, the character is an apostrophe. If the signed node is constructed, escaped, serialized, or parsed differently before hashing, the canonical bytes and digest will differ.

Similar failures arise from namespace context, omitted versus explicit attributes, whitespace in mixed content, line-ending normalization, inclusive namespace prefix lists, changed ID targets, or modifying a signed node after the digest was calculated.

Read the full XML Signature digest mismatch guide for a complete diagnostic sequence and worked canonicalization examples.

Troubleshooting

Use the failing stage to narrow the investigation

Digest mismatch

  • Confirm the Reference URI resolves to exactly one intended element.
  • Check for duplicate IDs, namespace changes, unsupported transforms, and altered signed content.
  • Compare the displayed canonicalized target with the bytes used by the signing implementation.
  • Verify the digest algorithm and Base64 value without introducing text encoding conversions.

SignatureValue failure and limitations

  • If every Reference digest passes but SignatureValue fails, focus on SignedInfo canonicalization, the signature algorithm, and the verification key.
  • A valid cryptographic signature does not prove the certificate is trusted, current, authorised, or appropriate for the transaction.
  • The tool supports practical XMLDSig cases but not every transform, key representation, external reference, algorithm, or policy framework.
  • Do not paste private keys, credentials, or real patient documents.

Authorship and review

Practical guidance backed by integration experience

Maintained and technically reviewed by Health Data Tools, drawing on more than 15 years of healthcare integration experience across HL7, FHIR, CDA, APIs, PKI, and clinical integration systems.

Technically reviewed: