The story, The Dialogue of the Sisters [c't magazine, issue 25/1999], describes a variant of the RSA cryptosystem that is suitable for hand calculation. This variant can be selected under Options for the RSA demonstration after a small RSA key has been generated.
In the story "The Dialogue of the Sisters", a simplified version of the RSA algorithm is presented.
Example: As the first step an RSA modulus N>27 has to be generated from two
prime numbers within the dialog
RSA demonstration. N = 13*7 = 91, for which the Euler phi function is
phi(N) = 12*6 = 72.
As public exponent, we choose e=5. This is used to
calculate the secret key d=29.
Once you have generated the RSA parameters within the dialog RSA demonstration, click the button Options for alphabet and number system and then select in the following dialog Options for the RSA demonstration as RSA variant Dialogue of the Sisters. The alphabet is specified as "ABCDEFGHIJKLMNOPQRSTUVWXYZ " (the final space is a part of the alphabet). After pressing the OK button, the options dialog is closed. Now you can enter text within the RSA demonstration dialog.
In our example the message
"THIS IS A CONFIDENTIAL MESSAGE"
is encrypted
and decrypted
Remark 1:
You can see that the numbers of the ciphertext here in the second picture are different from the numbers in the picture before - despite both cipher texts have been created by the same key pair and despite both belong to the same cleartext. The reason is, that each ciphertext was created using different random values of r.
The letters "A, B, C ... Z" and the space " " are coded in numbers:
A ---> 1 | + r * 27 |
B ---> 2 | + r * 27 |
C ---> 3 | + r * 27 |
. . . . . . | |
Z ---> 26 | + r * 27 |
‘ ‘ ---> 27 | + r * 27 |
The number r is a randomly chosen number for each letter and 27 is the number of characters in the alphabet. For example, the numbers m = 2, 29, 56, 83, .... are valid codes for the letter B. Encryption of the coded letters m then proceeds in accordance with the calculation rule
c = c(m) = m^e (mod 91)
Decryption of the encrypted message proceeds in accordance with the formula
m = d(c) = c^d (mod 91) (mod 27)
The second module operation (mod 27) is necessary in order to decode 1 ---> A, 2 ---> B, ..., 27 ---> ‘ ‘.
The difference of this variant compared to the normal RSA algorithm is
Without using the random number r, the ciphertext would only consist of 27 different numbers and the procedure could be attacked by frequency analysis, as ease as mono-alphabetic substitution.
Remark 2:
If you enter non-alphabet characters as input text (e.g. lower case characters are not part of the alphabet specified in the example above), they will not be encrypted.