0
I’m new to programming and I’m working on an RSA encryption algorithm.
The key generation processes, calculations are almost ready... I have an array of bytes that receives the message typed by the user using the GetBytes()
, but I need a way to perform calculations with the bytes stored at each vector position, so I can encrypt and decrypt with the mathematical formulas I have being:
"C" the encrypted message, "M" the typed message encoded in ASCII and "E", "N"
My numeric value keys, getting the formula C = M E mod (N). I’m not able to do calculations with bytes, any idea how to do this? follows an excerpt of the code:
Console.WriteLine("\nDigite um texto para codificar: ");
string str = Console.ReadLine();
Codes = Encoding.UTF8.GetBytes(str);
Present the calculations you are doing and how you are implementing the formula.
– Leandro Angelo
What is the And and the N in its formula?
– CypherPotato