CRL verification problem

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

CRL verification problem

luizurias
Hi, i am getting this error "java.security.SignatureException: CRL does not verify with supplied public key."
when i try to verify if CRL is issued by the CA. But, if i use SUN provider or even BouncyCastle provider version 1.46 the verification return sucess.

Can someone tell me if the error is related with BC? I am using latest version 1.64


-------------------------------------------------
CRL:
MIISODCCECACAQEwDQYJKoZIhvcNAQENBQAwVDELMAkGA1UEBhMCQlIxEzARBgNVBAoTCklDUC1CcmFzaWwxFzAVBgNVBAsTDkFDIFByb2RlbWdlIEJSMRcwFQYDVQQDEw5BQyBQcm9kZW1nZSBNRxcNMTkxMjAzMTAyODA5WhcNMTkxMjAzMTYyODA5WjCCDuAwEgIBARcNMTgxMDA0MTM1MzM4WjASAgENFw0xODEwMTgxODI0MzJaMBICARUXDTE4MTAyNDE4NDcyNFowEgIBSRcNMTgxMTA3MTMyNTMxWjATAgIAshcNMTgxMTIxMTEwNTE1WjATAgIAxRcNMTgxMTIxMTIyNDA1WjATAgIA1hcNMTgxMTIyMTcyNzEwWjATAgIAphcNMTgxMTI3MTg1NTUxWjATAgIBJRcNMTgxMjAzMTIyNjU3WjATAgIBMhcNMTgxMjA0MjIwOTMyWjATAgIBmBcNMTgxMjE3MTU1OTE1WjATAgIBlxcNMTgxMjE3MTg0NjQ2WjATAgIBnhcNMTgxMjE4MTIwNzIzWjATAgIBkxcNMTgxMjE4MTUzODE0WjATAgIBnxcNMTgxMjE4MTU0OTMyWjATAgIBohcNMTgxMjE4MTY0MzM1WjATAgIBuhcNMTgxMjIwMTg0ODM1WjATAgIBuRcNMTgxMjIwMTg1NDA3WjATAgIByhcNMTgxMjI3MTEyNzAxWjATAgIBqRcNMTkwMTAyMTczNjA1WjATAgIB4xcNMTkwMTAzMTIzOTUxWjATAgIB6BcNMTkwMTAzMTcyMzE5WjATAgICLRcNMTkwMTE4MTcwNzEwWjATAgICMRcNMTkwMTIxMTA1OTA1WjATAgICORcNMTkwM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jLnByb2RlbWdlLmdvdi5ici9yZXBvc2l0b3Jpby9kcGMvYWNfcHJvZGVtZ2VfbWcvZHBjX2FjX3Byb2RlbWdlX21nLnBkZjBrBgNVHR8EZDBiMGCgXqBchlpodHRwOi8vaWNwLWJyYXNpbC5hYy5wcm9kZW1nZS5nb3YuYnIvcmVwb3NpdG9yaW8vbGNyL2FjX3Byb2RlbWdlX2JyL2xjcl9hY19wcm9kZW1nZV9ici5jcmwwHwYDVR0jBBgwFoAUyMgWTsRchBF6HLmDfFMdz27AI8kwDQYJKoZIhvcNAQENBQADggIBAI7GDU0ySaT9DG+ovEd7xp4Qxw9RgypvP9qW0dLn2KPXtrSYJLFIOB+dIVp6wcAdotMXFqmdcVc0i4zkQu3S0MzkFCMdXmGTGjf4TbeUdUB9HGRZfyOP3FgfcX3foP3MFkI+acNAEqE7ntlngT6lowWA9B9CbGim1FtgKwo8AmcI7089mFUOaYAxhqyfuWHZtLHqYW+R0vuhkObSMHjQU2EIBCC69QlmGHgLQa3PmNuQJWDvm8h+5XD3qqjnyg8h7PlBxPtOrpVip8a2zdz3fsBMV/cq8ssbwRvwcEcfu6vpyp8kpSHhUgVLCk7f5xfD35qlFeN9YAP8/n0vS85sqYKxUPKmm/HQQ8ALJRc32A5emksUw2snpJLeGvY/A8fC61YLq6KonLhVBt+nqHPPykD4BRa0qJw6Dq9tHLefim22LQzRzbOFnRpFDYYJfkwNQen5f3xwUzzx4UJsruQLR53BE8ocpeiB9+iYgmn4e+DcQKYM/HI0ha0zseX6xnDJeANg1JYbO4Jprb4cw26XkM+NDGkIC3FM4yJ/EtufNwOykEiG9ELCpou+ay8nnNXM0MKzMLiKmPjllY8rN84k309jHACy0RAbrCMfRXW3FZlBCKEfqpwOloJzBtDA10S6tplStVYjApy785Dr1B463CC1f+aow15/FirHhUh4GtCy
Reply | Threaded
Open this post in threaded view
|

Re: CRL verification problem

luizurias
I figured out that using BC provider, the byte array from TBSCertList is
different from SUN provider. Does anyone know why?



--
Sent from: http://bouncy-castle.1462172.n4.nabble.com/Bouncy-Castle-Dev-f1462173.html

Reply | Threaded
Open this post in threaded view
|

Re: CRL verification problem

David Hook-3
In reply to this post by luizurias

I can't actually decoded the CRL data, it appears to be truncated.

Usually this would mean the signature on the CRL is invalid - given that
it passes with 1.46 it's probably because the signature has not been
created on properly encoded DER data.

Regards,

David

On 4/12/19 5:27 am, Luiz Henrique wrote:

> Hi, i am getting this error "java.security.SignatureException: CRL
> does not verify with supplied public key."
> when i try to verify if CRL is issued by the CA. But, if i use SUN
> provider or even BouncyCastle provider version 1.46 the verification
> return sucess.
>
> Can someone tell me if the error is related with BC? I am using latest
> version 1.64
>
>
> -------------------------------------------------
> CRL:
> MIISODCCECACAQEwDQYJKoZIhvcNAQENBQAwVDELMAkGA1UEBhMCQlIxEzARBgNVBAoTCklDUC1CcmFzaWwxFzAVBgNVBAsTDkFDIFByb2RlbWdlIEJSMRcwFQYDVQQDEw5BQyBQcm9kZW1nZSBNRxcNMTkxMjAzMTAyODA5WhcNMTkxMjAzMTYyODA5WjCCDuAwEgIBARcNMTgxMDA0MTM1MzM4WjASAgENFw0xODEwMTgxODI0MzJaMBICARUXDTE4MTAyNDE4NDcyNFowEgIBSRcNMTgxMTA3MTMyNTMxWjATAgIAshcNMTgxMTIxMTEwNTE1WjATAgIAxRcNMTgxMTIxMTIyNDA1WjATAgIA1hcNMTgxMTIyMTcyNzEwWjATAgIAphcNMTgxMTI3MTg1NTUxWjATAgIBJRcNMTgxMjAzMTIyNjU3WjATAgIBMhcNMTgxMjA0MjIwOTMyWjATAgIBmBcNMTgxMjE3MTU1OTE1WjATAgIBlxcNMTgxMjE3MTg0NjQ2WjATAgIBnhcNMTgxMjE4MTIwNzIzWjATAgIBkxcNMTgxMjE4MTUzODE0WjATAgIBnxcNMTgxMjE4MTU0OTMyWjATAgIBohcNMTgxMjE4MTY0MzM1WjATAgIBuhcNMTgxMjIwMTg0ODM1WjATAgIBuRcNMTgxMjIwMTg1NDA3WjATAgIByh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PjllY8rN84k309jHACy0RAbrCMfRXW3FZlBCKEfqpwOloJzBtDA10S6tplStVYjApy785Dr1B463CC1f+aow15/FirHhUh4GtCy




Reply | Threaded
Open this post in threaded view
|

Re: CRL verification problem

luizurias
In reply to this post by luizurias
Sorry about that, it is really truncated. Here is the correct base64 for CRL:

MIISODCCECACAQEwDQYJKoZIhvcNAQENBQAwVDELMAkGA1UEBhMCQlIxEzARBgNVBAoTCklDUC1CcmFzaWwxFzAVBgNVBAsTDkFDIFByb2RlbWdlIEJSMRcwFQYDVQQDEw5BQyBQcm9kZW1nZSBNRxcNMTkxMjAzMTAyODA5WhcNMTkxMjAzMTYyODA5WjCCDuAwEgIBARcNMTgxMDA0MTM1MzM4WjASAgENFw0xODEwMTgxODI0MzJaMBICARUXDTE4MTAyNDE4NDcyNFowEgIBSRcNMTgxMTA3MTMyNTMxWjATAgIAshcNMTgxMTIxMTEwNTE1WjATAgIAxRcNMTgxMTIxMTIyNDA1WjATAgIA1hcNMTgxMTIyMTcyNzEwWjATAgIAphcNMTgxMTI3MTg1NTUxWjATAgIBJRcNMTgxMjAzMTIyNjU3WjATAgIBMhcNMTgxMjA0MjIwOTMyWjATAgIBmBcNMTgxMjE3MTU1OTE1WjATAgIBlxcNMTgxMjE3MTg0NjQ2WjATAgIBnhcNMTgxMjE4MTIwNzIzWjATAgIBkxcNMTgxMjE4MTUzODE0WjATAgIBnxcNMTgxMjE4MTU0OTMyWjATAgIBohcNMTgxMjE4MTY0MzM1WjATAgIBuhcNMTgxMjIwMTg0ODM1WjATAgIBuRcNMTgxMjIwMTg1NDA3WjATAgIByhcNMTgxMjI3MTEyNzAxWjATAgIBqRcNMTkwMTAyMTczNjA1WjATAgIB4xcNMTkwMTAzMTIzOTUxWjATAgIB6BcNMTkwMTAzMTcyMzE5WjATAgICLRcNMTkwMTE4MTcwNzEwWjATAgICMRcNMTkwMTIxMTA1OTA1WjATAgICORcNMTkwMTIxMTMyMjQxWjATAgICUBcNMTkwMTIyMTYzM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G0XlFw0xOTExMDUxODUyNTFaMBMCAgMMFw0xOTExMjAxMjE3MzJaoIGzMIGwMAsGA1UdFAQEAgIWgTAiBgNVHSMBAQAEGDAWgBTt3CdtYXrn45x/fqKxU59wk3wCtjB9BggrBgEFBQcBAQEBAARuMGwwagYIKwYBBQUHMAKGXmh0dHA6Ly9pY3AtYnJhc2lsLmFjLnByb2RlbWdlLmdvdi5ici9yZXBvc2l0b3Jpby9jZXJ0aWZpY2Fkby9hY19wcm9kZW1nZV9tZy9hY19wcm9kZW1nZV9tZy5wN2MwDQYJKoZIhvcNAQENBQADggIBAIUXCbiOzY5CWd3wLH32Qg4P9ciZ8r5n4i3f9bXLnbQbdVhsFY2raCstOGOJUOci/WrzikKrjbNNJM3rW46CLFXvZ4Nalq1krzE7bk6mlyZ8O6vXtck4yu/owz+7+VALWSwWKcBFGFKzjgB2XkbQuRYqr/Hp4aqKGP76FZP5hLyIkI8nSxCdBWkhPYGnECaNCELcobYCdvo46850MGvXrbAgFZjJLvL/Ovj+/z0gtomYX/v8wZnvzUql2Rdi0NFQBkAsPdKw05TeB1/TzN8nB5UYZlfZH7Du8ukhJspJ7v7s8dpPJWzV1FIqUScfv2vZPzgyL5njJ6OD8s8fSS65BYOgbP9cJnVsSfyY/fbC8ZAmYRNDlFpjrAApNBMSONjNPoHQTYpIGYE+2shKaxoWQuq9YLvVzF/Z138+nDxh4CO2/EmXAzSkUNP+V0upi2el2DObKXxuSoVOdwA2w7BK/Q0anAGvO1u2XtXITqX4zTRmvAJJa0Ous57yMbICjPfS2fiaBxdmtKJMgM1RMwdUgWdF3bZAiYBnS3ZnF0jVJhltFZqeJ164Sz7NBVWx6IYpuwD8Xozpj+JycJNNh8YN/cg97wOzR6TD9Ba7HPwdgxKYmBzdG70jKoY/H+z03h3/UV2kBsqnnQxpXH6Y9JjpX22jFID6PA8e+7gk349lDyEa




Can you test parser using BC provider and SUN provider? Because the
TBSCertList is different between these providers. The SUN provider looks
more complete.



--
Sent from: http://bouncy-castle.1462172.n4.nabble.com/Bouncy-Castle-Dev-f1462173.html

Reply | Threaded
Open this post in threaded view
|

Re: CRL verification problem

luizurias
I realized that CRL Extensions is different between theses providers.

<http://bouncy-castle.1462172.n4.nabble.com/file/t375760/differences_tbs.jpg>

AIA and AuthorityKeyIdentifier has a boolean value when SUN provider is
used. In the original CRL, theses booleans are encoded in both extensions.
But, this boolean value is correct/valid? Because in the RFC 5280 i dont
find anything related to boolean in these extensions.



--
Sent from: http://bouncy-castle.1462172.n4.nabble.com/Bouncy-Castle-Dev-f1462173.html

Reply | Threaded
Open this post in threaded view
|

Re: CRL verification problem

luizurias
Hi!

In RFC 5280, the syntax of Extension is defined as:
Extension  ::=  SEQUENCE  {
     extnID      OBJECT IDENTIFIER,
     critical    BOOLEAN DEFAULT FALSE,
     extnValue   OCTET STRING
                 -- contains the DER encoding of an ASN.1 value
                 -- corresponding to the extension type identified
                 -- by extnID
     }

That is, the boolean value encoded in SUN provider is the critical value. It
seems that BouncyCastle is ignoring this attribute of Extension (probably
because the value is the default value). But, doing that, the signature
verification fails cause the hash calculated does not inclued theses
booleans.

I think it is a critical problem, any CRL that contains the critical value
encoded in Extension will fail the cryptographic verification.




--
Sent from: http://bouncy-castle.1462172.n4.nabble.com/Bouncy-Castle-Dev-f1462173.html

Reply | Threaded
Open this post in threaded view
|

Re: CRL verification problem

David Hook-3

I'd agree, it's a problem, the CRL has an invalid signature. To quote
section 5.1.1.3 of RFC 5280

"The signatureValue field contains a digital signature computed upon the
ASN.1 DER encoded tbsCertList."

This means that if the field value is the default value it is left out
of the encoding used to calculate the signature, so any extension with a
value of FALSE should not have that value encoded in it when the
signature is calculated.

Please ask whoever is generating these CRLs to do it properly. There are
real security implications if this is not done correctly.

Thanks,

David

On 6/12/19 1:29 am, luizurias wrote:

> Hi!
>
> In RFC 5280, the syntax of Extension is defined as:
> Extension  ::=  SEQUENCE  {
>      extnID      OBJECT IDENTIFIER,
>      critical    BOOLEAN DEFAULT FALSE,
>      extnValue   OCTET STRING
>                  -- contains the DER encoding of an ASN.1 value
>                  -- corresponding to the extension type identified
>                  -- by extnID
>      }
>
> That is, the boolean value encoded in SUN provider is the critical value. It
> seems that BouncyCastle is ignoring this attribute of Extension (probably
> because the value is the default value). But, doing that, the signature
> verification fails cause the hash calculated does not inclued theses
> booleans.
>
> I think it is a critical problem, any CRL that contains the critical value
> encoded in Extension will fail the cryptographic verification.
>
>
>
>
> --
> Sent from: http://bouncy-castle.1462172.n4.nabble.com/Bouncy-Castle-Dev-f1462173.html
>
>


Reply | Threaded
Open this post in threaded view
|

Re: CRL verification problem

luizurias
Hello, thanks for reply! Sorry for the delay to answer.

I understand what you mean, but consider this scenario:

This CRL contains DEFAULT values encoded in its structure. In the RFC,

"Implementers should note that the DER encoding of SET or SEQUENCE
components whose value is the DEFAULT omit the component from the
encoded certificate or CRL. For example, a BasicConstraints
extension whose cA value is FALSE would omit the cA boolean from the
encoded certificate."

This quote indicates to omit default values when encoding. But it doesn't
forbid the encode, right?

I mean, if a CRL encodes a DEFAULT value in tbsCertificate, shouldn't this
value be present in the hash calculation?

"The signatureValue field contains a digital signature computed upon the
ASN.1 DER encoded tbsCertList."

We understand this quote indicates to calculate signatureValue upon
tbsCertList, independent if the tbsCertList contains DEFAULT values or not.



--
Sent from: http://bouncy-castle.1462172.n4.nabble.com/Bouncy-Castle-Dev-f1462173.html

Reply | Threaded
Open this post in threaded view
|

Re: CRL verification problem

David Hook-3

Yes, the CRL is allowed to contain the encoding of default values, but
no, if there are included they are not to be included in the hash
calculation.

Regards,

David

On 12/12/19 6:43 am, luizurias wrote:

> Hello, thanks for reply! Sorry for the delay to answer.
>
> I understand what you mean, but consider this scenario:
>
> This CRL contains DEFAULT values encoded in its structure. In the RFC,
>
> "Implementers should note that the DER encoding of SET or SEQUENCE
> components whose value is the DEFAULT omit the component from the
> encoded certificate or CRL. For example, a BasicConstraints
> extension whose cA value is FALSE would omit the cA boolean from the
> encoded certificate."
>
> This quote indicates to omit default values when encoding. But it doesn't
> forbid the encode, right?
>
> I mean, if a CRL encodes a DEFAULT value in tbsCertificate, shouldn't this
> value be present in the hash calculation?
>
> "The signatureValue field contains a digital signature computed upon the
> ASN.1 DER encoded tbsCertList."
>
> We understand this quote indicates to calculate signatureValue upon
> tbsCertList, independent if the tbsCertList contains DEFAULT values or not.
>
>
>
> --
> Sent from: http://bouncy-castle.1462172.n4.nabble.com/Bouncy-Castle-Dev-f1462173.html
>
>


Reply | Threaded
Open this post in threaded view
|

Re: CRL verification problem

luizurias
Ok, i understand.

But i have found out that this behavior does not apply in certificates..

This certificate (below) encodes critical value (false) in
authorityKeyIdentifier, for example.
When i verify if CA issued this certificate, the verification returns true.
And, the tbsCertificate parsed by BC includes the critical value of false.

We think that both certificate and CRL should have the same behavior, since
the Extension structure is the same for both cases, no?

CA certificate:
MIIGkjCCBHqgAwIBAgIBATANBgkqhkiG9w0BAQ0FADBxMQswCQYDVQQGEwJCUjET
MBEGA1UECgwKSUNQLUJyYXNpbDE0MDIGA1UECwwrQXV0b3JpZGFkZSBDZXJ0aWZp
Y2Fkb3JhIFJhaXogQnJhc2lsZWlyYSB2NTEXMBUGA1UEAwwOQUMgUHJvZGVtZ2Ug
QlIwHhcNMTgwODMxMTUyMDMzWhcNMjkwMzAxMTUyMDMzWjBUMQswCQYDVQQGEwJC
UjETMBEGA1UEChMKSUNQLUJyYXNpbDEXMBUGA1UECxMOQUMgUHJvZGVtZ2UgQlIx
FzAVBgNVBAMTDkFDIFByb2RlbWdlIE1HMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
MIICCgKCAgEApWGLOCwpZr3PpyxVMR6x+os6/i3v2FOgEh8/8/bfUkv7qrIAfuy0
Bqre/F+ZVVAnySqXObEMpQAtovqgLBEzzv1dcPyd6FLjHCqyuPNzRQLACAtEZJ/U
A7pyKDiDspGwS0FyEYfMbxC7U0nuQnliJmANPJuc6SrAnnWBT7aimDI1ztxoJfCc
lLVPZI/gft5uKK06p3wnsJvTZDYivvr45Vmf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-castle.1462172.n4.nabble.com/Bouncy-Castle-Dev-f1462173.html

Reply | Threaded
Open this post in threaded view
|

Re: CRL verification problem

David Hook-3
You're correct that the same should apply for CRLs as Certificates,
however we went with Sun's opinion on this one as the number CA's that
seemed incapable of releasing correct certificates seemed overwhelming.

Please ask the CA in question to correct their certificates. Given what
has happened elsewhere it seems inevitable that one day this "feature"
will need to be removed, and if it is in response to someone discovering
an exploit it will happen really fast. All they need to do is not issue
BOOLEAN true.

Actually, thinking about it, we should probably add a system property
for this now, but at any rate, if we were to fix this, the client
certificate would no longer verify.

Regards,

David

On 14/12/19 3:16 am, luizurias wrote:

> Ok, i understand.
>
> But i have found out that this behavior does not apply in certificates..
>
> This certificate (below) encodes critical value (false) in
> authorityKeyIdentifier, for example.
> When i verify if CA issued this certificate, the verification returns true.
> And, the tbsCertificate parsed by BC includes the critical value of false.
>
> We think that both certificate and CRL should have the same behavior, since
> the Extension structure is the same for both cases, no?
>
> CA certificate:
> MIIGkjCCBHqgAwIBAgIBATANBgkqhkiG9w0BAQ0FADBxMQswCQYDVQQGEwJCUjET
> MBEGA1UECgwKSUNQLUJyYXNpbDE0MDIGA1UECwwrQXV0b3JpZGFkZSBDZXJ0aWZp
> Y2Fkb3JhIFJhaXogQnJhc2lsZWlyYSB2NTEXMBUGA1UEAwwOQUMgUHJvZGVtZ2Ug
> QlIwHhcNMTgwODMxMTUyMDMzWhcNMjkwMzAxMTUyMDMzWjBUMQswCQYDVQQGEwJC
> UjETMBEGA1UEChMKSUNQLUJyYXNpbDEXMBUGA1UECxMOQUMgUHJvZGVtZ2UgQlIx
> FzAVBgNVBAMTDkFDIFByb2RlbWdlIE1HMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
> MIICCgKCAgEApWGLOCwpZr3PpyxVMR6x+os6/i3v2FOgEh8/8/bfUkv7qrIAfuy0
> Bqre/F+ZVVAnySqXObEMpQAtovqgLBEzzv1dcPyd6FLjHCqyuPNzRQLACAtEZJ/U
> A7pyKDiDspGwS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J4zBEdOBCJstoKvGyk0sDVez
> KEJ6NH7rxgkJwVz51UloJW2Kxl2/gpRRUUqCD1v01tF1Ewv0VS2MEpINKvUK7DBv
> hXU8BE5MUMzB2ieT0DSw0XoffaMWYx1pJNxmhIU8m63ndgDw7ZfOgw==
>
>
>
>
> --
> Sent from: http://bouncy-castle.1462172.n4.nabble.com/Bouncy-Castle-Dev-f1462173.html
>
>