Command line file encryption


Although I have programmed fro many years, I have never had the need to use cryptography… until now.

I need to produce a text based file, then encrypt it using our private key and our suppliers public key. This will enable them to ensure the providence of the file and decrypt it with their own private key.

The supplier has sent me their public key which is a RSA 4096/4096 SHA-2 256 key.

My question is: Can I use gpg4win from within my program (written in C#) to accomplish this task?

I’m not sure how to encrypt a document with public and private keys, any pointers would be greatfully received.