4

I m working on one project about certificates and digital signatures in Java, but i cant understand following situation. Certificates of sender and receiver of document was valid when signature is created. But in time, when receiver received document, certificate of sender had expired. Is that valid situation, so receiver can normally verify signature, or he cant?

One more question. For what is used Non-repudiation key usage?

johnny94
  • 311
  • 4
  • 20

3 Answers3

3

A digital signature will remain cryptographically correct even if the certificate has expired, but verification of the signature will be invalid.

An electronic certificate has a period of use established by the policy of the Certification Authority, beyond which the use of the private key is not considered safe.

To preserve the validity of the signature beyond the expiration time, a time stamp or revocation evidences ( CRLs, OCSP responses) can be incorporated on the signature, in such a way that it is possible to verify the signature without having to contact the CA in the future.

One more question. For what is used Non-repudiation key usage?

Please, read this X509: What's the difference between digital signature and non-repudiation

pedrofb
  • 37,271
  • 5
  • 94
  • 142
2

We need to have some clear concept here:

1-A certificate can expired or be revoked at any time, so all documents with it signature will be invalid. All certificates have an expiring date.

1.1 - To avoid this situation normally you have to sign with the standard XADES-T and a TSA (Time Stamp Authority) has to validate and re-sign the file. This will give you longevity avoiding the first problem -> Ending on a AdES-A.

That was just a clue, the process has much more theory with it.

Note: A time stamp is not just enough, it can be included in a normal signature, it has to be the TSA who set this time Stamp certificating that your signature was valid at that moment and he endorse it.

Answering your question: Yes, it is a valid and normal situation, and you can't do anything about it (on the standard way), it is no longer valid. Now you can work on avoiding this to happen again with a TSA( of trust, in spain we have @Firma from the Government) and re-stamping your valid documents.

For what is used Non-repudiation key usage? This is used so you can't say that you didn't sign the document, once is signed it is complete valid and legal. To accomplish that, you have to sign with a standard certificate (Given by an Oficial Entity) containing your most important information,normally this is given presencialy (at least in Spain), you have to go to a concrete place with your accreditation document (DNI or National Identity Number) to get your certificate.

Spanish Links that could help: https://www.sede.fnmt.gob.es/certificados/persona-fisica/obtener-certificado-software

http://firmaelectronica.gob.es/Home/Ciudadanos/Aplicaciones-Firma.html#arroba_firma

Hope this helps. Thanks.

UHDante
  • 577
  • 9
  • 21
  • ETSI's standards for Advanced Electronic Signatures (AdES) include CAdES, XAdES and PAdES. They are all designed to support long term signatures, not only XAdES as you said. – pedrofb Dec 24 '17 at 08:31
  • XAdES-EPES with a timestamp ( XAdES-T) does not protect the signature agains expiration of certificate or revocation. A timestamp just adds a time mark over a hash of data. A trusted CA **does not validate** the data which is timestamping, so if the signing certificate is now expired you can't be sure if the certificate was valid at signing time. It is needed to add in the signature the revocation evidences (OCSP and CRL responses) , all the certificates used and a new timestamp. This is a AdES-A signature, or AdES-LTA if using the new ETSi baseline profiles(XAdES-EPES is now deprecated.) – pedrofb Dec 24 '17 at 08:50
  • @Pedrofb thanks for refreshing my memory, you are correct and updated, just to add that The CAdES standards (ETSI TS 101 733), XAdES (ETSI TS 101 903) and PAdES (ETSI TS 102 778-4) **contemplate the possibility of incorporating to the electronic signatures additional information to guarantee the validity of a long-term signature**, once expired the period of validity of the certificate. Therefore, each agency can extend the signature from the** EPES class to a long-lived format (AdES -T, -C, -X, -XL, -A)** Long-lived formats (with validation information). – UHDante Dec 27 '17 at 09:41
  • In case you want to generate long-term signatures, it is **recommended** to include the Validation information and release of a time stamp to said information (EPES-A format).In the event that you want to incorporate the validation information into the signature, recommends using validation by OCSP. Thanks to @pedrofb for the update and comments, it its a correct adn hepfull information, – UHDante Dec 27 '17 at 09:42
0

A certificate can expire, or can be revoked, between it is "used" and it is "validated". To avoid this, you can validate it immediately after it was used. When signing PDF files, this is part of PAdES LTV specification.

Christoph Bimminger
  • 1,006
  • 7
  • 25