Need java class to decrypt gpg files using a given PGP PRIVATE KEY. -- 3

Job ID: 34089157

Budget: €30 – €250 EUR

Hi,

CONTEXT
----------------
I have downloaded multiple gpg-encrypted files and I have the pgp private key asc file to decrypt them.
Using command line gpg.exe works fine on my local machine.
But on target deployment machine, I am not allowed to install that exe.
So the architects have come up with using java and the libraries of bouncy castle to perform the decryption.
However, after reading the docs, googling and digging on stackoverflow, I cannot get it work.

REQUIREMENTS
---------------------------
- create java class (can be a jar file) called PGPDecryptor taking 2 arguments :
1) full path to an encrypted.gpg file
2) full path to the pgp private key asc file

- the output is a decoded file
in the same folder as the input file
whose name is same as input file but without .gpg extension.

Example of running the class : java PGPDecryptor "c:\in\file.zip.gpg" "c:\in\myPrivateKey.asc"

and the result will be a file "c:\in\file.zip"


DELIVERABLES
------------
I don't need a solution based on os Runtime/Process class but a pure java code. Alternative of Bouncy Castle libraries can be considered.

As a validation I expect you to deliver a class (or jar) file and full instructions to run the program.
I will test it with my private key and a file on my local machine.
Once validated, you will deliver the java source file as well. The code should be well documented in English with meaningful variables and method names.
Use OutputStream as a result and FileInputStream for internal processing even though input arguments are String
Please also bear performance in mind.

This is a simple task for someone with knowledge of Bouncy Castle libraries: the code should be less than 100-150 lines.
I am not providing my private key: you should be able to generate public/private key pair using regular gpg executable for your tests.

I am emphasizing that I don't have the public key or any password: just a private key.


Expected target delivery is 15 July 2022 and budget is 50 USD max

Happy coding !