Download OpenAPI specification:Download
Our qualified Timestamping service lets you prove that a piece of data existed and has not been modified since a specific moment in time. The service is qualified under the European regulation 910/2014 (eIDAS).
It gives you a simple way to add a timestamp that irrefutably guarantees the existence at the time of stamping, and the integrity from that moment on, of documents and transactions.
Two Timestamping Authorities are available with the same legal validity, both issuing eIDAS qualified timestamps:
| Authority | Request URL | Credits per timestamp |
|---|---|---|
| MENSATEK | https://api.mensatek.com/tsaMENSATEK | 1 credit |
| FNMT (Fábrica Nacional de Moneda y Timbre) | https://api.mensatek.com/tsaFNMT | 2 credits |
Simply issue requests following the IETF-PKIX RFC-3161 timestamp standard -Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)- with the following characteristics:
HTTPS POST request with Content-Type application/timestamp-query and the binary timestamp request as the body (.tsq file).
A HASH of the data is sent; the supported algorithms are SHA256, SHA384 and SHA512.
The response is binary, with Content-Type application/timestamp-reply (.tsr file).
The service requires a registered user account. Authentication can be:
1.- With username/password (BASIC AUTH or DIGEST AUTH). You will find them in your user panel, Timestamping section; the same credentials work for both URLs.
2.- With a certificate. The certificates to be used are also validated from your user panel; the request URL for certificate authentication is https://cert.asetecgroup.es/tsa
Timestamping takes the following steps:
Step 1: HASH generation
Create the HASH of the document or data to stamp; any function available in any programming language will do. In this example we build the request with openssl:
openssl ts -query -data myfile.pdf -no_nonce -sha256 -out request.tsq
Running this command produces a request.tsq file containing everything needed for the request to the TSA (Timestamping Authority).
NOTE: if what you want is to timestamp a PDF file and also 'embed' the timestamp (and optionally a signature) into the document itself, use the PDF Signing and Timestamping utility we have built to help our customers, which performs the whole process.
Step 2: Timestamp request
With the request.tsq file from the previous step (TSQ: TimeStamp Query) we send a request to the chosen TSA server:
// MENSATEK timestamp (1 credit)
curl -H 'Content-Type:application/timestamp-query' --data-binary @request.tsq https://api.mensatek.com/tsaMENSATEK -o response.tsr -u user:password
// FNMT timestamp (2 credits)
curl -H 'Content-Type:application/timestamp-query' --data-binary @request.tsq https://api.mensatek.com/tsaFNMT -o response.tsr -u user:password
The response.tsr file contains the timestamp for the data we sent.
Step 3: Timestamp verification
openssl ts -reply -in response.tsr -text
We will get a reply like the following:
Status info:
Status: Granted.
Status description: unspecified
Failure info: unspecified
TST info:
Version: 1
Policy OID: 0.4.0.2023.1.1
Hash Algorithm: sha256
Message data:
0000 - d5 86 97 15 3e bd 4d 5c-f6 56 61 49 16 95 88 4e ....>.M\.VaI...N
0010 - c6 f2 c5 0f b3 be 2b 57-fd 93 3c d8 47 14 e5 3a ......+W..<.G..:
Serial number: 0x467819383180ADD560EC8A3B171A7B29
Time stamp: Jul 12 18:30:19.06 2021 GMT
Accuracy: unspecified seconds, 0x64 millis, unspecified micros
Ordering: no
Nonce: unspecified
TSA: DirName:/C=ES/O=FABRICA NACIONAL DE MONEDA Y TIMBRE-REAL CASA DE LA MONEDA/OU=CERES/2.5.4.97=VATES-Q2826004J/CN=AUTORIDAD DE SELLADO DE TIEMPO FNMT-RCM - TSU 2016
Data not needed for the integration:
Download link of the root certificate of the FNMT TSA (Fábrica Nacional de Moneda y Timbre): Download
Policy reference/OID: 1.3.6.1.4.1.5734.3.18.1
Associated policy type: QCP-l. OID: 0.4.0.194112.1.1