1 - Generate public and private keys. Output keys to separate files;
2 - Read the public key from a file and encrypt a message using it. Output the ciphertext to a file;
3 - Read the secret key and the ciphertext from files, and use the key to decrypt the ciphertext.
A detailed explanation can be found at https://mshcruzresearch.wordpress.com/2016/11/18/io-of-keys-and-ciphertexts-using-helib/