From a quick read of the Wikipedia entry, and some of the references, it seems that increasing the hash output size actually causes a Rainbow table to become _more_ effective, not less. Seems that collisions play havoc with Rainbow tables, though there are modern techniques that reduce the chance of a collision actually being a problem.
And collisions aren't really a big problem for most passwords given a modern hashing algorithm. Most user-chosen passwords would fit into upper and lower case alpha, plus numbers, assume a length of 10 characters. There's only 59 bits of total keyspace there, well below the 160-bit keyspace of sha-1, making the chance of a collision neglible, even if sha-1 deteriorates to something smaller. To even start to see collisions, you need to be dealing with full-keyboard character sets, and password lengths up around 22 characters, _and_ they have to have not reduced entropy by including words.
This means that collisions weren't a problem to start with, so going to sha-256 is fixing part of the problem that isn't broken. It is nice to use hashing algorithms that are recommended by NIST, the EU, etc, so there is some value in using sha-256, but it doesn't help protect the password at all.
Oddly enough, a really bad hash can be of some benefit if you're attempting to protect the password. If you have a lot of collisions, you may find _a_ password that works, but perhaps not _the_ password that we started with.
Another aspect of the hash length problem is to consider this - a sha-256 hash might be around 2-4x slower to compute than a sha-1 hash. A single hash brute-force attack can get up around 100 million cracks/second. This means an 8-character all lower case password would fall in 15 minutes on average, 30 minutes max. If you can drive down the cracks/sec by using an iterated hash, you can remove much of the attacker's ability to run computations in parallel, and get the crack rate down to around 10,000 hashes/second. This would hold up for an average of 120 days. Add in sufficient salt, and you remove the Rainbow table attack as well.
My recommendation is to use a real key derivation function to create a password verifier. It can be a bit of a problem to deal with versioning - if you change this, then an older version of the software obviously cannot verify the password. However, due to the severity of disclosing passwords, I'd tend to recommend against implementing a feature that exposes passwords in that manner.
Just how widespread is this past usage? I do not recall seeing it in the v1.1 spec, but I may have missed it. If this is something new to this version, I'd strongly recommend doing it right, even if there are existing implementations.
________________________________________
From: David LeBlanc [dleblanc@exchange.microsoft.com]
Sent: Saturday, October 30, 2010 2:57 PM
To: dennis.hamilton@acm.org; 'ODF TC List'
Subject: RE: [office] The problem of visible hashes for protection keys
I don't believe increasing the length of the hash significantly helps a rainbow table attack.
I'll ask some of the cryptographers and find out.
Dennis is quite correct that it isn't what the password protects, but the password itself that is of value.
Sent from my phone, but I might be verbose - I have a keyboard...
Original Message-----
From: Dennis E. Hamilton