Private and public key encryption

Hi,

we have private and public key, encrypt file using public and want to decrypt using private key. can you please advise below commands are correct or other remedy if unix have?

encrypt -a arcfour -k publickey.asc -i TESTFILE.csv -o TESTFILE00.csv


decrypt -a arcfour -k privatekey.asc -i TESTFILE55.csv -o TESTFILE66.csv

Regards,

Hello rizwan.shaukat,

I have a few to questions pose in response first:-

  • Is this homework/assignment? There are specific forums for these.
  • What have you tried so far?
  • What output/errors do you get?
  • What OS and version are you using?

Most importantly, What have you tried so far?

Robin

SunOS usoradb2d 5.10 Generic_150400-40 sun4v sparc sun4v

i have file TESTFILE.csv, i try to encrypt file using below command and public key. It encrypted

encrypt -a arcfour -k publickey.asc -i TESTFILE.csv -o TESTFILE00.csv

than i am using private key to decrypt

decrypt -a arcfour -k privatekey.asc -i TESTFILE55.csv -o TESTFILE66.csv

it's not working, if I am using same publickey.asc then decryption happens

Regards,