ok i've seen a lot posts about crc32, file crc's etc...
so what exacly is that, for what is it used and what can i do with that
Posted on 2002-08-04 21:32:08 by Mikky
First two letters are for Cyclic and Redundancy/Redundant. There's been quite some debate what the last C is for... pick one of the following: checksum,check,code. I prefer 'checksum' when talking about "the CRC of a file/pieceOfData/whatever".

Basically the idea of a CRC is to produce a unique fixed-size identifier for an arbitrarily sized data block, usually used to detect data corruption. There's also ECC, which additionally does error correction.

If you want to make sure data hasn't been tampered with (data corruption: incorrectly transmitted file. Data tampering: evil cracker), better use a secure hash like MD5 of SHA instead of relying on simple CRC.
Posted on 2002-08-04 21:42:11 by f0dder
CRCs are mainly intended to detect data transmission errors. Thus you'll find them used in "gapless" serial interfaces such as USB and Ethernet. Reading from a disk is a serial transmission, so you'll find CRCs recorded on disks as well. In addition to being more robust than a simple checksum, CRCs are easier to implement in hardware, and it can handle bit strings of any length. As an example of the last feature, USB implements, for two types of packets, a 5-bit CRC to check 11-bits of data.
Posted on 2002-08-05 18:06:27 by tenkey
ok so for example if server on internet sends an file to client
he is sending him CRC too right?
so client can determine if everything is ok with recived file
thats ok but what if CRC is corrupted in transmision?

also i saw a lot of posts about PE file CRC
what is this CRC used for?
is it for PE loader or somthing else?
Posted on 2002-08-05 18:56:57 by Mikky
afaik, neither ftp nor http has checksums built into the protocol - however, UDP (and thus TCP) has.

PE checksums are used for NT drivers so the system doesn't execute corrupt drivers (corrupt ring0 code = bad). The checksums are ignored for normal PEs (I still tend to set the checksum though, mostly for fun). Signed drivers don't depend on the checksum btw, iirc they use a cryptographic signing methods (ie, you can't sign drivers but have to send them to microsoft - and yes, this makes sense.)
Posted on 2002-08-05 19:08:39 by f0dder
Ethernet uses CRC :)
Posted on 2002-08-05 19:39:14 by comrade
If a CRC is invalid (it can be corrupt data or a corrupt CRC), the data packet is rejected and the sender must resend it. The protocol will specify how the sender detects data rejection, and how to handle rejections.
Posted on 2002-08-05 20:10:20 by tenkey