Run of the Exercise
You get a ciphertext resulting from the operation of the RSA algorithm on the plaintext, the content of which you are to restore. You also get some data on the basis of which you define the necessary parameters for the cipher service.
Following steps:
- Remember the year of the battle between the troops of the Polish king Ladislaus the Short (or “Elbow-high” and the Teutonic Order in the 14th century. Mark it as R.
- Determine in the table below the leftmost prime to R and consider it as p.
Table of 300 initial prime numbers
- The number q is predetermined and has the value 3.
- Find the modulus n = pq.
- Find the totient j(n).
- Assume that e = 5 (part of the public key).
- Find d so that de º 1 (mod j(n)) (part of the private key).
- Calculate – where n is a modular number, and N = 16 (the length of the alphabet narrowed down to letters from A to P). The numbers k and k + 1 have the following meanings:
k+1 – length of the block being decrypted simultaneously (= number of letters in the ciphertext being decrypted at once).
k – number of letters in the plaintext block after decryption.
Use the programs included with Homework 3 to calculate modular powers and inversions. Their Excel worksheets are shown below.
Examplary report on Exercise 4
My numerical data
Y – year of the battle | Alphabet length N | Modulus n | Totient j(n) | k – the length of plaintext block | Public key e | Private key de º 1 (mod j(n)) |
? put proper value | ? put proper value | ? put proper value | ? put proper value | ? put proper value | ? put proper value | ? put proper value |
My cryptographic data
Plaintext to be encrypted | people |
k – element blocks of ciphertext letters (separated by space or | ) | pe op le |
Decimal values of every plaintext block (separated by space or | ) | 244 239 180 |
ci – decimal ciphertext value of every block (separated by space or | ) | 3301 3158 483 |
Conversion dec. to hex.2) (separated by space or | ) | CE5 C56 1E3 |
Corresponding letters from the table1) in hex. system (separated by space or | ) | mof mfg apd |
Ciphertext letter by letter | m | o | f | m | f | g | a | p | d |
1) alphabet S character table
Dec | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Hex | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
S | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p |
2) link for quick conversion any ↔ any (especially hex ↔ dec)
Individual data can be found on the next page.
Report on Exercise 4
My numerical data
Y – year of the battle | Alphabet length N | Modulus n | Totient j(n) | k – the length of plaintext block | Public key e | Private key de º 1 (mod j(n)) |
My cryptographic data
Plaintext to be encrypted | |
k – element blocks of ciphertext letters (separated by space or | ) | |
Decimal values of every plaintext block (separated by space or | ) | |
c – decimal ciphertext value of every block (separated by space or | ) | |
Conversion dec. to hex.2) (separated by space or | ) | |
Corresponding letters from the table1) in hex. System (separated by space or | ) |
Ciphertext letter by letter |
1) alphabet S character table
Dec | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Hex | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
S | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p |
2) link for quick conversion any ↔ any (especially hex ↔ dec)
Individual data can be found on the next page.