Subject: RE: CAdES implementation. Complete Revocation References attribut e.

From: "Pope, Nick" <[email-masked]>
Date: Wed, 5 Mar 2008 09:27:01 -0000

Pavel,

One your first question, if there is no CRL or OCSP available than the
sequence can be empty.

Peter Rybar's suggestion regarding the second point (repeated below) is
fine.

"RFC 2560

4.2.1  ASN.1 Specification of the OCSP Response

BasicOCSPResponse       ::= SEQUENCE {

      tbsResponseData      ResponseData,

      signatureAlgorithm   AlgorithmIdentifier,

      signature            BIT STRING,

      certs                [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }

It means: you must use the OPTIONAL certs for this purpose.

Similar problem is solving with timestamp, where the certs and CRL for
timestamp validation are included in the timestamp and not in the signature
which is timestamped."

Peter

-----Original Message-----
From: Pavel V. Smirnov [mailto:[email-masked]] 
Sent: 04 March 2008 13:46
To: [email-masked]; [email-masked]
Subject: CAdES implementation. Complete Revocation References attribute.

Hello all and personally Nick!

I have a couple new questions regarding CAdES implementation.

Consider section 6.2.2 of ETSI 101 733 v1.7.3 (excerpt):

CompleteRevocationRefs shall contain one CrlOcspRef for the
signing-certificate, followed by one

for each OtherCertID in the CompleteCertificateRefs attribute. The second
and subsequent CrlOcspRef

fields shall be in the same order as the OtherCertID to which they relate.
At least one of CRLListID or

OcspListID or OtherRevRefs should be present for all but the "trusted" CA of
the certificate path.

The first question.

It seems to me that one can include an empty CrlOcspRef (without any
CRLListID or

OcspListID or OtherRevRefs) for a "trusted" CA. Am I right? If one cannot do
like that, then all "trusted" CA certificates have to be placed at the end
of CompleteCertificateRefs SEQUENCE. Which way is right? Or may be both?

The second question.

It's quite clear how to compose this attribute in a simple CRL-only case.
Now, let us use OCSP. Where should one place a certificate of
OCSP-responder? It would be great if one could place a reference to this
certificate in CompleteCertificateRefs (but it is in some way prohibited by
the phrase "It references the full set of CA

certificates that ... " in section 6.2.1). Let us assume that this
certificate is no-check and one does not need to place the corresponding
CrlOcspRef into CompleteRevocationRefs attribute. Then one have to equate
such OCSP-responder certificate to a "trusted" CA and either include an
empty CrlOcspRef in CompleteRevocationRefs or place the certificate at the
end of CompleteCertificateRefs SEQUENCE. How should I solve this?

Pavel Smirnov

Crypto-Pro
Tel./Fax: +7 495 780-4820
WWW:  <http://www.cryptopro.ru/> http://www.CryptoPro.ru
e-mail:  <mailto:[email-masked]> [email-masked]

---

From: Julien Stern <[email-masked]>
Date: Wed, 05 Mar 2008 11:02:40 +0100

> One your first question, if there is no CRL or OCSP available than the 

Nick,

The standard says:

At least one of CRLListID or OcspListID or OtherRevRefs should be 
present for all but the "trusted" CA of the certificate path.

So it seems the sequence cannot be empty.

> Peter Rybar's suggestion regarding the second point (repeated below) is 

I respectfully disagree. What Pavel asked was how to _reference_ an OCSP 
  responder certificate, not how to include it into the signature.

So, for CAdES-C, the proposed solution is not applicable.
Furthermore, if you do this, CAdES-X is not a secure form of CAdES 
anymore because you do not timestamp the reference to the OCSP responder 
certificate.

I already pointed out on both lists that CAdES section 6.2.2 was not 
suited to real-world PKIs.

Again, this issue comes from the fact it assumes that all validation 
data can be represented as a single chain, when it is in fact a tree (as 
soon as there is a certificate renewal or an indirect CRL or a dedicated 
OCSP responder).

CAdES should really be fixed to handle these cases.
One solution would be to allow implementations to put certificate 
references and revocation references in any order and not to check for 
correspondance between the two (like in XAdES actually).

During the latest plugtest on CAdES that we participated in, it appeared 
that implementations already handled this scenario anyway...

Regards,

--
Julien

> timestamp validation are included in the timestamp and not in the 
> signature which is timestamped."
> 
>  
> 
> Peter
> 
>  
> 
>  
> 
> *From:* Pavel V. Smirnov [mailto:[email-masked]]
> *Sent:* 04 March 2008 13:46
> *To:* [email-masked]; [email-masked]
> *Subject:* CAdES implementation. Complete Revocation References attribute.
> 
>  
> 
> for each OtherCertID in the CompleteCertificateRefs attribute. The 
> second and subsequent CrlOcspRef
> 
> fields shall be in the same order as the OtherCertID to which they 
> relate. At least one of CRLListID or
> 
> OcspListID or OtherRevRefs should be present for all but the "trusted" 
> CA of the certificate path.
> 
>  
> 
> The first question.
> 
> OcspListID or OtherRevRefs) for a "trusted" CA. Am I right? If one 
> cannot do like that, then all "trusted" CA certificates have to be 
> placed at the end of CompleteCertificateRefs SEQUENCE. Which way is 
> right? Or may be both?
> 
>  
> 
> The second question.
> 
> It's quite clear how to compose this attribute in a simple CRL-only 
> case. Now, let us use OCSP. Where should one place a certificate of 
> certificate in CompleteCertificateRefs (but it is in some way prohibited 
> by the phrase "It references the full set of _CA_
> 
> CrlOcspRef into CompleteRevocationRefs attribute. Then one have to 
> equate such OCSP-responder certificate to a "trusted" CA and either 
> include an empty CrlOcspRef in CompleteRevocationRefs or place the 
> certificate at the end of CompleteCertificateRefs SEQUENCE. How should I 
> solve this?
> 
>  
> 
> Pavel Smirnov
> 
> Crypto-Pro
> WWW: http://www.CryptoPro.ru <http://www.cryptopro.ru/>
> e-mail: [email-masked] <mailto:[email-masked]>
> 
>  
>

---

From: "Pavel V. Smirnov" <[email-masked]>
Date: Thu, 6 Mar 2008 19:47:02 +0300

Nick,

The first point  is closed now, thanks.

On the second one. I certainly can store a certificate of OCSP-responder in
OCSP response itself, but this response by default is not protected by
CrlOcspRef and hence, existence of this certificate is not protected by
CAdES-C time-stamp or by time-stamped-certs-crls-references attribute. Of
course, I can force OcspResponsesID to include optional ocspRepHash to
protect this certificate, but this way somehow contradicts a remark on
ocspRepHash (cited): Since it may be needed to make the difference between
two OCSP responses received within the same second, then the hash of the
response contained in the OcspResponsesID may be needed to solve the
ambiguity.

That said, I want to bring your attention to the other case. Consider a
dedicated CRL issuer implied by policy with its own CRL-issuer-certificate.
Where could I store this certificate and a reference to it? Now there is
only a CRL (or may be ARL) signed by this issuer in my message and I cannot
include its certificate in that CRL. Why don't we just allow any certificate
needed to validate a path (not only CA certificates) to be included in
complete certificate references attribute?

Pavel Smirnov

Crypto-Pro

From: [email-masked] [mailto:[email-masked]]
On Behalf Of Pope, Nick
Sent: Wednesday, March 05, 2008 12:27 PM
To: Смирнов Павел Владимирович; Pope, Nick; [email-masked]
Cc: [email-masked]'
Subject: RE: CAdES implementation. Complete Revocation References attribute.

Pavel,

"RFC 2560

      signature            BIT STRING,

Peter

-----Original Message-----
From: Pavel V. Smirnov [mailto:[email-masked]] 
Sent: 04 March 2008 13:46
To: [email-masked]; [email-masked]
Subject: CAdES implementation. Complete Revocation References attribute.

The first question.

The second question.

Pavel Smirnov

Crypto-Pro