Solved

Using gpg4win to encrypt with batch file

Posted on 2011-03-09
3
4,036 Views
Last Modified: 2012-05-11
I have an OpenPGP Key Pair that was being used in CuteFTP to encrypt files. I need to automate encrytion of files and to my knowledge, CuteFTP will only encrypt using the GUI interface.

So, after reading some old posts here on EE, I decided to download gpg4Win in hopes to be able first, import
the existing key pair, and then be able to run a batch file to encrypt files.

I attempted to import the key pair into Kleopatra but ran into some issues. Firstly, the .ASC file includes the public key and the private key. Is this a problem for gpg4win?
I'm not sure of this is causing problems for me but when I imported, only the private key was succesfully added. I tried to delete the key and start over however,
I received an error that the public key was not signed.


1. Will I be able to encrypt from a batch file with gpg4Win, barring I import the keys correctly?

2. Should I be able to import this key pair in the current format- both public and private keys together in one .ASC file?

Looking for some insight, I'm new to pgp.

Thanks!
Justin
0
Comment
Question by:blastmasterJUS1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
Rainer Meller earned 500 total points
ID: 35087529
just a heads-up have you checked this manual already:

http://www.gpg4win.org/doc/en/gpg4win-compendium.html

Especially:

10 Importing a public certificate
http://www.gpg4win.org/doc/en/gpg4win-compendium_15.html

18 Signing and encrypting files
http://www.gpg4win.org/doc/en/gpg4win-compendium_24.html

Tolomir
0
 
LVL 27

Expert Comment

by:Rainer Meller
ID: 35087588

For those comfortable with the command line, you can change to the “ Files\GNU\GnuPG”
directory and run: gpg –help
Some quick-start command line tools are:
gpg –gen-key  # This will walk you through key generation
gpg –armor –export-key <key>  # Export a public key in a format that can be e-mailed
gpg –list-keys  # List keys in your key ring
gpg -r <key> -e <file>  # Encrypt a file.
gpg -d <file>  # Decrypt a file
0
 

Author Comment

by:blastmasterJUS1
ID: 35118607
Hey Tolomir. Thanks for the response. Sorry it took so long for me to get back...been busy with more projects!

I have read those sections of the compendium several times but I'm still stumped.

1. can I import the private and public keys into Kleopatra if they are in one ASC file? It looks like this...

-----BEGIN PGP PRIVATE KEY BLOCK-----

Version: FileCrypt eBusiness 3.5
Comment: http://www.veridis.com
 
blah blah blah

-----END PGP PRIVATE KEY BLOCK-----
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: FileCrypt eBusiness 3.5
Comment: http://www.veridis.com

blah blah blah

-----END PGP PUBLIC KEY BLOCK-----



2. Also, how can I sign my public key BEFORE I try to import it into Kleopatra?

Thanks!
Justin
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the encryption capabilities built into Google Apps and how these features can help you meet privacy policy and regulatory compliance, but are not a full solution. Understand and compare the most popular email encryption services for Google A…
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question