On Sun, 05 Jan 2003 20:47:42 +0100, Ronald Prins <prins@fox-it.com> said: > To make a text for a given CRC32: > > 1. write the text you want to match this CRC > 2. in this text find 32 words you can find a replacement for which does > not change the meaning (eg. I love Holland / I love the Netherlands) 3. > write a program that will brute force thru all the 2^32 different texts > with same meaning to find one which will give you a match 4. run the > program :) Actually, it's easier than that - it's trivially easy to compute exactly what effect your actual changes will have on the CRC32 value and then backtrack. The URLS describe how to do this sort of thing *on the fly* for the TCP checksum (which admittedly isn't a CRC32, but the logic is identical). http://www.ietf.org/rfc/rfc1624.txt (an update to RFC1141) http://www.ietf.org/rfc/rfc1141.txt (on-the-fly updating of the value) http://www.ietf.org/rfc/rfc1073.txt (the definition of the checksum) So let's say you want to modify 20 bytes of data. You take your twenty, and 20 spare scrap bytes (pick a block on the disks's free list or something ;). Take the first byte of original and new data, compute what delta this will create on the CRC, and apply an opposite delta to the first scrap byte. Repeat for bytes 2 through 20. Optimizing to only require 4 scrap bytes is left as an exercise for the reader.. ;) -- Valdis Kletnieks Computer Systems Senior Engineer Virginia Tech
This archive was generated by hypermail 2b30 : Mon Jan 20 2003 - 22:28:50 PST