|
|
View previous topic :: View next topic |
Author |
Message |
sgs Guest
|
crc32 |
Posted: Tue Feb 09, 2010 3:45 am |
|
|
Pls help...
I have a crc32 value - 04c11db7.
I want to find out the 32 bit data whose crc32 value is the above.
Thanks in advance. |
|
|
Ttelmah Guest
|
|
Posted: Tue Feb 09, 2010 5:16 am |
|
|
Impossible.
Without knowing the length of the data, there are an infinite number of solutions.
Even with the data length, depending on the length, there will be numerous solutions (rising as the length increases)...
Think of the CRC, as effectively selecting one in 4294967296 possibilities.
Out of the entire number 'line', this represents an infinite number of possibilities. Even if you limit the line to just a 256byte value, you still have over 4E298 possibilities.
Worse, unless you know the exact CRC algorithm used, you have no starting point at all...
Best Wishes |
|
|
Wayne_
Joined: 10 Oct 2007 Posts: 681
|
|
Posted: Tue Feb 09, 2010 5:44 am |
|
|
Sorry Ttelma, I think you missed the bit where he said 32bit value
Anyway, they way I would try it is get a routine to calculate the CRC32 and then write the following code:-
Code: |
int32 num;
for(num = 0; num < 0xFFFFFFFF; num++)
{
if (crc32(num) == 0x04c11db7)
printf("%X", num);
}
|
Not sure how long it would take but you could write a similar routine to run on your PC, may be quicker |
|
|
Ttelmah Guest
|
|
Posted: Tue Feb 09, 2010 6:12 am |
|
|
I did.
But even then, it completely depends on the CRC algorithm used. People talk as if 'CRC32' is a standard. However, there are potentially an almost infinite number of possible CRC32 forms. In common use, there is CRC32 IEEE 802.3, which is used in networking, but there is also CRC32 ISO (HDLC), CRC32 ECMA, A version used in aviation, and the Koopman (rare) and Castagnoli (used in SCSI, and MPEG) forms.
If the CRC algorithm, is 'perfect', for a 32bit number, there would be just one solution, but few are....
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|