Hacker News new | ask | show | jobs
by servowire 4369 days ago
Wouldn't it be possible to forge the SHA1 or a document?
2 comments

Hash extension attack yes, but only if you already have a valid hash and document and wish to add more to the end of your document. This however will change the hash.

I also meant to type SHA2, but it would make no difference since you can still do length extension with it. In fact, you can do length extension with anything that uses Merkle-Damgard.

You should use Sha256. Then, the answer is "No" to both questions.