Reverse CRC file generation (is it possible?)
This is something I know a little about, but not alot, so I figured I'd ask in the meantime (while I do some research). Anyways, onto the question... is it possible given a known file size and specific 32bit CRC, to generate the associated file?
Boy, wouldn't that be nice. But no, it isn't possible. Logically, a 32-bit CRC can only store 32 bits of information, and would be unsuitable for restoring an arbitrary file that was more than 32 bits long.
No.
A CRC value is 32bit (4 bytes), therefore there are 4294967296 possible states.
A 5 byte file has 1099511627776 possible states.
Therefore you should realize that it is impossible for all 1099511627776 states to be uniquely expressed within a variable that has a maximum of 4294967296 states.
A CRC value is 32bit (4 bytes), therefore there are 4294967296 possible states.
A 5 byte file has 1099511627776 possible states.
Therefore you should realize that it is impossible for all 1099511627776 states to be uniquely expressed within a variable that has a maximum of 4294967296 states.
[wow] If we could "decompress" a file from just the
32-bit CRC, wouldn't that be great?
That's, like, the best compression algorithm, ever! [evil]
32-bit CRC, wouldn't that be great?
That's, like, the best compression algorithm, ever! [evil]
Wow. Then you could have thousands of games in just a floppy. Millions on a CD. And infinite on a DVD. And more than infinite today's harddrives. XD
Okay, I understand that. Just to clear up one other thing though, I would assume that given this information, conversely there may then be several "different" files (of the same size) which all have the same CRC value?
Quote:Original post by Xorcist
Okay, I understand that. Just to clear up one other thing though, I would assume that given this information, conversely there may then be several "different" files (of the same size) which all have the same CRC value?
I *guess* it's possible, but very rare. At least, no in the same place. So you seldom will see two mp3 files with the same CRC.
I GUESS.
[edit: have to correct what I mean. I'm saying two files that come with one package.]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement