RSA and Hill Cipher Calculator
 
 
A calculator to encipher and decipher using the Hill and RSA algorithms.

Start...


 
  1. Select the type of code you want from the tabs at the top of the calculator.
  2. Hill Cipher: Enter the coefficients for the Hill transformation in the cells a,b,c and d in the table. (These should be a table of whole numbers between 0 and 25 with the property that ad-bc is relatively prime to 26.)

    Enciphering: Type either numbers (between 0 and 25) or letters in the cells labelled "plain" and press the "encipher" button.

    Deciphering: Enter numbers in the column labelled "cipher" and press the "decipher" button.

  3. RSA Cipher: Enter the RSA public key or, if known, the RSA private key. (An RSA private key consists of prime numbers p and q together with a number r which is relatively prime to (p-1)(q-1). The corresponding public key is the two numbers pq and r.)

    If only the private key is entered, the public key is calculated and displayed automatically when enciphering/deciphering.

    Enciphering: Enter an unenciphered number in the field "P" and press the "Encipher" button.

    Deciphering: Enter the RSA private key. Enter an enciphered number in the field "C" and press the "Encipher" button.