Technical Documentation
How Sealva verifies seals, where its certificates and document profiles come from, and the formats it reads and writes.
Contents
- Verification
- Verification results
- Certificates and trust anchors
- Profiles of administrative documents
- Custom certificate sets
- Export format (.sealva)
1. Verification
Sealva reads seals according to ICAO 9303-13 (VDS), the ICAO Datastructure for Barcode (IDB), BSI TR-03137-1 and BSI TR-03171. Parsing and decoding is done by the open source library VdsTools. The signature is always verified on the device. Sealva verifies the signature and the certificate path of the signer, not the document itself.
An IDB seal whose barcode flag marks it as unsigned is reported as not signed and is not verified. All other seals are verified in one of two ways, depending on the document type.
Sovereign documents (ICAO VDS, ICAO IDB, BSI TR-03137-1)
- The signer certificate is looked up in the active certificate set: for a VDS by the signer identifier (country code and common name) and the certificate reference (serial number) from the seal header, for an IDB seal by the signer certificate reference of its signature.
-
For a VDS with a machine readable zone (MRZ): if the signer certificate carries the
DocumentType extension (ICAO 9303-12, 7.1.1.6), the document type of the MRZ must be listed
in it. A single letter allows all types starting with it. IDB seals are exempt, since the
German IDB signers list their own types (
DA,DB,NA, BSI TR-03137-1) instead of those of the MRZ. - The path from the signer certificate to a CA certificate of the same set is built. Sealva links a signer certificate to its CA on import, after verifying the CA's signature over it. The path is trusted if the signer certificate is linked to a CA of the set.
- No certificate of the path may be revoked. Revoked certificates come with the certificate set (see custom certificate sets); Sealva does not fetch CRLs itself.
- Every certificate of the path must be valid at the time of the verification (shell model, ICAO 9303-12 Appendix D, ICAO 9303-13 Appendix D). A document signer certificate is valid for the period its key is used plus the longest validity of the documents it signs, so an expired signer certificate means the document has expired.
- The seal signature is verified with the public key of the signer certificate (ECDSA, including Brainpool curves).
The structure of the seal is checked against its document type. A missing mandatory field, a value that cannot be read or a wrong length counts as a faulty structure (WRONG_FORMAT in ICAO 9303-13 Appendix D).
Administrative documents (BSI TR-03171)
Administrative documents are verified independently of the active certificate set.
-
The signer certificate is identified by the SHA-1 certificate reference in the seal header.
Sealva looks it up in its local cache, which mirrors the certificate bundle of the Sealva
backend. If it is not there and the seal carries a
certificateURI(TR-03171 version 0.9 only), Sealva requests it from the backend, which loads it from that address. The app checks that the SHA-1 of the delivered certificate matches the reference. -
The path from the signer to a trust anchor is validated at the current time.
The path always has exactly two steps: signer → anchor. The anchor must have the
signer's issuer DN as its subject DN, match the authority key identifier if both carry one,
have signed the signer certificate, be a CA (
basicConstraints cA), not be blocked and be valid now. The signer'skeyUsage, if present, must allowdigitalSignatureornonRepudiation, and the signer must be valid now. - The seal signature is verified with the public key of the signer certificate.
-
With a valid path, the result names the organization of the signer
(
OandorganizationIdentifierfrom its subject). Sealva does not decide who may issue administrative documents. Users have to judge whether the organization is the expected issuer. - The dates of the seal are checked for plausibility: the signature date must lie within the validity of the signer certificate, and the issuing date must not lie after the signature date. Both dates are signed by the signer itself, so they can only turn a valid result into a notice, never improve a result.
-
If the seal states a validity of the document (
VALID_FROMandVALID_TOin version 0.9,VALIDITY_DATESin version 0.8), it is shown with the data. A verification outside this period is reported as a notice (BSI TR-03171, chapter 5). - The profile of the document defines its structure. Deviations count as a faulty structure, as for sovereign documents.
2. Verification results
- Signature valid
- The signature is correct and the signer certificate leads to a trusted CA or trust anchor.
- Signature valid, with notice
- Administrative documents: as above, but the dates of the seal are implausible or the document is checked outside its validity.
- Certificate expired
- The signature is correct, but the signer certificate or the certificate of its CA or trust anchor has expired. The data of the seal are shown as not confirmed.
- Certificate not yet valid
- As above, but a certificate of the path is only valid from a later date. ICAO 9303-13 Appendix D reports both cases as EXPIRED_CERTIFICATE; Sealva names them separately.
- Faulty structure
- The signature is correct, but the seal is not structured as its specification requires. The data are shown as not confirmed.
- Trust anchor unknown
- The signature is correct, but no trusted CA or trust anchor issued the signer certificate.
- Document type not allowed
- Sovereign documents (VDS only): the DocumentType extension of the signer certificate does not allow the document type of the MRZ.
- Signature invalid
- The signature does not match the signed data.
- Certificate not available
- The signer certificate is neither in the active certificate set nor available for the administrative document.
- Certificate currently unavailable
- Administrative documents: the signer certificate could not be loaded right now (no network, rate limit, source not reachable).
- Certificate blocked
- The signer certificate or its CA has been revoked (sovereign documents) or the signer certificate or its trust anchor has been blocked (administrative documents).
- Seal is not signed
- An IDB seal without signature, which the standard allows.
If a certificate is not valid, the result names it (signer certificate or issuing CA) and the date it expired or becomes valid. The section “Signature” shows the certificate chain from the CA or trust anchor to the signer, with the validity of each certificate. The shared verification report contains the same chain.
The section “Structure of the seal” lists deviations from the specification. Fields that the document type or profile does not define are shown separately and do not affect the result, since ICAO 9303-13 allows unknown tags.
3. Certificates and trust anchors
- Sovereign documents
- The bundled certificate set contains the German Country Signing CA (CSCA) and the document signer certificates published by the BSI. It is updated periodically in the background. A set is only downloaded again if its CA or DS archive has changed. The Sealva backend fetches the CRL of every CA in the set every 24 hours and checks its signature against the CA. It takes revoked certificates out of the set and lists them separately, so that the app reports their seals as blocked. The app reads this list on every update and does not contact the CRL addresses itself.
- Administrative documents
- The trust anchors are the issuing CAs of qualified electronic seals from the German trusted list of the Bundesnetzagentur, which is referenced by the EU list of trusted lists (LOTL). Only services with the status “granted” are taken. The anchors are curated in the Sealva backend and reach the app only through its certificate bundle, never through the request for a single certificate. The bundle also carries the known signer certificates and lists of blocked certificates and blocked anchors. A copy of the bundle is included in the app, so verification works before the first synchronization.
4. Profiles of administrative documents
BSI TR-03171 seals reference a document profile by its UUID. The profile defines the fields of the document and is needed to decode the content. Sealva handles profiles as follows:
-
Profiles are identified by UUID, source (the
profileURIof the seal, TR-03171 version 0.9 only) and TR version. A profile of another source or another TR version is never used. - Sealva mirrors the profile bundle of the Sealva backend and updates it periodically in the background. A copy is included in the app.
- If a profile is missing, Sealva requests it from the backend, which loads it from the address in the seal, provided the issuer publishes it there.
- Without a profile, the signature can still be verified. On request, Sealva shows the fields with values guessed from their bytes and marks them as guessed.
Requests to the backend only contain the profile UUID or the certificate's SHA-1, the source address from the seal and the TR version, never personal data from the document. See the privacy policy for details.
5. Custom certificate sets
For sovereign documents, custom certificate sets, for example from a test PKI, can be added by scanning a QR code in the certificate settings of the app. The QR code contains a JSON object that tells the app where to download the certificates. After the user confirms it, a scanned set becomes the active set. If the import fails, the previously active set remains active. Certificate sets have no effect on administrative documents.
Seals are verified with the same rules against every set. A result verified with a set other than the bundled one, which the Sealva backend curates, names that set below the result, next to the collapsed result and in the verification report. The scanner page shows it while it is active.
QR Code JSON Format
The QR code must contain a JSON object with the following structure:
Fields
-
certUrl -
The complete URL to the keystore collection endpoint
Format:https://backend.server.example/certSet -
certSetName - The name of the Certificate Set (string)
-
certSetId - The unique ID of the Certificate Set (UUID) for internal reference purpose
Example
{
"certUrl": "https://backend.server.example/certSet",
"certSetName": "My Certificate Set",
"certSetId": "550e8400-e29b-41d4-a716-446655440000"
}
Certificate Collection Response
When the Sealva app calls the certUrl,
the server must respond with a JSON object containing
references to the actual certificate keystores.
Response Structure
-
ca - Certificate Authority keystore object
-
ds - Document Signer keystore object
-
sksInfoVersion - Version of the SKS Info structure (always 2)
-
lastPublished - Timestamp of last publication (Unix timestamp in milliseconds)
-
revoked -
Optional. Revoked signer and CA certificates, each as an object with
sha1(SHA-1 of the DER encoded certificate, hex) andpem(the certificate). An entry whose PEM contains no certificate with that SHA-1 is skipped. -
crls -
Optional. The CRLs the provider checked the set against, each with
issuer(DN),thisUpdateandnextUpdate(Unix timestamps in milliseconds). If the oldest CRL is past itsnextUpdate, the app says so in its settings under “Verification data”.
The provider of a set is responsible for revocation. It should check the CRLs of its CAs at
least every 24 hours (BSI TR-03137-1, 6.6) and take revoked certificates out of the archives.
Listing them in revoked as well lets Sealva report a seal of a revoked signer as
blocked instead of as signed by an unknown certificate. A seal whose signer or CA is listed in
revoked is reported as blocked, also if the certificate is still in the archives.
Keystore Object Structure
Both ca and ds objects have the
following fields:
-
format - For Sealva, only "zip" is supported
-
url -
Download URL for the ZIP file containing the certificates
(string). The ZIP file contains one DER-encoded certificate per
file with the extension
.ceror.crt: the CA certificates in thecaarchive, the document signer certificates in thedsarchive. -
lastupdate - Timestamp of last update (Unix timestamp in milliseconds). Sealva downloads an archive again only if this value has changed.
Example Response
{
"ca": {
"format": "zip",
"url": "https://backend.server.example/certSet/certSetId/ca.zip",
"lastupdate": 1704297600000
},
"ds": {
"format": "zip",
"url": "https://backend.server.example/certSet/certSetId/ds.zip",
"lastupdate": 1704297600000
},
"sksInfoVersion": 2,
"lastPublished": 1704297600000,
"revoked": [
{
"sha1": "3f2a…",
"pem": "-----BEGIN CERTIFICATE-----\nMIIC…\n-----END CERTIFICATE-----"
}
],
"crls": [
{
"issuer": "C=DE,O=bund,OU=bsi,CN=csca-germany",
"thisUpdate": 1704297600000,
"nextUpdate": 1712073600000
}
]
}
Import Process
- User scans the QR code in Sealva Mobile App
-
App parses the JSON to extract
certUrl,certSetName, andcertSetId -
App calls the
certUrlendpoint - Server responds with the certificate collection JSON
-
App downloads the ZIP files from
ca.urlandds.url - Certificates are imported and ready for VDS validation
The app accepts only "format": "zip" for both archives and
"sksInfoVersion": 2. Other values are rejected when the QR code
is scanned.
6. Export format (.sealva)
Seals from the history can be exported as a file and imported into Sealva again. The file has
the extension .sealva and the MIME type
application/vnd.sealva.export+json. Its content is JSON in UTF-8.
Example
{
"format": "sealva-export",
"version": 1,
"exportedAt": "2026-11-15T09:30:00+01:00",
"app": "Sealva 3.0.0",
"vdstools": "0.23.0",
"seals": [
{
"scannedAt": "2026-11-15T09:12:00+01:00",
"source": "camera",
"raw": "dc036abc…",
"rawEncoding": "hex",
"decoded": {
"documentType": "RESIDENCE_PERMIT",
"messages": [
{ "tag": 2, "name": "MRZ", "kind": "MRZ", "value": "…" }
]
}
}
]
}
Fields of a seal
scannedAt- Time of the scan, ISO 8601 with offset, in whole seconds
sourcecameraorfile(photo or PDF)raw- The content of the barcode, encoded as given in
rawEncoding rawEncoding-
hexfor VDS seals (and for content that could not be read),textfor IDB seals as scanned (RDB1…) decoded-
The fields as decoded by VdsTools in the version given in
vdstools, with the profiles available on the exporting device. ContainsdocumentType,messages(nested like the seal, each withtag,nameand eitherkindandvalueor sub-messages) and, for administrative documents,profileandmetadata. Binary values such as the facial image are Base64 encoded.
Only scannedAt, source, raw and
rawEncoding form the contract. The import reads only these fields and verifies
the seal again. decoded is for reading and further processing and may change with
new versions of VdsTools. The file contains no verification result, since it depends on the
certificates and the time of the verification. version only increases with
incompatible changes to the contract, readers should ignore unknown fields.