1

I'm trying to create a LTV Enabled PDF Signature using Apache's PDFBox Detached Signature and the BouncyCastle API for the cryptographic signature itself.

So far I was able to make Adobe Reader display the "Signature is LTV enabled" message following these steps:

  1. Retrieve revocation info (both CRLs and OCSP Responses, except for root certificates of course) for the signing certificate's full chain and for the timestamp authority certificate's full chain (used to add the signature's timestamp in step #4)

  2. Include revocation info retrieved in step #1 as a signed attribute for the signature to be computed in Adobe OID "1.2.840.113583" format:

    adbe-revocationInfoArchival OBJECT IDENTIFIER ::= { 
    adbe(1.2.840.113583) acrobat(1) security(1) 8 }
    
    RevocationInfoArchival ::= SEQUENCE {
    
      crl  [0] EXPLICIT SEQUENCE of CRLs OPTIONAL,
    
      ocsp  [1] EXPLICIT SEQUENCE of OCSP Responses OPTIONAL,
    
      otherRevInfo [2] EXPLICIT SEQUENCE of OtherRevInfo OPTIONAL 
    }
    
    OtherRevInfo ::= SEQUENCE {
      Type  OBJECT IDENTIFIER
      ValValue OCTET STRING
    }
    
  3. Perform the signature

  4. Embed a qualified timestamp in the signature generated in the step #3

The previous steps' output gives me the "LTV Enabled" status in Adobe Reader:

Adobe LTV

When I check which data Adobe Reader used to validate the certificate chain validity it presents the expected "The selected certificate is considered valid because it has not been revoked as verified using the Online Certificate Status Protocol (OCSP) response that was embedded in the signature."

Signing certificate chain revocation location

However, when I perform the same check for the Timestamp Authority's certificate chain it presents "The selected certificate is considered valid because it has not been revoked as verified in real-time using the Online Certificate Status Protocol (OCSP) obtained on-line."

Timestamp certificate chain revocation location

The Signer's chain embedded CRLs/OCSPs are successfully used but the embedded TSA's chain CRLs/OCSPs are not.

This begs some questions that need to be answered:

  • Why are not the TSA embedded CRLs/OCSPs embedded used?
  • Do I have to place them elsewhere? If so, where?
  • Or do I have to ask the Timestamping authority to return the CRLs and/or OCSP responses as signed attribute within the timestamp token?
mkl
  • 90,588
  • 15
  • 125
  • 265
  • Have you tried to include the TSA validation related information in a PAdES document security store in the pdf? – mkl Nov 26 '20 at 20:15
  • Hello @mkl. Yes I have, and when I use a ASN1 parser the TSA validation related information is alongside the signer's related information. I even tried to include the TSA validation information within the timestamp token's CMS as an unsigned attribute. No luck :( – loveMeansN0thing Nov 27 '20 at 10:10
  • Well, having the information in a DSS is known to work. Thus, it appears there is some issue in the specific data you embed. Can you share a PDF for analysis? – mkl Nov 27 '20 at 10:55
  • @mkl Sure! Thank you very much for your help. https://gofile.io/d/KP0hAb – loveMeansN0thing Nov 27 '20 at 13:16
  • BTW, you'll have to trust the signer's chain root certificate. – loveMeansN0thing Nov 27 '20 at 13:22
  • I have tried making Adobe Reader accept your embedded revocation information for the time stamp but didn't succeed. Eventually i saw that some programs apparently cannot parse the time stamp properly at all (Foxit; older Acrobat versions), so maybe there is some issue with the stamp itself. Chances are I'm not in office next week, so probably i cannot look into this anymore before the week thereafter. – mkl Nov 27 '20 at 22:16
  • @mkl I've tried with other TSA and the result is the same. You can get the output PDF here: https://gofile.io/d/lApuna Take your time, I cannot thank you enough for your help. But I'm not gonna lie... You are my only hope ATM x) – loveMeansN0thing Nov 30 '20 at 15:52
  • The main problem for me is that there is no specified way to embed time stamp revocation data in ISO 32000-1, and in ISO 32000-2 there only is the PAdES way. So embedding in the DSS should do it. One probably has to set pdf version 2 (or matching ESIC or ADBE developer extensions). If that doesn't suffice, though, I'm quickly out of ideas. – mkl Nov 30 '20 at 20:19

0 Answers0