Solved

Using gpg4win to encrypt with batch file

Posted on 2011-03-09
3
3,373 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
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
Tolomir earned 500 total points
Comment Utility
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:Tolomir
Comment Utility

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
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

As a financial services provider, your business is impacted by two of the strictest federal regulations on record: the Sarbanes-Oxley Act and the Gramm-Leach-Bliley Act. Correctly implementing faxing into your organization to provide secure, real-ti…
Healthcare providers, insurance companies and other covered entities trust eFax Corporate to transmit their most sensitive documents. eFax Corporate can help your organization implement a HIPAA compliant cloud faxing solution.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now