Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I frequently verify the file integrity on my OpenWrt router by hashing the files. I didn't want to use sha256sum, so I decided to use the faster md5sum. Is there anything even faster available?

share|improve this question
1  
Quick question - why do you need to regularly check file integrity? It sounds like there may be a wider issue that is worth solving? –  Rory Alsop Nov 11 '11 at 10:37
    
Are you concerned with accidental damage, truncated files, or potentially malicious attackers? If the latter, you're not going to do much better at this level, but there's quite probably a better way of achieving your overall security goal. So what are you trying to do? –  Gilles Nov 11 '11 at 23:40
    
the problem is: "sometimes ex.: pictures get corrupted [but this is rarely] so that I want to detect the problem before the users see that xy picture file on the router cannot be accessed anymore. :) –  LanceBaynes Nov 12 '11 at 5:38
add comment

2 Answers 2

If you need to guard against malicious damage, then MD5 is the fastest hash which is secure enough (although it does have known weaknesses and so SHA2 is strongly preferred). If you just want to guard against accidental damage, then a CRC checksum will be faster and good enough. The standard cksum utility can be used to calculate this.

share|improve this answer
add comment

I compared Gnu/Linux checksum programs (not including CRC) just a couple months ago and found md5sum to be the fastest. I wouldn't think any of its vulnerabilities would apply in the case you describe.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.