Hacker News new | ask | show | jobs
by dexen 5054 days ago
> I think this is catastrophically broken because of a known issue of how SHA-2 breaks its input into blocks: when A is aligned to a block boundary, sha(A || B) = f(sha(A), g(B)).

If that's the case, wouldn't it suffice to mix A and B, for example with byte-wise XOR?

  password ::= sha(A XOR B)
1 comments

Though that would be hard to do in a one-line shell script, which was the idea behind the gist.