Endpoint Encryption

 View Only
  • 1.  PGP encryption not working in vb script

    Posted Apr 24, 2014 05:04 PM

    We are using pgp command line version 10.1.0.52 . I am not very familiar with encryption and how keys are working

    We are using pgm to encrypt files going to a financial institution. I need to set up a new encryption / ftp process using a new key provided by the recipient.

    Question 1: The key provided by the recipent is an .asc file. Do I need to decrypt or import in order to use this key or can I use it as is in the ecryption command. I did an import and it gave me a <pgp.xyz.com> should I use this in my encryption instead?

     

    Question 2. When I run the encryption command in a dos it creates an .asc file form a .txt file so it looks like the encryption is working. Does this look correct?

    C:\>pgp --encrypt "C:\Users\Public\Documents\Upgrade\Test.txt" --recipient "
    pgp@xyz.com" --output "C:\Users\Public\Documents\\Test.asc"
    C:\Users\Public\Documents\Test.txt:encrypt (0:output file C:\Users\P
    ublic\Documents\Test.asc)

     

    Question 3. When I put the the commands in a vb script it does not work and no .asc file is created. Could this be that it does not find certain objects that it needs? Does the pgp key need to be in a specif place etc etc

    command = "pgp --import C:\Users\Public\Documents\Recipient.asc"

    command = "pgp --encrypt """ & fromFile & """ --recipient " & """pgp@xyz.com""" & " --output """ &toFile& """"

     

    Thank you for reading this.



  • 2.  RE: PGP encryption not working in vb script

    Posted Apr 25, 2014 12:25 AM

    Hello,

    You will need to import asc file (client's public key) using command below to your PGP command line.

    pgp --import  c:\yourfile.asc

    use command to verify if the import was successful.

    pgp --list-keys

    use the encrypt command from below example to encrypt a file.

    pgp --encrypt "C:\Users\Public\Documents\Upgrade\Test.txt" --recipient "
    pgp@xyz.com" --recipient yourkeyname/address  --output "C:\Users\Public\Documents\Upgrade\Test.txt.pgp" --passpharse yourkeypassphrase

    Use the pgp command line user guide to refer more syntax of encrypt and decrypt command.

    http://www.symantec.com/docs/DOC7066



  • 3.  RE: PGP encryption not working in vb script

    Posted Apr 25, 2014 10:06 AM

    I encrypted the file and did the ftp to client. Client said the file was encrypted but not with the their key, they asked I was able to add their key to my key ring and encrypt with that key.

    in the --recipient portion on the encryption I just used the .asc I got from the client, I guess this was not enough. Do I need to create a new key ring on my side and add the client key to that?

     

    Thank you.



  • 4.  RE: PGP encryption not working in vb script
    Best Answer

    Posted Apr 25, 2014 10:46 PM

    Hello,

    Yes create anew keyring and add/import the clients public key to your keyring and verify it. It will be lot easier for both parties to share encrypted files and decrypt them. also always encrypt to clients public key so that they will be able to decrypt it using their private key.

     



  • 5.  RE: PGP encryption not working in vb script

    Posted Apr 28, 2014 03:17 PM

    Got it working. Thank you.