我刚才读了一个问题(File containing its own checksum),我有一个跟进问题。
问题是这样的:
Would it be possible to add a MD5-hash as the last 128 bits of a file and have that hash be the MD5-hash of the file itself?
答案是理论上可以使用蛮力。
我现在的问题是:
Can this be done symbolically? Call the 128 added bits [a_0, ..., a_127] and perform the last iteration of the hashing algorithm symbolically. Then the hash [h_0, ..., h_127] would depend on the a:s. Then let a_0 = h_0, a_1 = h_1 etc. If there is no solution, add some padding and try at another position.
我知道校验和的要点是验证文件。这只是理论推理。