Re: CRC32 on ELF in C problem
From: Randy Howard (randyhoward_at_FOOverizonBAR.net)
Date: 07/27/04
- Next message: Thomas Gagne: "Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP and memory management"
- Previous message: Phlip: "Re: Rework [Was: Static vs. Dynamic typing...]"
- In reply to: Kevin: "CRC32 on ELF in C problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Jul 2004 23:08:25 GMT
In article <8ac337d1.0407260654.1b230dfd@posting.google.com>, kevin@netkev.com
says...
> I need to calculate the checksum of certain sections in an ELF binary
> file. I'm able to parse through to the program header table and then
> find the section header table and then find the correct sections using
> the section header string table. Using this method, I am able to find
> the
> offset to the .text section and the number of bytes for the range of
> sections i need to calculate the checksum for.
Others have already pointed out in c.l.c and here various things about
your code. I wanted to bring up a slightly different matter, namely
that a 32-bit CRC is not necessarily guaranteed to be useful for
verifying that a program has not been modified, particularly if the
binary is quite large. There are better methods by far, especially
for larger files, which have much less likelihood of false positives
with multi-bit/byte corruptions.
Examples include md5 and sha-1, for example, which have far better
ability to detect corruption than CRC-32 or its brethren.
-- Randy Howard To reply, remove FOOBAR.
- Next message: Thomas Gagne: "Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP and memory management"
- Previous message: Phlip: "Re: Rework [Was: Static vs. Dynamic typing...]"
- In reply to: Kevin: "CRC32 on ELF in C problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|