add SHA1 to document

e24ohme24ohm Member Posts: 151
I am not sure if this can be done, but i was downloading Fedora 10 the other night, and needed to authn. the SHA1 sum hash.

It made me think. Is there a way to add a SHA1 sum hash to a .pdf or .doc to show the authenticity?
Utini!

Comments

  • dynamikdynamik Banned Posts: 12,312 ■■■■■■■■■□
    You can generate a sha1 hash with the sha1sum <filename> command.
  • e24ohme24ohm Member Posts: 151
    dynamik wrote:
    You can generate a sha1 hash with the sha1sum <filename> command.
    thanks dynamik, going to check this out once i get Fedora installed. hoping to do my Linux+ from comptia.
    Utini!
  • JDMurrayJDMurray Admin Posts: 13,078 Admin
    You're downloading the ISO to a Windows system? There are several Windows programs that will allow you to calculate the CRC-32, MD5, or SHA1 of a file using the right-click menu. I use HashCalc from SlavaSoft.
  • e24ohme24ohm Member Posts: 151
    JDMurray wrote:
    You're downloading the ISO to a Windows system? There are several Windows programs that will allow you to calculate the CRC-32, MD5, or SHA1 of a file using the right-click menu. I use HashCalc from SlavaSoft.
    JDMurray, i have already downloaded "hashcalc", which i used to check my .iso files, but this process got me thinking about, "how can i do the same for .pdf and .doc or .odt files". Thank you for the suggestions.
    Utini!
  • JDMurrayJDMurray Admin Posts: 13,078 Admin
    Well, the author of the .doc, .pdf, etc. file would need to create the file's hash and include it in a separate file (or in a digital envelope) when the file is distributed. It's actually easier to store (no compression) the original file in a ZIP or RAR archive file and have the CRC-32 calculated when the file is added/modified and extracted.
  • e24ohme24ohm Member Posts: 151
    JDMurray wrote:
    actually easier to store (no compression) the original file in a ZIP or RAR archive file and have the CRC-32 calculated when the file is added/modified and extracted.
    Mate, you lost me on this one, not sure what you are talking about, when you mention CRC-32. I am going wikipedia this, but can you please tell me more? This sounds very exciting.

    Cheers
    Utini!
  • JDMurrayJDMurray Admin Posts: 13,078 Admin
    Most file archiving programs (e.g., WinZIP, WinRar, gzip) perform a CRC or hash calculation on each file added to an archive. When the file is extracted (or the archive tested), the hash value is recalculated and compared to the stored hash value. If the values are different the file (or archive itself) is considered to be corrupted (damaged).

    File hashing can only determine if a file has changed, but it cannot indicate how the file has changed or by whom it was changed.
Sign In or Register to comment.