The following does a basic implementation of how an RSA algorithm works.
- Open the code in any IDE or directly run the code how you'd usually run it.
- The input will be the
p
andq
values after which the other Private Key and Public Key components will be printeed along with the private and the public key.- Then the prompt for entering the
message
will appear provide the message The message should the characters from the mentioned characterspace only, mentioned in the program which is hsown below
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ' ', '?', ',', '@', '_', '$', '#', '!']
once you enter the message and press ENTER the program will give you the Ecrypted Data String which will be all nos. and after that it gives you the Decrypted Data String or Original Message.