GPG Encryption Decryption in TIBCO

GNU Privacy Guard (GPG, also GnuPG) is a free encryption software that’s compliant with the OpenPGP (RFC4880) standard. Using GPG you can encrypt (and decrypt) files that contain sensitive data, such as protected health information(PHI) regulated by the Health Insurance Portability and Accountability Act privacy and security rules, etc.

In this tutorial, I am going to explain how to import the certificate using gpg command and then doing encryption and decryption

Step 1: Importing the certificate

for import the certificate using below gpg command

gpg –import /tmp/PGP_Public_Key.gpg
gpg –list-public-keys /home/tibco/.gnupg/pubring.gpg

Step 2: Encryption Decryption Process

For Decryption

  1. create a process that contains external command activity

2. In the input, tab enter the following command

gpg –yes –batch –passphrase=’,[Secret Phrase],
” –output “,[decrypted file path], ” –decrypt “,[path of encryped file])

3. Run the process you will get the decrypted file.

For Encryption

  1. create a process that contains external command activity

2. In the input, tab enter the following command

gpg --output [ouput encrypted file path] --trust-model always --recipient [name] --encrypt [original File]

2. some times the external activity return error code 2 but the command successfully run in the console in that case you need to create a batch script file (.sh) with the above command
and in the command input use bash [sh file path].