summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--3431709-assignment-3.pdfbin187523 -> 201299 bytes
-rw-r--r--assignments/3-solution.md26
2 files changed, 16 insertions, 10 deletions
diff --git a/3431709-assignment-3.pdf b/3431709-assignment-3.pdf
index e2e4f82..9ae5907 100644
--- a/3431709-assignment-3.pdf
+++ b/3431709-assignment-3.pdf
Binary files differ
diff --git a/assignments/3-solution.md b/assignments/3-solution.md
index 478de5a..3403327 100644
--- a/assignments/3-solution.md
+++ b/assignments/3-solution.md
@@ -109,17 +109,23 @@ Chapter 8:
> 9. Using a Caesar cipher with s = 5, decode the received message RTAJ TZY FY IF
-```plaintext
-| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
-
-Key: s = 5
-
-| F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E |
-
-| Ciphertext | RTAJ TZY FY IFBS |
-| Plaintext | MOVE OUT AT DAWN |
-```
+The following code can be used to decipher the Caesar cipher.
```ruby
!include assignments/3/caesar.rb
```
+
+The plaintext is `MOVE OUT AT DAWN`.
+
+```bash
+$ ruby caesar.rb
+# Caesar Cipher
+
+| --------------- | --------------------------------------------------- |
+| Plain Alphabet | A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z |
+| Cipher Alphabet | F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,A,B,C,D,E |
+| --------------- | --------------------------------------------------- |
+| Key | 5 |
+| Ciphertext | RTAJ TZY FY IFBS |
+| Plaintext | MOVE OUT AT DAWN |
+```