Dialog Options for the RSA Demonstration

This dialog can be used to adjust the options for encryption and decryption within the RSA demonstration (see menu path Individual Procedures \ RSA Cryptosystem \ RSA Demonstration).

rsa_demo_8.gif

1. Text Options / Alphabet Options

With the demonstration of the RSA cryptosystem you can encrypt texts using either the ASCII character set or specify your own alphabet. Make your selection by clicking on the appropriate radio button and - in the second case - define the alphabet in the input field underneath.

With RSA encryption and decryption, individual letters are coded in numbers first.

The coding of the default alphabet "<space>ABCDEFGHIJKLMNOPQRSTUVWXYZ" is as follows:

<Space> -> 0
A -> 1
B -> 2
  ....  
Z -> 26

If you remove the blank, then A will be coded with 0.

2. RSA Variant

You can choose between running the standard RSA encryption algorithm and the procedure in the article entitled "Dialogue of the Sisters" (see cīt magazine, 25/99), which is part of this CrypTool package as a PDF document.

3. Block length and method for coding of the message into numbers

Depending on the bit length of the RSA modulus N and the selected alphabet, you can adjust the block length with RSA encryption. The maximum possible block length is entered into the options as default value whenever the modulus or the alphabet changes.

If you have defined the alphabet yourself and the selected block length k is greater than 1, after coding the letters as numbers, as described above, each k of these numbers is coded into a larger number. The coding can be carried out as to be b-adic (where b is the number of letters in the alphabet) or based on a number system (possible number systems are decimal, binary, octal and hexadecimal; the number system can be defined in the same dialog below the block length and this setting is also used for display).

Example:
In this case the alphabet consists of 27 characters (<Blank> = 0, A = 1, ..., Z = 26). If the message "ATTACK AT DAWN" is broken down into blocks of length 2, we obtain the following blocks:

AT # TA # CK # <Blank>A # T<Blank> # DA # WN

Numeric coding of the letters in the message:

01 20 # 20 01 # 03 00 # 01 20 # 00 04 # 01 23 # 14 00

How to generate a new number from the single numbers of a block is determined by the two coding methods "b-adic" and "basic system".

  1. Coding of the two number blocks (length k=2) in accordance with the b-adic formula (every block consists of two letters):

    <letter1>*27^1 + <letter 2> produces the code:

    047 # 541 # 081 # 047 # 004 # 050 # 378

    This code is optimal.

  2. Coding of the number blocks (length k = 2) in accordance with the base system formula (base k = 100):>

    <letter 1>*100^1 + <letter 2> produces the code

    0120 # 2001 # 0300 # 0120 # 0004 # 0123 # 1400

    With this code you can read off the letter coding directly.

Remark:

If the block length is one, which only makes sense if the RSA modulus is short, then both coding methods deliver the same values.