Solved

Using gpg4win to encrypt with batch file

Posted on 2011-03-09
3
3,867 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:
Tolomir 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:Tolomir
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
I need to purchase BitCoins 4 126
Secure mobile phones 7 152
Best practice for ssh keys exchange : 1-way (& which way) or 2-ways 3 82
Corrupt / Encrypted Word Documents 6 86
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…
Worried about if Apple can protect your documents, photos, and everything else that gets stored in iCloud? Read on to find out what Apple really uses to make things secure.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 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