NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page How does CRC/Checksum work?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Reply
 
LinkBack Thread Tools
Old 09-01-2009, 07:21 AM THREAD STARTER               #1 (permalink)
Account Closed
Join Date: Jul 2009
Posts: 13
bonjourvn is an unknown quantity at this point
 



How does CRC/Checksum work?


Say you are developing a program that transmits files or messages. You want to verify the transmission with Checksum. How would you do it? How does CRC/Checksum even work? Is it accurate for verifying files?
bonjourvn is offline   Reply With Quote
Old 09-01-2009, 10:13 AM   #2 (permalink)
NamePros Regular
 
qbert220's Avatar
Join Date: Jul 2007
Location: UK
Posts: 395
qbert220 is a splendid one to beholdqbert220 is a splendid one to beholdqbert220 is a splendid one to beholdqbert220 is a splendid one to beholdqbert220 is a splendid one to beholdqbert220 is a splendid one to beholdqbert220 is a splendid one to behold
 


Protect Our Planet
A checksum is very simple. You just sum all the data. For example, for a byte checksum you add the first byte, the second bye, the third byte ... the last byte. The result is truncated to fit into a byte. Checksums are easy to calculate, but not very effective for detecting corruption.

A CRC relies on a polynomial with special properties. A bit complicated to explain in detail here, but basically it uses bit shift and conditional exclusive OR operations to produce the CRC value. This results in an effective error detection mechanism. CRCs are not secure though. It is possible to someone to tamper with a file in such a way that is results in the same CRC.

A secure hash such as MD5 would provide better protection against intentional tampering. But you would have to send the hash over a secure channel. One way of doing this would be to use a private key to encrypt the hash, then decode with the corresponding public key the other end.
qbert220 is offline   Reply With Quote
Old 09-04-2009, 04:31 AM   #3 (permalink)
New Member
Join Date: Sep 2009
Posts: 4
Hanratty is an unknown quantity at this point
 



CRC is just a hash. If the file encountered an error during transmission, it will almost certainly have the CRC value change. There are a LOT of programs that will compute various hashes of files for you, including some hex editors.

The CRC is not a security thing, just helps insure the file wasn't corrupted during download.
__________________
Listen to Emails
Last edited by Hanratty; 09-20-2009 at 09:29 AM.
Hanratty is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 06:10 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger