Skip to content

Fortified IDDocs

XAdES signatures

Prepare detached XML/BES inputs, add XAdES time and validation evidence, and preserve archival signatures through renewal.

XAdES represents a signature and its validation evidence in XML. The support service keeps the exact original bytes, prepares the signed input, validates the result and assembles the selected Baseline level. Signing Server controls the authorized private signing operation; later augmentation and archival renewal belong to the consumer.

Select the signing binding and completed level

Section titled “Select the signing binding and completed level”

Use the standard DSS task collection with all three values together:

Property Value
SigType XML
AdESType BES
ProcessingRules urn:se:idombud:signing:xades:detached-b-b-sha256-rsa:v1

The same binding supplies the original signature for B-B, B-T, B-LT and B-LTA. The request has no Baseline-level field, and the server does not select a minimum or maximum level per requester. Your support service chooses the required completed level and verifies that the final artifact reaches it. Signature levels and dependencies explains when each level is useful and which external services it needs.

The actual static signing-leaf certificate must be known before preparation. Obtain it through trusted installation configuration; a requester-supplied certificate cannot select a private key. Higher levels do not enable fresh dynamic person certificates. Generic XML and the separate JAdES binding keep their own contracts.

Keep the exact original outside the signing request. Hash its octets without decoding, normalization or XML transformations. Prepare one canonical SignedInfo with RSA-SHA256 and exclusive canonicalization without comments or parameters. It references one bounded opaque original URN with no transforms, and the matching SignedProperties with one exclusive-canonicalization transform. The server never fetches the original or follows its URI.

The complete immutable ds:Object contains QualifyingProperties targeting the signature ID and signed properties with SigningTime, SigningCertificateV2 and the matching original DataObjectFormat/MimeType. Bind SHA-256 of the complete actual signing-leaf DER before exact-input consent. SigningTime is an untrusted claimed time, not independent proof of signing time. Current certificate validity remains required for new signing.

Freeze the canonical SignedInfo and complete object. Each is at most 8,192 decoded bytes; the shared eight-task, 65,536-byte XML and 131,072-byte encoded-form limits still apply. Server signing inputs reject unsigned properties. Follow Document signing for envelope signing, identification, explicit approval and response validation.

Match the returned ordered task IDs, XML/BES/rule, exact SignedInfo, complete object, signature ID and actual leaf against the retained preparation. Insert the returned raw signature and public certificate into the retained skeleton. Independently validate the exact original reference, signed properties, certificate binding, algorithms and canonicalization context. Raw RSA verification alone is insufficient. Your application owns certificate trust, MIME accuracy and association between the signing message and the original business action.

Obtain an RFC 3161 timestamp with RFC 5816 certificate binding over SHA-256 of the canonical complete ds:SignatureValue element. This includes its markup and namespace context; raw RSA bytes and bare Base64 text are different inputs.

Place exactly one v1.3.2 SignatureTimeStamp under the single QualifyingProperties/UnsignedProperties/UnsignedSignatureProperties, with explicit exclusive CanonicalizationMethod and one encapsulated token. Validate its imprint, signature, configured TSA chain, policy, nonce and generation time. Correlate the exact request, derived transaction, requester, profile, provider, kind, imprint, chain and time. The initial timestamp must precede the original signing certificate's expiry or revocation. The initial B-T consumer also conservatively checks that signer certificate at current use; later history is validated with protected proof-of-existence time.

An altered, untrusted, mismatched or unavailable timestamp fails the requested level. Preserve the prior valid B-B artifact; do not silently report B-T or perform another private document signature.

Obtain the signer and TSA certificate paths and their complete certificate revocation lists (CRLs) under independently configured roots. Validate issuer signatures, applicability, freshness and certificate status. This bounded consumer supports complete CRLs; OCSP, delta CRLs and indirect CRLs are outside its selected representation.

Append v1.4.1 AnyValidationData, without URI, containing v1.3.2 CertificateValues and/or RevocationValues. At least one collection is nonempty. This direct container carries all required signature-supporting evidence, including TSA paths; do not use top-level signer-only containers for TSA-only evidence. Do not add known identical values again or discard historical material still needed for validation.

Retrieval follows bounded administrator-controlled HTTPS locations and transport trust. A document or caller cannot choose a URL, redirect or trust anchor. Reject missing, stale, revoked, forged, wrong-issuer and inconsistent evidence. Independently validate the completed LT level with network retrieval disabled; embedded certificates alone cannot establish trust.

Create and renew archival protection: B-LTA

Section titled “Create and renew archival protection: B-LTA”

Validate the complete prior LT/LTA history before renewal. Add any missing supporting evidence before constructing the archive imprint. Append one v1.4.1 ArchiveTimeStamp with explicit exclusive canonicalization and one token, keeping all unsigned properties under the same parent.

The archive input concatenates, without separators, the exact original and transformed signed-properties bytes in reference order, then canonical SignedInfo, SignatureValue and KeyInfo, then each preceding unsigned property canonicalized individually in document order. The new archive element is excluded. Earlier archives are checked against only the properties that precede them. Adjacent AnyValidationData blocks may add fresh initial-archive or renewal material; all blocks share the same aggregate limits. A completed LTA artifact ends with an archive timestamp, not unprotected trailing validation material.

Preserve the exact signed canonical bytes and every earlier unsigned property's canonical bytes and namespace context. Do not introduce a manifest, RenewedDigestsV2, extra object, countersignature or other property. XML reserialization or embedding can change canonical bytes even when the XML appears equivalent.

Historical signer/TSA expiry is evaluated with protected proof-of-existence time and complete evidence, not a blanket expiry bypass. A new timestamp cannot repair already invalid or missing history. Renewal uses a currently accepted TSA and never needs the original document-signing key or an additional human-signing ceremony.

Assign an owner to retain the exact original, signature artifacts, old chains, CRLs, tokens, configured trust and validation reports. Monitor protection and renew before evidence or algorithms become insufficient. Select the schedule from the retention and receiving process; no universal interval or hosted archival service is supplied.

Consumer item Maximum
Nonempty original 16,777,216 bytes (16 MiB)
Signature XML 8,388,608 bytes (8 MiB)
XML structure Depth 32 and 8,192 nodes, bounded before DOM construction
Raw RSA signature 32,768 bytes, with exact length equal to the actual RSA modulus byte length
Unsigned properties overall 18, including the one signature timestamp, every validation-data block and all archives
Timestamps One signature timestamp and eight archive timestamps
Each token 65,536 bytes
Embedded certificates 32 overall, at most 32,768 bytes each
Embedded CRLs 32 overall, at most 262,144 bytes each
Configured roots / each configured chain Four / four certificates
Preparation/archive draft Default and maximum 300 seconds, shortened by certificate/status validity
Independent validation receipt / process 30 seconds / 45-second timeout

The total XML limit also constrains the individual maxima. The raw-signature limit does not add an RSA 4096-bit maximum; the existing minimum is 2048 bits and the signature must exactly match the actual modulus byte length. Reject DTDs, entities, XInclude, comments, processing instructions, wrapping, duplicate or ambiguous IDs, wrong targets/parents, namespace/context substitution, external references and unsupported attributes or transforms. Schema retrieval is offline; no runtime network loader is enabled.

Keep the prior artifact unchanged until full completion succeeds. Wrong state, expiry, renewal order, token coverage, evidence or response correlation fails closed. An unknown or interrupted consumed timestamp request stays consumed across restart. Reconcile the business outcome rather than automatically submitting a fresh ID or re-signing the document. Do not publish partial output or label a lower level as successful completion.

Use a separate pinned complete-profile validator with the retained original and independently configured CA roots for LT/LTA. Require the exact requested level and complete timestamp/history checks with network retrieval disabled. Keep its raw reports; a successful XML signature check is not a complete XAdES level result. The source-checkout helper preserves four-argument synthetic-leaf B-B validation; its six-argument B-T mode uses explicitly trusted dedicated TSA leaves. Those synthetic test policies do not establish production PKIX trust. LT/LTA requires the seven-argument CA-roots-only mode, optionally an eighth validation instant, and complete historical validation.

The downloadable XAdES preparation and lifecycle guide, OpenAPI and XML contract map describe the same binding. Run the reference consumer commands from an integration source checkout, separately from the installed Signing Server process. Synthetic task-only preparation shapes are available as XML and JSON. They contain placeholders and require a fresh preparation and complete signed envelope; they are not captured exchanges or proof of a completed level. Use the signed response and complete-profile validation result to confirm the requested level. Baseline levels describe technical signature evidence; certificate trust, legal category and the receiving organization's acceptance policy are separate requirements.