Support Questions
Find answers, ask questions, and share your expertise

NiFi Error DecryptContent using PGP Encryption.

Highlighted

NiFi Error DecryptContent using PGP Encryption.

Super Collaborator

Hi,

We downloaded a file from our vendors AWS S3 which is PGP encrypted and i am trying to Decrypt it using EncryptContent processor. I set the Private Key and Passphase provided by them. But the processor shows a warning on the top left with Private Keyring file is invalid and could not be opened with the Password phrase provided.

am i doing something wrong.? Should i not include -----BEGIN PGP PRIVATE KEY BLOCK----- and -----END PGP PRIVATE KEY BLOCK-----.? i tried removing it and same thing happens.

Attached the screen shots.

Regards,

Sai

80607-capture.jpg

80608-capture1.jpg

7 REPLIES 7
Highlighted

Re: NiFi Error DecryptContent using PGP Encryption.

Explorer

@saikrishna i just tried your scenario, it works properly for me. what i did

1. encrypt a file using commandline using pgp encryption.

2. Added a flow as below

ListFile -> FetchFile->EncryptContent(for decryption) ->PutFile

I got decrypted content.

I got private key with below command, check if this helps. My private key was not readable.

gpg --export-secret-keys <id> >myprivatekey

i tried this command to get private key. This file path you have to add in private keyring file. Also you need to add passphrase.

Highlighted

Re: NiFi Error DecryptContent using PGP Encryption.

Super Collaborator

@ashok.kumar ,

The private key and the passphrase was given to me by the 3rd party vendor.

Can I directly use them in the processor as in the screenshot or Should I use some commands to generate Private Keyring file.?

if so how to do that.?

Regards,

Sai

Highlighted

Re: NiFi Error DecryptContent using PGP Encryption.

Explorer

@Saikrishna, as i see in code private keyring is property in EncryptContent processor is file. So may you please save the content in file and set path in that property.

Highlighted

Re: NiFi Error DecryptContent using PGP Encryption.

Explorer

As i see in ur error snapshot... it states clearly that "...... file is invalid". I think if you pass as file then it will work.

Highlighted

Re: NiFi Error DecryptContent using PGP Encryption.

Super Collaborator

@ashok.kumar , I already tried copying the private key to a file and pointing to that , but see the same error. the processor still shows the same warning.

Highlighted

Re: NiFi Error DecryptContent using PGP Encryption.

Super Collaborator

Hi Experts,

any help here..How do we decrypt PGP encrypted file.?

I have Passphrase and Private Key..are those enough.?

Regards,

Sai

Re: NiFi Error DecryptContent using PGP Encryption.

Super Collaborator

Hi ,

just trying to get some attention from experts..

any idea on how to decrypt PGP file using Passphrase and secrect key (Private Key).

Regards,

Sai