You can try this neat tool: http://reveng.sourceforge.net/readme.htm
SEARCHING FOR CRC MODELS
The most important feature of CRC RevEng is the ability to recover the parameters of a CRC algorithm from a handful of codewords created by that algorithm. In general at least four data points are needed, either as known parameters or as message-CRC pairs. Extra data points help to eliminate false results and to confirm models that are found.
So we have one pair, "sensitivity" == "BC3E3CAE", but at least 4 are needed. Wanna search? ^^
Also made a little crc brute force for FireBug testing:
PHP Code:
function test(from, to, str, compareTo) {
for (var i=from; i<to; i++)
{
// >>>0 basically transforms int to unsigned int
var ret = (crc32_str(str, i)>>>0).toString(16);
if (ret == compareTo) {
console.log("FOUND i", i)
return i;
}
}
console.log("FAILED> done searching for: from", from, "to", to);
}
console.log("just select the code and press ctrl+enter to execute it in FireBug")
console.log("or change 0 to 1 and execute everything with ctrl+enter (nothing selected)")
if (0) test(0, 1000000, "sensitivity", "BC3E3CAE".toLowerCase())
if (0) test(0, 1000000, "sensitivity", "AE3C3EBC".toLowerCase()) // flipped endianess
if (1) test(0, 1000000, "sensitivity", "Fc90af37".toLowerCase()) // crc of "sensitivity", to see if it actually works
function signed_crc_table() {
var c = 0, table = new Array(256);
for(var n =0; n != 256; ++n){
c = n;
c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
table[n] = c;
}
return typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;
}
var T = signed_crc_table();
function crc32_str(str, seed) {
var C = seed ^ -1;
for(var i = 0, L=str.length, c, d; i < L;) {
c = str.charCodeAt(i++);
if(c < 0x80) {
C = (C>>>8) ^ T[(C ^ c)&0xFF];
} else if(c < 0x800) {
C = (C>>>8) ^ T[(C ^ (192|((c>>6)&31)))&0xFF];
C = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF];
} else if(c >= 0xD800 && c < 0xE000) {
c = (c&1023)+64; d = str.charCodeAt(i++)&1023;
C = (C>>>8) ^ T[(C ^ (240|((c>>8)&7)))&0xFF];
C = (C>>>8) ^ T[(C ^ (128|((c>>2)&63)))&0xFF];
C = (C>>>8) ^ T[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];
C = (C>>>8) ^ T[(C ^ (128|(d&63)))&0xFF];
} else {
C = (C>>>8) ^ T[(C ^ (224|((c>>12)&15)))&0xFF];
C = (C>>>8) ^ T[(C ^ (128|((c>>6)&63)))&0xFF];
C = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF];
}
}
return C ^ -1;
}
All 32bit crc algorithms from reveng (reveng.exe -D):
Code:
reveng.exe -c 73656e7369746976697479 -m CRC-32/POSIX
reveng.exe -c 73656e7369746976697479 -m CRC-32/MPEG-2
reveng.exe -c 73656e7369746976697479 -m CRC-32/BZIP2
reveng.exe -c 73656e7369746976697479 -m JAMCRC
reveng.exe -c 73656e7369746976697479 -m CRC-32
reveng.exe -c 73656e7369746976697479 -m CRC-32C
reveng.exe -c 73656e7369746976697479 -m CRC-32Q
reveng.exe -c 73656e7369746976697479 -m CRC-32D
reveng.exe -c 73656e7369746976697479 -m CRC-32/AUTOSAR
Just dumped all, sorted the output in Notepad++ and multiline-edited it for reveng. Can then be dumped into cmd.exe. But all 32 bit hashes are different.