Skip to content
KSA-15

Cryptographic stamp

An ECDSA digital signature over the document hash, in XAdES form, proving the document came from a registered device unaltered.

The controls define the cryptographic stamp as a technical digital signature over the document hash. In XML it is an enveloped XAdES signature inside UBLExtensions, with a cac:Signature element carrying the fixed values BR-KSA-28, BR-KSA-29 and BR-KSA-30 require.

A simplified document is stamped by the seller's device with its key and certificate (CSID) before it is handed over, and BR-KSA-60 makes the stamp mandatory there. A standard document is stamped by ZATCA's platform at clearance; the seller may add its own stamp as well.

The stamp covers the whole document except the QR block. It holds the signature and two references, the document hash and the hash of the signed properties (signing time, certificate digest, issuer and serial number), plus the certificate itself.

IdentifierKSA-15
Path in the document/Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/sig:UBLDocumentSignatures (with /Invoice/cac:Signature)
Cardinality0..1
Data typeComplex (XAdES signature)
Applies toStandard tax invoice and Simplified tax invoice

In JooDax

Built

Every simplified document is stamped with a secp256k1 key; ZATCA's validator accepted the signature (HTTP 200) in the proof phase. The programs write the form ZATCA accepts in practice: version-1 SigningCertificate and the signing certificate only, whereas the Security standard's table lists SigningCertificateV2, the full certificate chain and other properties the programs do not write.

crates/jdx-einvoice-sa/src/xml.rs

Applies to

Tax invoiceDebit noteCredit noteSimplifiedSimplified debitSimplified credit
MandatoryMandatoryMandatoryMandatoryMandatoryMandatory

Rules that check it

  • BR-KSA-28 · The signature information ID in the stamp must be urn:oasis:names:specification:ubl:signature:1.
  • BR-KSA-29 · The referenced signature ID and signature ID must be urn:oasis:names:specification:ubl:signature:Invoice.
  • BR-KSA-30 · The signature method must be urn:oasis:names:specification:ubl:dsig:enveloped:xades.
  • BR-KSA-60 · The cryptographic stamp is mandatory on simplified documents and their notes.

Related fields

Fields — E-invoicing in Saudi Arabia (FATOORA)

Sources

  1. Security Features Implementation Standards to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
  2. Electronic Invoice XML Implementation Standard to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
  3. Electronic Invoice Data Dictionary to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
  4. الضوابط والمتطلبات والمواصفات الفنية والقواعد الإجرائية اللازمة لتنفيذ أحكام لائحة الفوترة الإلكترونية (قرار المحافظ رقم 62738 وتاريخ 1443/11/23هـ) (vfile dated 20230519 (decision 62738)) — ZATCA
  5. E-invoicing Detailed Technical Guidelines (vVersion 2) — ZATCA

Checked on: 4 November 2026. What concerns JooDax is taken from the programs’ own code.