Verifying the qualified electronic time stamp of a StampR certificate
Instructions for court-appointed experts and independent verifiers
1. What verification establishes
Verification establishes, independently of StampR, whether a specific file (or its SHA-256 hash) existed unchanged at the time indicated in the qualified electronic time stamp of BORICA AD (B-Trust). The court-appointed expert uses only the publicly available OpenSSL software and B-Trust's public certificates. Access to StampR's systems is not required.
Successful verification allows the following conclusions:
- the time stamp was issued and signed by the qualified trust service provider BORICA AD;
- the time stamp was issued for this exact SHA-256 hash;
- the hash, and thus the file from which it was calculated, existed no later than the time indicated in the time stamp (UTC, accuracy ±0.5 seconds);
- if the original file is available: not a single byte of the file has changed since that time.
Verification alone does not establish:
- who authored the work. The declaration of authorship and the holder's details form part of the StampR certificate; they are locked upon issuance and cannot subsequently be changed, including by StampR. Confirmation from the register may be requested from StampR (Web Trade EOOD);
- whether the file also existed earlier. The time stamp proves the latest time of existence, not the first.
Under Article 41(2) of Regulation (EU) No 910/2014 (eIDAS), a qualified electronic time stamp benefits from a presumption of the accuracy of the date and time and the integrity of the data to which it is bound.
2. What you need and which case applies to you
The decisive element is the time stamp file (Time-Stamp Token, a .tsr file, RFC 3161). The hash, identifier and date in the certificate are merely an assertion on their own; only the token provides cryptographic proof of them. The token is embedded in the electronic PDF certificate (section 3).
Data in the certificate and where to find them in the token:
| Field in the StampR certificate | Example | Field in the token (OpenSSL output) |
|---|---|---|
| Cryptographic hash (SHA-256) | 64 hexadecimal characters | Message data (the same characters, in pairs, separated by spaces) |
| Timestamp identifier | 0x03A3XXXXXXXX | Serial number |
| Trusted time | 2026-09-30 11:59:07 (Bulgarian time) | Time stamp – always in UTC (GMT), see section 5 |
| Certificate number | SR-XXXXXXXXXXXX | none – this is an internal StampR number |
Select the case according to what you have:
| You have | Case | What can be established |
|---|---|---|
Electronic PDF certificate (or a .tsr file) + the original file | A | Full verification: this file existed unchanged at the time of the time stamp |
Electronic PDF certificate (or a .tsr file), without the original file | B | The hash existed at the time of the time stamp; linking it to a specific file requires that file |
| Only a hash, identifier and date (paper copy, scanned document, transcribed data) | C | Preliminary lookup only; the token is needed, followed by A or B |
Verification after expiry of the BORICA certificate used to sign the time stamp, or the error certificate has expired | D | As in A or B, verified as at the time of issuance + revocation status |
Software: OpenSSL 3.x. Check the version with openssl version; it must start with “OpenSSL 3.”. To extract the token from a PDF, use Adobe Acrobat Reader or pdfdetach (poppler-utils package).
- Linux: OpenSSL is included.
- macOS: the included LibreSSL is not suitable. Install OpenSSL 3 and put it first in PATH in the terminal you will use:
brew install openssl@3, thenexport PATH="$(brew --prefix openssl@3)/bin:$PATH". - Windows: install Git for Windows and run the commands in Git Bash – they are the same as for Linux. In PowerShell and cmd, write commands on a single line without
\, replacegrepwithSelect-String, and OpenSSL must be in PATH (with a standard installation:C:\Program Files\Git\usr\bin).
3. Preparation
Before verification, prepare three files in one folder: the token token.tsr and the two B-Trust certificates. Run all commands below from this folder.
3.1. Extracting the token from the PDF certificate
The electronic PDF certificate contains an attachment named <identifier>.tsr (e.g. 0x03A3XXXXXXXX.tsr). This is BORICA's original response, preserved unchanged.
- Adobe Acrobat Reader: the “Attachments” panel (thumbtack icon), or double-click the thumbtack icon at the bottom of the page → “Save”.
- Linux / macOS / Windows with poppler-utils:
pdfdetach -list certificate.pdf
pdfdetach -saveall certificate.pdf
The file may be listed twice – it is the same token. For convenience, rename it to token.tsr.
A printed certificate, scanned copy or PDF saved again using “Print to PDF” does not contain the token. In that situation, the case is C.
3.2. B-Trust certificates
Download the two certificates directly from BORICA's official repository, not from StampR:
| File | Role | Address |
|---|---|---|
B-TrustRootQCA.cer | Trusted root (trust anchor), supplied with -CAfile | ca.b-trust.org/repository/B-TrustRootQCA.cer |
B-TrustOperationalQCA.cer | Intermediate (operational) certificate, supplied with -untrusted | ca.b-trust.org/repository/B-TrustOperationalQCA.cer |
curl -O https://ca.b-trust.org/repository/B-TrustRootQCA.cer
curl -O https://ca.b-trust.org/repository/B-TrustOperationalQCA.cer
openssl x509 -in B-TrustRootQCA.cer -noout -subject -dates -fingerprint -sha256
Expected result for the root (checked on 16.11.2026): CN = B-Trust Root Qualified CA, valid until 25.04.2037, SHA-256 fingerprint D3:38:95:E1:D5:11:23:F9:48:C8:C9:99:F7:F7:26:40:FA:05:05:FB:D1:5A:B0:93:E8:98:DB:27:DD:29:14:E8. A different fingerprint means that the file is not B-Trust's original root; stop verification.
In PowerShell, download using Invoke-WebRequest <url> -OutFile <file>; in Git Bash, the commands are the same as above.
3.3. Automatic verification (optional)
The checks in sections 4–6 can be run together using the script stampr-verify.sh (version 1.0.1). It uses only OpenSSL and the official addresses of BORICA and the Bulgarian Communications Regulation Commission (CRC), and does not connect to StampR. The script is readable text and can be reviewed before execution.
Requirements: bash, OpenSSL 3.x and curl; to work directly with a PDF, also pdfdetach. On Windows, run the script in Git Bash. On macOS, the script automatically locates OpenSSL 3 installed with Homebrew.
-
Download the script and check its checksum:
curl -O https://stampr.eu/tools/stampr-verify.sh sha256sum stampr-verify.sh # Linux, Git Bash shasum -a 256 stampr-verify.sh # macOSExpected result for version 1.0.1:
105e79116470806b04f53ff4597e6fe7389377ee2c6f82234c591d36ec128d28. If the value differs, do not use the file. -
Start verification using the data you have:
# PDF certificate + original file, with serial number and time from the certificate bash stampr-verify.sh --pdf certificate.pdf --file original.docx \ --serial 0x03A3XXXXXXXX --time "2026-03-15 14:22:05" --out report.txt # token.tsr + SHA-256 hash, when the original file is not available bash stampr-verify.sh --tsr token.tsr --hash <hash> --out report.txt--timeis the time printed in the certificate (Bulgarian time). Without internet access or behind a corporate proxy, add--offline --certs-dir <folder>with the two certificates from 3.2; the script does not use a proxy. An archived OCSP response (6.4) is supplied with--ocsp-file ocsp.der. -
Read the result. Exit code 0 means that all core checks passed, 1 means that at least one core check failed, and 2 means incorrect parameters or missing software. The bilingual report (Bulgarian and English)
report.txtcontains the SHA-256 hashes of all input files, the result of each check (PASS, FAIL or WARN), the full OpenSSL output and a conclusion.
A warning (WARN) for check 9 is expected: the script confirms that the BORICA certificate is in the trusted list with status granted, but does not verify the electronic signature of the list itself. Therefore also confirm the status in the European Commission’s official eIDAS Trusted List Browser as described in 6.2. The manual steps in sections 4–6 remain authoritative; the report may be attached to the expert opinion.
4. Verification steps
Each case starts with reading the token (step 0) and ends with a single line Verification: OK or Verification: FAILED. The commands were tested with OpenSSL 3.0 on an actual B-Trust token on 16.11.2026.
Step 0 (all cases). Read the token
openssl ts -reply -in token.tsr -text
Record and compare with the certificate:
Status: Granted.– the time stamp has been issued.Policy OID: 0.4.0.2023.1.1– the ETSI time stamp policy (EN 319 421) under which B-Trust operates.Hash Algorithm: sha256andMessage data– the same hash as in the certificate (the token displays it on two lines of 16 bytes each).Serial number– the same as “Timestamp identifier”.Time stamp– the time in UTC; compare with the date in the certificate according to section 5.TSA: ... CN=B-Trust Qualified Time Stamp Authority– the issuer is BORICA AD.
The lines Nonce: unspecified and Ordering: yes are normal for StampR tokens. Requests are submitted without a nonce, and the request file (.tsq) is not retained. Verification therefore uses -data or -digest rather than -queryfile.
Case A. You have the token and the original file
-
Calculate the file's SHA-256 hash and compare it with the hash in the certificate (uppercase and lowercase letters are equivalent):
sha256sum original_file # Linux shasum -a 256 original_file # macOS certutil -hashfile original_file SHA256 # Windows, cmd Get-FileHash original_file -Algorithm SHA256 # Windows, PowerShell -
Verify the time stamp against the file itself. OpenSSL calculates the hash and verifies the signature and the chain to the B-Trust root:
openssl ts -verify -in token.tsr -data original_file \ -CAfile B-TrustRootQCA.cer -untrusted B-TrustOperationalQCA.cer -
Expected result:
Verification: OK(exit code 0). On Windows, write the command on a single line, without\.
The file must be identical byte for byte. Saving it again, converting it, sending it through chat applications (which compress files) or changing its metadata changes the hash. If the work was certified as an archive (.zip), verify the archive itself, not the extracted contents.
Case B. You have the token but not the original file
Verify the time stamp against the hash in the certificate (64 characters, without spaces):
openssl ts -verify -in token.tsr -digest <certificate_hash> \
-CAfile B-TrustRootQCA.cer -untrusted B-TrustOperationalQCA.cer
Verification: OK proves that BORICA signed this hash at the indicated time. This does not prove which file the hash was calculated from. That requires the file submitted by the party (then Case A applies). If the file was uploaded to StampR, the original may have been retained and may be requested; with a “hash only” certificate, the file never left the holder's device.
Case C. You have only a hash, identifier and date
Cryptographic verification is not possible without the token. Procedure:
- Perform a preliminary lookup in the public register stampr.eu/verify by certificate number, identifier or hash. These are StampR's data, not independent verification.
- Request the electronic PDF certificate or the
.tsrfile from the holder. The holder has it in their email and in their StampR account. - If the holder does not provide it: the court may request the token from Web Trade EOOD (StampR), which retains BORICA's original response for each time stamp.
- With the token obtained, proceed with Case A or B. The token is signed by BORICA, so it does not matter who supplied it: any change to it results in
Verification: FAILED.
Case D. Verification as at the time of issuance
When the BORICA certificate used to sign the time stamp has expired, verification as at the current date produces certificate has expired, even though the time stamp was valid. For tokens from 2025–2026, this will occur after 13.03.2028 (section 6). In that situation, set the verification time manually with -attime (Unix time, seconds since 01.01.1970 UTC), taking it from the token itself.
Linux / macOS (bash):
EPOCH=$(date -u -d "$(openssl ts -reply -in token.tsr -text | sed -n 's/^Time stamp: //p')" +%s)
echo $EPOCH
openssl ts -verify -in token.tsr -digest <certificate_hash> \
-CAfile B-TrustRootQCA.cer -untrusted B-TrustOperationalQCA.cer \
-attime "$EPOCH"
Windows (PowerShell):
$t = (openssl ts -reply -in token.tsr -text | Select-String "^Time stamp: (.+)").Matches[0].Groups[1].Value
$t = ($t -replace '\.\d+','' -replace ' GMT','' -replace '\s+',' ').Trim()
$epoch = [DateTimeOffset]::ParseExact($t, "MMM d HH:mm:ss yyyy", [Globalization.CultureInfo]::InvariantCulture, [Globalization.DateTimeStyles]::AssumeUniversal).ToUnixTimeSeconds()
openssl ts -verify -in token.tsr -digest <certificate_hash> -CAfile B-TrustRootQCA.cer -untrusted B-TrustOperationalQCA.cer -attime $epoch
If you have the original file, replace -digest <hash> with -data original_file. On macOS, date -d is not supported – use gdate instead of date (brew install coreutils) or calculate the value manually. -attime only moves the time for chain verification back into the past. It does not check revocation, so Case D must be supplemented by section 6.
5. Interpreting the result
Verification: OK with exit code 0 means that the signature, the chain to the B-Trust root and the hash have been confirmed. No other information is displayed. View the exit code with echo $? (Linux/macOS), $LASTEXITCODE (PowerShell) or echo %ERRORLEVEL% (cmd).
Verification: FAILED is followed by an error line; the last part of that line is what matters:
| Error | Cause | Next action |
|---|---|---|
message imprint mismatch | The file's hash (or the entered hash) differs from the one in the time stamp | Check for a transcription error. If the hash is correct: this file is not the file to which the time stamp applies, or it has been changed |
certificate has expired / certificate is not yet valid | The BORICA certificate is not valid as at the current date | Case D (-attime) |
unable to get local issuer certificate | The chain cannot be built: the root or intermediate certificate is missing or incorrect | Repeat section 3.2 |
signer certificate not found | The BORICA certificate is not in the token | Not expected for StampR; contact StampR and BORICA |
ess signing certificate error | The signed attribute does not match the signing certificate | The token is not trustworthy |
invalid signature / signature failure | The signature is invalid: the token has been changed or corrupted | The token is not trustworthy; request another copy (Case C) |
Time in the token and in the certificate
The authoritative time is the time in the token, which is always in UTC (GMT), with an accuracy of ±0.5 seconds (Accuracy: 0x01F4 millis). The certificate shows the same instant in official Bulgarian time:
| Period | Bulgarian time | Token (UTC) | Certificate |
|---|---|---|---|
| Last Sunday in October – last Sunday in March (winter time) | UTC+2 | Nov 13 09:40:12 2026 GMT | 2026-11-13 11:40:12 |
| Last Sunday in March – last Sunday in October (summer time) | UTC+3 | Jul 15 08:00:00 2026 GMT | 2026-07-15 11:00:00 |
For time stamps after 22:00 UTC (winter time) or after 21:00 UTC (summer time), the date in the certificate is one day later than the date in the token – this is not a discrepancy.
6. Qualified status, revocation and long-term verification
StampR tokens are signed with a BORICA certificate listed in the EU trusted list as a qualified time stamp service (QTST) with status “granted” since 23.03.2023. The certificate is valid until 13.03.2028. This section establishes the qualified status at the time of the time stamp and is mandatory in Case D.
6.1. The BORICA certificate in the token
openssl ts -reply -in token.tsr -token_out -out token.p7s
openssl pkcs7 -inform DER -in token.p7s -print_certs -out tsa_cert.pem
openssl x509 -in tsa_cert.pem -noout -subject -serial -dates -fingerprint -sha256 -ext extendedKeyUsage
Expected result for tokens issued as of 16.11.2026:
| Field | Value |
|---|---|
| Subject | O = BORICA AD, OU = B-Trust, CN = B-Trust Qualified Time Stamp Authority |
| Serial number | 4431E2C388AB5130 |
| Validity | 14.03.2023 – 13.03.2028 |
| Extended Key Usage | Time Stamping (critical) |
| SHA-256 fingerprint | 4A:D9:BA:68:27:5C:5B:73:0B:D8:78:6A:38:3A:54:9D:DA:74:7F:09:BD:D0:F1:B7:08:A9:BA:8D:C4:2C:38:4D |
Time stamps issued later may be signed with a newer BORICA certificate; in that situation, verify its entry in the same way. If the issuer (TSA) in the token is not B-Trust Qualified Time Stamp Authority, the time stamp is not from BORICA and these instructions do not apply.
6.2. EU trusted list
- Open eIDAS Trusted List Browser → Bulgaria → BORICA AD.
- Find the service “B-Trust Qualified Time Stamp Authority”, type “Qualified electronic time stamp” (QTST).
- Check that the status is “Granted” as at the date of the time stamp (on 16.11.2026: Granted since 23.03.2023).
- Compare the serial number and fingerprint of the certificate in the service (Service digital identity) with those from point 6.1.
The machine-readable national list of the CRC is crc.bg/files/_en/TSL_BG.xml. Its status history also shows the service's previous certificate (until 31.05.2023), now with status “withdrawn”.
6.3. Revocation status
Check whether the certificate from 6.1 has been revoked, using the certificate revocation list (CRL) or OCSP:
curl -O http://crl.b-trust.org/repository/B-TrustOperationalQCA.crl
openssl crl -in B-TrustOperationalQCA.crl -inform DER -noout -text | grep -i -A3 "4431E2C388AB5130"
openssl ocsp -issuer B-TrustOperationalQCA.cer -cert tsa_cert.pem \
-url http://ocsp.b-trust.org -CAfile B-TrustRootQCA.cer -resp_text | grep -E "Cert Status|Response verify"
- No output from the CRL command and
Cert Status: good+Response verify OK– the certificate has not been revoked (as of 16.11.2026). - The certificate was revoked after the time of the time stamp – this does not in itself invalidate the time stamp. If the reason is
Key Compromise, request an official statement from BORICA AD. - The certificate was revoked before the time of the time stamp – the time stamp is not valid.
6.4. After 13.03.2028
After that date, verification follows Case D. Expired certificates are usually removed from the CRL, so revocation status at the time of the time stamp is established from the EU trusted list (6.2), from archived revocation information or through an enquiry to BORICA AD. The token is signed using 2048-bit RSA and SHA-256; whether these algorithms are sufficient as at the verification date is assessed under ETSI TS 119 312. For long-term preservation, BORICA recommends renewal with a new qualified electronic time stamp or a qualified long-term preservation service.
For time stamps issued from 16.11.2026 onwards, StampR archives BORICA's signed OCSP response for the certificate from 6.1 at the time of issuance (ocsp.der). It is provided on request together with the token and is verified without connecting to BORICA:
openssl ocsp -respin ocsp.der -issuer B-TrustOperationalQCA.cer \
-CAfile B-TrustRootQCA.cer -resp_text | grep -E "Response verify|Produced At|Cert Status"
Expected result: Response verify OK, Cert Status: good and Produced At a few seconds after the time of the time stamp. This proves that the BORICA certificate had not been revoked at that time.
7. Conclusion template
The court-appointed expert may present the result as follows (values from verification in square brackets):
During verification of StampR certificate No. [SR-…] with time stamp identifier [0x…], performed on [date] using OpenSSL [version], I established the following:
- The time stamp was issued by B-Trust Qualified Time Stamp Authority (BORICA AD) under policy 0.4.0.2023.1.1, serial number [0x…], time [… UTC], corresponding to […] Bulgarian time.
- Verification of the signature and the chain to B-Trust Root Qualified CA completed with “Verification: OK” [as at the time of the time stamp – for Case D].
- [Case A:] The SHA-256 hash of the submitted file [name, size in bytes] is […] and matches the hash in the time stamp. / [Case B:] The hash in the time stamp matches the one stated in the certificate; the original file was not submitted.
- The BORICA certificate used to sign the time stamp (serial number […]) is listed in the EU trusted list as a qualified time stamp service with status “Granted” at the time of the time stamp and has not been revoked [as of date].
Conclusion: [the file / the data with this hash] existed unchanged no later than [… UTC].
The full command output and the SHA-256 fingerprints of the files used (token.tsr, the certificates, the original file) are attached to the conclusion. Contact StampR (Web Trade EOOD) to request tokens and information from the register: info@stampr.eu.