Verify downloaded file with gnupg: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
(→‎further reading: + Calculate the md5 hash)
 
(One intermediate revision by the same user not shown)
Line 28: Line 28:
* related terms: MD5 or SHA1 Checksum
* related terms: MD5 or SHA1 Checksum


[[Category:Security]]
"Calculate the md5 hash of a string"
* [https://www.php.net/manual/en/function.md5.php PHP: md5 - Manual]
* [https://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html MySQL :: MySQL 5.5 Reference Manual :: 12.13 Encryption and Compression Functions]
 
[[Category:Security]] [[Category:Software]]

Latest revision as of 14:33, 19 July 2019

Way to verify downloaded file with gnupg[edit]

  • Locate the downloaded file at another website:(1)file.tar.gz.sig (GPG security signature) (2)file.tar.gz (3)keys.txt (GPG public keys from the website owner who offered files file.tar.gz.sig & file.tar.gz)
C:\Program Files\GNU\GnuPG\
* gpg.exe
* file.tar.gz.sig                     
* file.tar.gz                         
* keys.txt                            
  • open the console window
    1. cmd > C:\Program Files\GNU\GnuPG>gpg --import keys.txt
    2. cmd > C:\Program Files\GNU\GnuPG>gpg --verify file.tar.gz.sig file.tar.gz

Expected result after executed --verify command:

gpg: Good signature from ...

Troubleshooting[edit]

I met the message "Can't check signature: public key not found" after I executed --verify command

  • Solution: need to import the GPG public keys gpg --import keys.txt

further reading[edit]

"Calculate the md5 hash of a string"