by bzbarsky · 11y ago · 0 comments
In fact, we're having a rather heated discussion on the security-dev@chromium.org mailing list right now, if anyone wants to follow along: https://groups.google.com/a/chromium.org/forum/#!topic/secur...
I am not very familiar with hashing algorithms, but why isn't the length of the content specified in the `integrity` attribute? Wouldn't it help avoid length extension attacks?
The known MD5 collision attack needs to modify the length of the message; finding a collision with the same length is extremely difficult. It would be reasonable to assume that attacks on other hashing algorithms would suffer the same constraint.
Wouldn't having the length specified in the integrity attribute help reduce chances of a future attack? The cost of specifying the length is negligible; about 12 bytes for a base-64 encoded 64-bit unsigned int.