Saturday, October 29, 2011

Signing files in windows

Gpg4win helps users to securely encrypt  and sign  files with the help of encryption and digital signatures in windows platform. Gpg4win is the official GnuPG distribution for Windows .You can download it here.

After installing it you can use GUI to create a key or else use the command prompt to genertae the key.

#gpg --gen-key

This will ask number of options to be filled(name,mail,city code, etc..)After the successful generation, you can export your public key;
#gpg --armor --export  > KEYS
gpg --armor --export ratha > KEYS

This will save your public key at your current directory. Save it safely. You might need to provide your public key when you sign the files.

Now create a checksum file for your file;(You may need to install OpenSSL utility for windows)
(eg: lets use a zip file to be signed)
Change directory path your '' folder location..

#openssl md5  <>

This will create a checksum named "".

Then sign the file;
#gpg --armor --output --detach-sig

Finally verify whether, you have signed the packs without any issue;

#gpg --verify

Output indicates it is a bad signature or good one;
gpg: Signature made 10/29/11 13:08:56 Sri Lanka Standard Time using RSA key ID 125C5F48
gpg: Good signature from "vijayaratha

If you check via the GUI, it will list out available certificates;


  1. Thanks for posting the detail to sign up files in windows. The whole procedure seems to me easy to carry out as per your explanation. I will try to execute the same now.
    electronic signature Microsoft

  2. Another good bit of software (thanks for the GPG4WIN link).