|
@@ -366,9 +366,9 @@ If the keyword is shorter than the cleartext, the Vigenere cipher simply repeats
|
366
|
366
|
|
367
|
367
|
| cleartext | P | R | O | G | R | A | M | | T | H | I | S |
|
368
|
368
|
|-----------------|---|---|---|---|---|---|---|---|---|---|---|---|
|
369
|
|
-| keyword | S | H | O | R | T | S | H | | O | R | T | S |
|
|
369
|
+| keyword | S | H | O | R | T | S | H | O | R | T | S | H |
|
370
|
370
|
|-----------------|---|---|---|---|---|---|---|---|---|---|---|---|
|
371
|
|
-| ciphered text | H | Y | C | X | K | S | T | | H | Y | B | K |
|
|
371
|
+| ciphered text | H | Y | C | X | K | S | T | | K | A | A | Z |
|
372
|
372
|
|
373
|
373
|
|
374
|
374
|
**Figure 6.** Alignment of a cleartext with a shorter keyword and the resulting cipher.
|
|
@@ -440,9 +440,9 @@ In this exercise you will modify the code for the cypher function from Exercise
|
440
|
440
|
|
441
|
441
|
| cleartext | P | R | @ | G | R | * | M | | T | 8 | I | S |
|
442
|
442
|
|-----------------|---|---|---|---|---|---|---|---|---|---|---|---|
|
443
|
|
-| keyword | S | H | O | R | T | S | H | | O | R | T | S |
|
|
443
|
+| keyword | S | H | O | R | T | S | H | O | R | T | S | H |
|
444
|
444
|
|-----------------|---|---|---|---|---|---|---|---|---|---|---|---|
|
445
|
|
-| ciphered text | H | Y | @ | X | K | * | T | | H | 8 | B | K |
|
|
445
|
+| ciphered text | H | Y | @ | X | K | * | T | | K | 8 | A | Z |
|
446
|
446
|
|
447
|
447
|
|
448
|
448
|
**Figure 7.** Example Vignere cipher of the cleartext `“PR@GR*M T8IS”` using the keyword `SHORT”`.
|