Encrypt and Decrypt TxT file

I have requirement to exchange text files between a partner by encrypting the file while sending and decrypt the received file.
The better way know is use of https
Now the question is

  1. how to setup with the Security Certificate on both ends
  2. Also please provide the Step by step Flow steps to be used to build the package for this.
    Iam completely new to this https and CA

Thanks in advance
Vinod