title: CRC checksum of ELF file
body: <p>I need an opinion from somebody who has some experince with assuring file integrity.
  I am trying to protect the integrity of my file with a crc checksum. My primary goal is to make harder bypassing a licence file check (which consist in disassembling the executable and removing a conditional jump).</p>
  
  <p>I came up with the following idea:</p>
  
  <pre><code>unsigned long crc_stored = 4294967295;
  char* text_begin = (char*)0xffffffffffffffff;
  char* text_end = (char*)0xffffffffffffffff;
  
  int main(){
      unsigned long crc = calc_checksum(text_begin, text_end);
      if (crc == crc_stored)
          //file is ok
  }
  </code></pre>
  
  <p>I edit the <code>.data</code> section of the elf binary in the following way: <code>text_begin</code> and <code>text_end</code> will contain the begin and end address of the <code>.text</code> section, and <code>crc_stored</code> the crc checksum of the <code>.text</code> section.</p>
  
  <p>I would like to know whether this is a proper way of doing this, or there are better methods?</p>
  
  <p>Edit: Karoly Horvath has right. Let's say I use the crc check to decrypt some code. I would like to know which is the best way ro checksum protect the executable.
  Olaf also has right. I can use a sha algorithm. The question is the same.</p>
  
  <p>Edit2: please stop saying that any protection can bypassed. I know and I just want to make it harder. Please answer the question if you can.</p>