Re: XML signature HMAC truncation authentication bypass

2009-07-28 Thread Jon Callas


On Jul 26, 2009, at 10:31 PM, Peter Gutmann wrote:


Jon Callas j...@callas.org writes:

You are of course correct, Peter, but are you saying that we  
shouldn't do

anything?


Well, I think it's necessary to consider the tradeoffs, if you don't  
know the
other side's capabilities then it's a bit risky to assume that  
they're the

same as yours.


Let's look at it the other way, and suppose that I said that despite  
increases in processor power and distributed password crackers, we  
would leave the iteration count where it was in 1997, because if you  
increase it, it might go to small machines where that would be an  
issue. Consider the tradeoffs. You'd call me daft for refusing to  
protect the majority of people.





You are wrong with this.

*Messages* don't have this property, so long as they were encrypted  
to a

public key. It is unlocking the *key* that has this problem.


The data was encrypted using pre-shared secrets (i.e. packet type 3)  
which

does have this property.

(Don't ask me, I didn't create the requirements, I just got called  
in to help
diagnose the problem, which was that at some point S2K's coming from  
PGP

Desktop were killing their embedded units.  Maybe they were even using
externally-generated private keys or who knows what rather than pre- 
shared
secrets for messages, but whatever it was it was the S2K step that  
was causing

it).


Okay, password-protected files would get it, too. I won't ask why  
you're sending password protected files to an agent. I know you didn't  
design this.




That problem *only* exists when you import a key from a fast client  
into a
slow client. That problem can be fixed either through some smart  
software
(look at the iteration count and if it's higher than you like,  
change it the

next time you use the key), or the user can do it manually.


This doesn't work in a heterogeneous environment where the  
requirements will
be something like messages having to comply with certain parts of  
the OpenPGP
spec, and no more.  Adding riders telling users how to manually  
configure
individual applications doesn't work because end-users will never  
read the

technical spec, or even know that it exists.

I guess we could argue this point endlessly, but I really just  
brought it up
to mention the unintended consequences of a particular design  
decision, and
more generally the dangers of allowing unbounded integer and general  
data
ranges in specs.  Some implementations will enforce sensible limits,  
many
won't (and will fail against fairly trivial attacks because of  
this), and
without any guidance in the spec the ones that do take care to bound  
values
are deemed non-compliant while the vulnerable ones that don't do any  
checking
are deemed compliant.  This is completely backwards for a security  
spec.


Sure, but. I think that unintended consequences is not quite the  
right way to put it. We don't intend to cause slow computers problems,  
but it was an intentional change with well-known upsides and  
downsides. Despite that, the upside seems to outweigh the downside.


This change shipped in September 2006. It's nearly three years old,  
and this would make only the second issue we had with it.


When it shipped, BlackBerries used signed math in computing the  
iteration count, and got it wrong. We made a BlackBerry export tool  
that reset the iteration count. That got fixed in 4.1 of the BB  
software, as I remember it.


So with millions helped and one field problem, it's not bad.

By the way, do you think it's safe to phase out MD5? That will break  
all the PGP 2 users.


Jon




-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to majord...@metzdowd.com


Re: The latest Flash vulnerability and monoculture

2009-07-28 Thread dan

 It would also help quite a bit if we had better encapsulation
 technology. Binary plug-ins for browsers are generally a bad
 idea -- having things like video players in separate processes
 where operating system facilities can be used to cage them more
 effectively would also help to mitigate damage.


I think this is one of those circumstances where
if you can get the criminal to go to the house
next door you've won and that is all the winning
you can do.  That everyone else uses Famous Vendor
Software Latest Version and you don't is your win.

Now it would be entirely ironic if the complexity
of something (think ASN.1) caused a single working
open source version (think ASN.1 compiler) to eclipse
all other versions just because the complexity has
made it too hard to go forward.  As Mike O'Dell used
to say, left to themselves, competent engineers will
deliver the most complex code they can debug.  This
may apply to the world at large.

--dan

-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to majord...@metzdowd.com


Re: XML signature HMAC truncation authentication bypass

2009-07-28 Thread Peter Gutmann
Jon Callas j...@callas.org writes:

Okay, password-protected files would get it, too. I won't ask why you're
sending password protected files to an agent.

They're not technically password-protected files but pre-shared key (PSK)
protected files, where the keys have a high level of entropy (presumably 128
bits, but I don't know the exact figure).  So in this case the S2K isn't
actually necessary because of the choice of password/PSK used.

(Sorry, for non-OpenPGP folks S2K = string to key, a parameterised way of
processing a password, for example by iterated hashing with a salt, into a
key).

By the way, do you think it's safe to phase out MD5? That will break all the
PGP 2 users.

The answer depends on what sort of user base you expect to have to support.  
In my case I disable things that I don't think get used much in betas and see 
if anyone complains.  If no-one does, it remains disabled in the final 
release.  Now if only I could rearrange this process so I didn't have to 
implement support for assorted practically-unused mechanisms in the first 
place...

This is another interesting philosophical debate: What do other people do in 
terms of deprecating obsolete/insecure/little-used mechanisms?  Deprecate by 
stealth?  Flag day?  Support it forever?

Peter.

-
The Cryptography Mailing List
Unsubscribe by sending unsubscribe cryptography to majord...@metzdowd.com