CRC32 compensation tools/library

What is it ?

This is a very "raw" version of my CRC32 compensation/collision library/tools. You can use tweakcrc with a file, an offset and a target CRC and it'll patch the file at <offset> so that it has <crc> as a CRC.

I am sorry for the lack of documentation, I retrieved this in some temporary directory and had completely forgotten to release it. I figured I would better put a raw version out, at least for archiving purposes than forget about it again.

This might be the worse piece of code you have ever seen, sorry. It was written in a rush a long time ago with the intent to never re-use it and was then resurected many years later.

The method I developed is explained here (in french).

You can download the archive here. 2011 update: someone needed a quick update to this terrible piece of code, so it's now hosted on Google Code.

-- Julien TINNES

$ dd if=/dev/urandom of=toto bs=1024 count=1024 $ ./tweakcrc -f toto -c 0xDEADBEEF -o 0x100 TweakCRC (C) Julien TINNES Current CRC: 0x9CD6458C Target CRC: 0xDEADBEEF Target offset: 0x100 CRC(0) for length 1048576: 0xA738EA1C Modification vector: 0x6395A0EE New CRC: 0xDEADBEEF