in reply to Re^2: Calculating corruption
in thread Calculating corruption

You asked how to check if a file is corrupted.

Store a checksum of the encrypted file, best together with the file, maybe appended to the end.

If you meant something different, you may want to try to explain it...

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)

update

btw: Trying to decrypt it should be enough, I'm not aware of any common encryption which can be reversed if corrupted.

Replies are listed 'Best First'.
Re^4: Calculating corruption
by james28909 (Deacon) on Oct 18, 2014 at 21:56 UTC
    but storing a checksum of the encrypted file will be useless wouldnt it? because i am not sure if even the first file will be corrupted. i wouldnt want to generate a hash for a corrupted file to check with. i need to check the first original file for corruption. and like i say, the file cannot be decrypted because the keys to decrypt it are unknown afaik :l

    the next idea i had would be checking it for randomness. an excrypted files should be very low or null on repeating byte characters, shouldnt it? but how do you check a file for byte character randomness, or randomess at all? <.<

      There's no solution to the problem you've described. And I don't loosely mean there's no tractable solution to the problem; I mean there's utterly no solution at all.

      UPDATE:  I just realized someone else has already made this same point elsewhere in the thread.

      If you can't checksum the file right after encryption then better try Dowsing !

      Anyway I expect most encryption methods to detect corruptions by themselves, hence a pretty fruitless discussion.

      Cheers Rolf

      (addicted to the Perl Programming Language and ☆☆☆☆ :)

      PS: Talking about statistics, ignoring users with many trailing digits proofs to be an excellent rule of thumb to avoid "corrupted" (and cryptic) questions.

      Thanks! :)

        the best thing i can do is provide proofs to what i am saying. tomorrow i will compile a list of outcomes on these files. :) and you can judge for yourself