I know that it generates a public key and then a private key. You encrypt with public and can only decrypt with private key.
How is this algoritm going to work in a C++ program, how am i going to compute the public key and then the private key?
Also, once i have the keys. Do i xor the line to encrypt it or add or minus the key with the character value eg:
xor
===
for(int i = 0; i < LineFromFile.size(); i++)
{
encryptedLine = LineFromFile[i] ^ publickey[i];
}
LineFromFile is a line readed from a .txt file (the data that needs to be encrypted)
Or how do i do this?