I am trying to implement the RSA algorithm with java.
I understand the mathematical algorithm , what I do not understand is how to convert a message of string to cipher text of big integer.
- Do I encrypt and decrypt all message or cipher text as one huge integer?
- how do I convert string to integer and integer to string?
I believe the typical way is to convert a string to a byte array ( Why does byteArray have a length of 22 instead of 20? ) and then turn the byte array into the numeric type that you want ( Convert a byte array to integer in java and vice versa ), i.e. int,long,double,…