How to encrypt files with PGP keys?

Hello all,
Hope everyone is doing all right.

Encrypting files with RSA keys is pretty easy with Elixir/Erlang, but I couldn’t find out how to do the same using PGP keys (without using CMD).
I have spent a few days trying to do it and I have came across some people suggesting just removing the headers and checksum of the key, to transform it into PEM format, but that doesn’t work. I have also seem a bunch of crypto libs, but none of them work with PGP.

Does anyone know if it’s possible to encrypt files using PGP public keys directly with Elixir/Erlang and not using the CMD?

Thanks! :smiley:

2 Likes

Hi Samuel, did you find a solution to this?

Kind regards :slightly_smiling_face:

Hello @scoop,

Unfortunately not. And the problem with using CMD to do it, is that we don’t have control over the return.
I know there is a way to do it with a C library that we can use with Erlang but I just settled in using CMD.

If there is anything I can help let me know,
All the best,
Samuel

Ok!

I’ll be reverting to this later in the spring I think. Will share any progress! :muscle:t2:

BTW: My use case is to validate PGP signed plaintext.

1 Like