Peter Sylvester | 1 Jul 2011 06:22
Picon
Picon
Favicon

Re: rfc3161 TimeStamps and sha1-based sigs/imprints in pkcs7/cms

signing/finishing a contract on paper and leaving it near/in a cloud ?
you don't do that in the paperworld.

On 06/30/2011 07:46 PM, Martin Rex wrote:
> Peter Sylvester wrote:
>> We are sorry for them. This URL has been deprecated
>> since years,  a good one can be found reading
>>
>>       http://timestamping.edelweb.fr
>>
>> Thanks for your attention and sorry for the inconvenience
>> of this message for those who are not interested in timestamping
> Speaking of rfc3161 timestamping, most public services seem to
> be limited to sha1WithRsaEncryption { 1, 2, 840, 113549, 1, 1, 5 }
> which looks like an anachronism and a security problem to me.
>
> Are the proposals or is there a standard how to migrate to
> a more resonable signature algorithm such as
> sha256WithRsaEncryption { 1, 2, 840, 113549, 1, 1, 11 }
>
> e.g. when the MessageImprint uses SHA256?
>
> While requesting this feature explicitly through a specific
> TSA policy OID would theoretically be possible, this very
> same approach would be quite non-portable.
>
> The original plan was to _have_completed_ phasing out the use of SHA-1
> for digital signatures by the end of 2010, but that target seems to
> have been missed entirely.  There is a significant availability of
> RSA 2048-bit certificates, but the use of sha256WithRsaEncryption
(Continue reading)

Peter Gutmann | 1 Jul 2011 10:44
Picon
Picon
Picon
Favicon

Re: rfc3161 TimeStamps and sha1-based sigs/imprints in pkcs7/cms

Martin Rex <mrex <at> sap.com> writes:

>The original plan was to _have_completed_ phasing out the use of SHA-1 for 
>digital signatures by the end of 2010, but that target seems to have been 
>missed entirely.  There is a significant availability of RSA 2048-bit 
>certificates, but the use of sha256WithRsaEncryption is still at homeopathic 
>levels.

I think one reason for this may be the vanishingly small use of TSP.  There's 
a pile of closed environments for which the goal is to meet requirements set 
ten years ago by lawyers that haven't been updated since then (and where they 
could just as well use CRC32 because the target is to meet some particular 
compliance requirement rather than to follow the state of the art in 
security), and that's about it (AuthentiCode uses timestamping but AFAIK 
that's a standard PKCS #7 countersignature and not what TSP does).

So the apparent apathy over hash algorithms could just be a reflection of the 
actual apathy over TSP.

Peter.
_______________________________________________
pkix mailing list
pkix <at> ietf.org
https://www.ietf.org/mailman/listinfo/pkix

Rob Stradling | 1 Jul 2011 11:21
Favicon

Re: rfc3161 TimeStamps and sha1-based sigs/imprints in pkcs7/cms

On Friday 01 Jul 2011 09:44:27 Peter Gutmann wrote:
<snip>
> state of the art in security), and that's about it (AuthentiCode uses
> timestamping but AFAIK that's a standard PKCS #7 countersignature and not
> what TSP does).

The Windows 7 implementation of Authenticode still supports Microsoft's legacy 
PKCS#7 countersignature timestamping [1], but it also introduces support for 
RFC3161 timestamping [2].

Microsoft require all Code Signing CAs in the Microsoft Root Certificate 
Program to "operate a timestamp server authority (TSA) in conjunction with 
their code signing service, and as a best practice request that Subscribers 
timestamp the digital signature after signing their code.  Effective no later 
than October 31, 2011, the TSA must comply with RFC 3161" [3].

[1] http://msdn.microsoft.com/en-us/library/bb931395%28v=vs.85%29.aspx

[2] http://msdn.microsoft.com/en-us/library/aa387764%28v=vs.85%29.aspx
(signtool's "/tr" and "/td" flags)

[3] Sorry, I can't find this requirement stated on any public webpages.

> So the apparent apathy over hash algorithms could just be a reflection of
> the actual apathy over TSP.
> 
> Peter.
> _______________________________________________
> pkix mailing list
> pkix <at> ietf.org
(Continue reading)

denis.pinkas | 1 Jul 2011 13:59
Picon

Re: rfc3161 TimeStamps and sha1-based sigs/imprints in pkcs7/cms

Martin,

You seriously question the security of timestamps with sha1-based signatures.

Formats have been described on how to address this issue in general, i.e. when the hash function becomes weak.

Such formats exist in the context of Advanced Electronic Signatures with the AdES-A format as defined
by ETSI for CAdES and XAdES.

Late 2009, ETSI has defined new ways to sign PDF documents which can contain several time-stamps.
See ETSI TS 102 778-4. In this document, it is explained that TSTs can be used in two cases:
when the document is signed and when the document is unsigned.

Note: In order to capture the content of this document, it may be useful to read parts 1 to 3 as well.

While formats exist, in many cases the way to use these formats is not crystal clear.

Basically, the problem to "renew a time-stamp" does not happen first because the hash function
becomes weak, but because the validity period of the TSU certificate is over.

A new TST must then be used to protect the previous one.

It must then be demonstrated that, at the time the new TST was applied, the certificate of the previous
time-stamp was not revoked with the revocation reason "key compromise".

So the certification path and the revocation information MUST be captured and a new TST
(with a stronger hash function) must be applied.

Do you think it might be useful to draft an Informational RFC to explain such things ?

Denis
 



De :        Martin Rex <mrex <at> sap.com>
A :        peter.sylvester <at> edelweb.fr (Peter Sylvester)
Cc :        pkix <at> ietf.org
Date :        30/06/2011 19:46
Objet :        [pkix] rfc3161 TimeStamps and sha1-based sigs/imprints in pkcs7/cms
Envoyé par :        pkix-bounces <at> ietf.org



Peter Sylvester wrote:
>
> We are sorry for them. This URL has been deprecated
> since years,  a good one can be found reading
>
>      http://timestamping.edelweb.fr
>
> Thanks for your attention and sorry for the inconvenience
> of this message for those who are not interested in timestamping

Speaking of rfc3161 timestamping, most public services seem to
be limited to sha1WithRsaEncryption { 1, 2, 840, 113549, 1, 1, 5 }
which looks like an anachronism and a security problem to me.

Are the proposals or is there a standard how to migrate to
a more resonable signature algorithm such as
sha256WithRsaEncryption { 1, 2, 840, 113549, 1, 1, 11 }

e.g. when the MessageImprint uses SHA256?

While requesting this feature explicitly through a specific
TSA policy OID would theoretically be possible, this very
same approach would be quite non-portable.

The original plan was to _have_completed_ phasing out the use of SHA-1
for digital signatures by the end of 2010, but that target seems to
have been missed entirely.  There is a significant availability of
RSA 2048-bit certificates, but the use of sha256WithRsaEncryption
is still at homeopathic levels.


The purpose of rfc3161 timestamps is to prove that something existed
before or at a certain time, and the two most common uses I can
think of are:

   - determine whether a digital signature was created within
     the validity period of the signer certificate

   - determine whether a digital signature was created before
     the point in time when the signer certificate was revoked

Both these cases, a purposes looking into the future, sometimes
far into the future (think e.g. about signed&timestamped code),
and I seriously question the security of timestamps with
sha1-based signatures (or sha1-based message imprints or the
original, often indirect signatures on the underlying pkcs7/CMS)
for purposes with a useful lifetime of many years into the future.


-Martin

_______________________________________________
pkix mailing list
pkix <at> ietf.org
https://www.ietf.org/mailman/listinfo/pkix

_______________________________________________
pkix mailing list
pkix <at> ietf.org
https://www.ietf.org/mailman/listinfo/pkix
Martin Rex | 2 Jul 2011 02:19
Picon
Favicon

Re: rfc3161 TimeStamps and sha1-based sigs/imprints in pkcs7/cms

denis.pinkas <at> bull.net wrote:
> 
> You seriously question the security of timestamps with sha1-based
> signatures.

Yes.  ;-)

I believe one of the things I'm looking for is sometimes referred
to as "Hash Agility"-- here for rfc3161 TimeStamps, and as a result
interop of such agility between independent implementations
(rfc3161 TSA/Servers and rfc3161 TS-requesting clients).

The information from Rob about the rfc3161 support in Win7
was quite useful -- I didn't know about that  -- thanks, Rob.

I would have assumed that rfc3161 usage scenarios created/shipped
in recent years or that are being planned would require the use of
SHA-2 or better hashes algorithms for message digest purposes
(i.e. the MessageDigest of the timestamped PKCS7/CMS SignedData, the
 MessageDigest of the TimeStampToken SignedData and the HashAlgorithm
 of the MessageImprint within TSTInfo.) or that they would have a
migration plan for switching to SHA-2 or better.

(Timestamped) digital signatures on code should IMHO anticipate useful
validation lifetimes of >10 years.  If there is reason to worry about
the security of SHA-1 for digital signatures, it applies much more to
digital signatures on code, which is expected to still validate OK
in 10 years, than to X.509 certs for online authentication
with a validity of one year.

Also, if you're upping the keylength of your assymetric crypto
(like RSA-1024 -> RSA-2048) it seems awkward to continue using SHA-1
because of the resulting crypto-imbalance.  You take an 8x performance hit
for RSA-2048 over RSA-1024 on RSA crypto operations, but your effective
security level remains unchanged at 80-bit comparable symmetric crypto
strength if you continue to use SHA-1.  That make a move from RSA-1024
to RSA-2048 but no SHA-2 a marketing stunt / security theater that
wastes significant computing resources (on the RSA crypto operations)
for no real security benefit.

Admittedly, it is not clear that SHA-1 is the weakest spot in the
security of the entire system, e.g. http://xkcd.com/538/
but the performance hit when moving from RSA-1024 to RSA-2048 might
be significant enough to deserve considerations of the real benefits/ROI
of an imbalanced crypto algorithm move.

>
> Formats have been described on how to address this issue in general,
> i.e. when the hash function becomes weak.
> 
> Such formats exist in the context of Advanced Electronic Signatures with
> the AdES-A format as defined by ETSI for CAdES and XAdES.
> 
> Basically, the problem to "renew a time-stamp" does not happen first
> because the hash function becomes weak, but because the validity period
> of the TSU certificate is over.

There is a difference between signed+timestamped stuff that I archive
myself and intend to keep as proof (against others) that I can eventually
show as evidence, and signed+timestamped stuff that I want to use to
reassure myself that it is still what I originally recived (or what
the signer originally signed), like signed code / software distributions.

These might be hardware device drivers on installation media accompanying
the hardware or distributed as software updates over the internet, but
also application software (not all software is as "exposed" and as
bugridden as some active content browser-plugin that needs to be
newly redistributed in its entirety once per week).

> 
> A new TST must then be used to protect the previous one.
> 
> It must then be demonstrated that, at the time the new TST was applied,
> the certificate of the previous time-stamp was not revoked with the
> revocation reason "key compromise".

Different to Qualified/Advanded Electronic Signatures where a lot
of constraints are non-technical and subject to legislative regulation,
Software distributors usually have the option to use longer validity
for their TSA cert and they can redistribute newly signed&timestamped
code as an alternative to recursively timestamp old software packages.

For software distribution, the motivation for timestamping is more
likely finer grained damage control, when having to revoke a signing
cert that got compromised.  

-Martin
_______________________________________________
pkix mailing list
pkix <at> ietf.org
https://www.ietf.org/mailman/listinfo/pkix

Erik Andersen | 6 Jul 2011 08:34
Picon

DER encoding of certificates

Hi folks,

 

In contrast to RFC 5280,  X.509 does not require DER encoding. It only requires that the signature is generated across a DER encoded certificate, but the itself certificate may be encoded using BER.

 

Should we add a sentence somewhere in X.509 and possibly in RFC 5280 specifying that when verifying a signature a relying party shall decode and then encode the certificate in DER to verifying the signature?

 

Erik Andersen

Andersen's L-Service

Elsevej 48,

DK-3500 Vaerloese

Denmark

Mobile: +45 2097 1490

e-amail: era <at> x500.eu

Skype: andersen-erik

http://www.x500.eu/

http://www.x500standard.com/

http://dk.linkedin.com/in/andersenerik

 

_______________________________________________
pkix mailing list
pkix <at> ietf.org
https://www.ietf.org/mailman/listinfo/pkix
Carl Wallace | 6 Jul 2011 14:01
Favicon

Re: DER encoding of certificates

No.  For one reason, verifiers may not know how to DER encode some extensions.  It'd be better to require DER or require verification to use toBeSigned bytes as they appear (be they BER or DER).  

From: Erik Andersen <era <at> x500.eu>
Date: Wed, 6 Jul 2011 08:34:39 +0200
To: Directory list <x500standard <at> freelists.org>, SG17-Q11 <t09sg17q11 <at> lists.itu.int>, PKIX <pkix <at> ietf.org>
Subject: [pkix] DER encoding of certificates

Hi folks,

 

In contrast to RFC 5280,  X.509 does not require DER encoding. It only requires that the signature is generated across a DER encoded certificate, but the itself certificate may be encoded using BER.

 

Should we add a sentence somewhere in X.509 and possibly in RFC 5280 specifying that when verifying a signature a relying party shall decode and then encode the certificate in DER to verifying the signature?

 

Erik Andersen

Andersen's L-Service

Elsevej 48,

DK-3500 Vaerloese

Denmark

Mobile: +45 2097 1490

e-amail: era <at> x500.eu

Skype: andersen-erik

http://www.x500.eu/

http://www.x500standard.com/

http://dk.linkedin.com/in/andersenerik

 

_______________________________________________ pkix mailing list pkix <at> ietf.org https://www.ietf.org/mailman/listinfo/pkix
_______________________________________________
pkix mailing list
pkix <at> ietf.org
https://www.ietf.org/mailman/listinfo/pkix
Martin Rex | 6 Jul 2011 15:40
Picon
Favicon

Re: DER encoding of certificates

Carl Wallace wrote:
> 
> No.  For one reason, verifiers may not know how to DER encode some
> extensions.  It'd be better to require DER or require verification to use
> toBeSigned bytes as they appear (be they BER or DER).

Expecting verifiers to parse and re-encode certs before being able
to verify a digital certificate seems like a very bad idea with
respect to performance, reliability and complexity.

The other problem is that there are too many defective ASN.1 encoders
out there, some of them actively used by certificate issuers.
GlobalSign has been distributing a RootCA cert in browsers that
was using incorrect ASN.1 DER -- and that caused verification
failures on some occasions.  IIRC, the bug was in the ASN.1
encoding of the KeyUsage BIT STRING, which is a NamedBitList
(and according to X.690 11.2 + X.680 21.7 tailing 0 bits must
be removed in ASN.1 DER from a NamedBitList during encoding.)

-Martin
_______________________________________________
pkix mailing list
pkix <at> ietf.org
https://www.ietf.org/mailman/listinfo/pkix

Santosh Chokhani | 6 Jul 2011 15:56
Favicon

Re: DER encoding of certificates

Do not need to re-encode.  Always keep the blob around.

-----Original Message-----
From: pkix-bounces <at> ietf.org [mailto:pkix-bounces <at> ietf.org] On Behalf Of Martin Rex
Sent: Wednesday, July 06, 2011 9:40 AM
To: Carl Wallace
Cc: x500standard <at> freelists.org; t09sg17q11 <at> lists.itu.int; pkix <at> ietf.org
Subject: Re: [pkix] DER encoding of certificates

Carl Wallace wrote:
> 
> No.  For one reason, verifiers may not know how to DER encode some
> extensions.  It'd be better to require DER or require verification to use
> toBeSigned bytes as they appear (be they BER or DER).

Expecting verifiers to parse and re-encode certs before being able
to verify a digital certificate seems like a very bad idea with
respect to performance, reliability and complexity.

The other problem is that there are too many defective ASN.1 encoders
out there, some of them actively used by certificate issuers.
GlobalSign has been distributing a RootCA cert in browsers that
was using incorrect ASN.1 DER -- and that caused verification
failures on some occasions.  IIRC, the bug was in the ASN.1
encoding of the KeyUsage BIT STRING, which is a NamedBitList
(and according to X.690 11.2 + X.680 21.7 tailing 0 bits must
be removed in ASN.1 DER from a NamedBitList during encoding.)

-Martin
_______________________________________________
pkix mailing list
pkix <at> ietf.org
https://www.ietf.org/mailman/listinfo/pkix
_______________________________________________
pkix mailing list
pkix <at> ietf.org
https://www.ietf.org/mailman/listinfo/pkix

Peter Rybar | 6 Jul 2011 08:52
Picon

Re: DER encoding of certificates

Erik,

detail information is in ITU-T X.509

RFC 5280 is only a profile for Internet on-line services like TSL/SSL, ...

ITU-T Rec. X.509 (08/2005)
6.1 Digital signatures
The value of the bit string is generated by taking the octets which form the complete encoding (using the ASN.1 Basic Encoding Rules – ITU-T Rec. X.690 (2002) | ISO/IEC 8825-1:2002) of the value of the ToBeEnciphered type and applying an encipherment procedure to those octets.

New certificates for any test or use you can generate in "Utility" tab, "New Key" button.

Peter Rybar

National Security Authority
Information Security and Electronic Signature Department
Budatinska 30, 850 07 Bratislava 57, Slovak Republic
tel.: +421 2 6869 2163
mob.: +421 902 891 155
fax: +421 2 6869 1701
e-mail:
peter.rybar <at> nbusr.sk


2011/7/6 Erik Andersen <era <at> x500.eu>

Hi folks,

 

In contrast to RFC 5280,  X.509 does not require DER encoding. It only requires that the signature is generated across a DER encoded certificate, but the itself certificate may be encoded using BER.

 

Should we add a sentence somewhere in X.509 and possibly in RFC 5280 specifying that when verifying a signature a relying party shall decode and then encode the certificate in DER to verifying the signature?

 

Erik Andersen

Andersen's L-Service

Elsevej 48,

DK-3500 Vaerloese

Denmark

Mobile: +45 2097 1490

e-amail: era <at> x500.eu

Skype: andersen-erik

http://www.x500.eu/

http://www.x500standard.com/

http://dk.linkedin.com/in/andersenerik

 


_______________________________________________
pkix mailing list
pkix <at> ietf.org
https://www.ietf.org/mailman/listinfo/pkix


_______________________________________________
pkix mailing list
pkix <at> ietf.org
https://www.ietf.org/mailman/listinfo/pkix

Gmane