0% found this document useful (0 votes)
6 views

Cryptography_Solutions

The document provides solutions to various cryptography exercises for a Grade 6 math circle event held from February 11-13, 2025. It includes detailed answers for exercises involving different ciphers such as Caesar, Atbash, Vigenère, and Pigpen, along with explanations of the encryption and decryption processes. Additionally, it features problem set solutions that illustrate the application of these ciphers in practical scenarios.

Uploaded by

Michael
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Cryptography_Solutions

The document provides solutions to various cryptography exercises for a Grade 6 math circle event held from February 11-13, 2025. It includes detailed answers for exercises involving different ciphers such as Caesar, Atbash, Vigenère, and Pigpen, along with explanations of the encryption and decryption processes. Additionally, it features problem set solutions that illustrate the application of these ciphers in practical scenarios.

Uploaded by

Michael
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Grade 6 Math Circles

February 11-13, 2025


Cryptography - Solutions

Exercise Solutions

Exercise 1 Solution
(a) DZGVIOLL NZGS RH KRMP
(b) PIECE OF PI

Exercise 2 Solution
(a) BUBBLEGUM POP (6)

plaintext A B C D E F G H I J K L M
ciphertext G H I J K L M N O P Q R S
plaintext N O P Q R S T U V W X Y Z
ciphertext T U V W X Y Z A B C D E F

Encrypting the plaintext gives the message HAHHRKMAS VUV.


(b) VCMZJ YRJ CVWK KYV SLZCUZEX (17)

plaintext A B C D E F G H I J K L M
ciphertext R S T U V W X Y Z A B C D
plaintext N O P Q R S T U V W X Y Z
ciphertext E F G H I J K L M N O P Q

Decrypting the ciphertext gives the message ELVIS HAS LEFT THE BUILDING.

1
Exercise 3 Solution
The message in plaintext is GOOSE.

Exercise 5 Solution
The most common letter in the ciphertext is the letter P. This suggests that the ciphertext letter
P likely corresponds to the plaintext letter E.

Exercise 6 Solution
Using the Vigenère cipher, the message in ciphertext is YKYGC NNV GUFH.

Exercise 7 Solution
The message in plaintext is BRIGHT IN THE SKY.

Problem Set Solutions

1. Agent Alice and Agent Bob are sitting on a ṗark bench. Alice puts down her newspaper and
leaves the park. Bob pi̇cks up the ṅewspaper, reads the secret message, stands up, and walks
in the opposite direction. On ḣis way out, he tȯsses the newspaper in a recycling bin, without
a second glance.

Evil̇ Eve was watching this scėne unfold from a distance. When the coast is ċlear, she rummages
through the recycling bi̇n and retrieves the paṗer. She flips througḣ the pages but there is only
yesterday’s news; nothing ėlse is written down on any of the pages. The only thing that Eve
can find are tiny holes on the fṙont page.

Agent Alice and Agent Bob are using a cipher we have not yet discussed. What is the name of
this cipher?

Hint: The answer is hidden in the question!

2
Solution:
In the question, certain letters have dots above them. These letters reveal the name of
the cipher!
Agent Alice and Agent Bob are sitting on a ṗark bench. Alice puts down her newspaper
and leaves the park. Bob pi̇cks up the ṅewspaper, reads the secret message, stands up, and
walks in the opposite direction. On ḣis way out, he tȯsses the newspaper in a recycling
bin, without a second glance.
Evil̇ Eve was watching this scėne unfold from a distance. When the coast is ċlear, she
rummages through the recycling bi̇n and retrieves the paṗer. She flips througḣ the pages
but there is only yesterday’s news; nothing ėlse is written down on any of the pages. The
only thing that Eve can find are tiny holes on the f ṙont page.
This is known as the pinhole cipher. Alice poked holes above different letters found in
the front-page article. Bob noted the letters with holes above them in order, which spell
out the secret message that Alice was trying to convey. Besides poking the paper with a
pin, you could also place dots above certain letters.

2. Encrypt and decrypt the following by using the Atbash cipher.

(a) RAINING CATS AND DOGS!


(b) XZMWB XIFHS
(c) Compare and contrast the Atbash and the Caesar cipher.

Solution:
(a) IZRMRMT XZGH ZMW WLTH!
(b) CANDY CRUSH
(c) Answers may vary.

3
For similarities, the Atbash and Caesar ciphers are both substitution ciphers that
involve replacing letters in the alphabet with other letters in the alphabet. In terms
of security, both ciphers are fairly weak and easy to break with the right computer
or a very determined codebreaker.

For differences, the Atbash cipher reverses the alphabet, whereas the Caesar cipher
shifts the alphabet over by a specified amount. The Atbash cipher will always be
the same, whereas there are up to 25 unique shift numbers for the Caesar cipher.

3. Use the Caesar cipher to encrypt or decrypt the following messages using the shift number
provided in parentheses. You can fill out the shift tables provided below to help you.
(a) WILD GOOSE CHASE (7)
plaintext A B C D E F G H I J K L M
ciphertext H
plaintext N O P Q R S T U V W X Y Z
ciphertext
(b) YIXZHQELOK HBV (23)
plaintext A B C D E F G H I J K L M
ciphertext X
plaintext N O P Q R S T U V W X Y Z
ciphertext

Solution:
(a) WILD GOOSE CHASE (7)

plaintext A B C D E F G H I J K L M
ciphertext H I J K L M N O P Q R S T
plaintext N O P Q R S T U V W X Y Z
ciphertext U V W X Y Z A B C D E F G

The final ciphertext will be DPSK NVVZL JOHZL.


(b) YIXZHQELOK HBV (23)

4
plaintext A B C D E F G H I J K L M
ciphertext X Y Z A B C D E F G H I J
plaintext N O P Q R S T U V W X Y Z
ciphertext K L M N O P Q R S T U V W

The original plaintext was BLACKTHORN KEY.

4. Recall the Pigpen cipher:

Encrypt and decrypt the following messages using the Pigpen cipher.

(a) TOMORROW IS A MYSTERY


(b) EUCLID

Solution:
(a) The ciphertext is TOMORROW IS A MYSTERY
(b) The plaintext is EUCLID.

5
5. Use the Vigenère square below to help you encrypt and decrypt the following.

Retrieved from: https://pages.mtu.edu/~shene/NSF-4/Tutorial/VIG/Vig-Base.html

(a) Using the keyword MAGIC, encrypt the message YER A WIZARD, HARRY.
(b) Decrypt the message UI HMGCMHUS ZME VDXPHC using the keyword BUZZ.

Solution:
(a) The ciphertext is KEX I YUZGZF, TAXZA.
(b) The plaintext is TO INFINITY AND BEYOND.

6. Consider the Caesar cipher and the following ciphertext: BWQS XCP.
(a) What would happen if we were to apply a shift number of 26 to the ciphertext?
(b) What would happen if we were to apply a shift number of 30 to the ciphertext?
(c) What would happen if we were to apply a shift number of 4 to the ciphertext?
(d) Challenge: What would happen if were to apply a shift number of 1000 to the ciphertext?

Solution:
(a) With a shift of 26, the ciphertext does not change (still BWQS XCP). Shifting 26 letters
by 26 spaces does not affect it.

6
(b) The first 26 shifts do not change the ciphertext. But the remaining 30 − 26 = 4
shifts will change BWQS XCP into FAUW BGT.
(c) A shift of −4 can be interpreted as a backwards shift of 4 or equivalently as a shift
of 26 − 4 = 22. The ciphertext would then become XSMO TYL.
(d) A shift of 1000 is equivalent to a shift of 12 because of math! With a shift of 12 the
ciphertext becomes NICE JOB!

Solutions to getting this may vary.

One way to get this is to imagine that every time we shift 26 letters, nothing about
the cipher changes. If we divide 1000 by 26 we get 1000 ÷ 26 = 38 with a remainder
of 12. This remainder of 12 is what actually shifts the numbers.

If you didn’t use division you can subtract each and every shift of 26 from 1000 to
ignore them. Our calculations will end up as follows:

1000 − 26 = 974, 974 − 26 = 948, ..., 38 − 26 = 12

7. The message ACE THE DOG LOVES TREATS is encrypted using the Caesar cipher twice. The first
time, a Caesar shift of 5 was used, and the second time, a Caesar shift of 10 was used. What
was the final ciphertext?

Solution: We first encrypt the message using a Caesar shift of 5 to get the message FHJ
YMJ ITL QTAJX YWJFYX. Then, we can apply a Caesar shift of 10 to this message, to get
the final ciphertext PRT IWT SDV ADKTH IGTPIH.
Note: We also could have gotten this by doing a Caesar shift of 15 to the original plaintext.

8. A message was encoded using two ciphers in sequence: the Atbash cipher, followed by a Caesar
shift of 13. Decode the message: MBEKI EZ QYZJIVBMZJ.

Solution: To decode this, we must reverse the encryption process. We first decrypt the
message using a Caeser shift of 13 backwards, to get the message ZORXV RM DLMWVIOZMW.

7
Then, we apply the Atbash cipher to this to get the original plaintext message: ALICE IN
WONDERLAND.

9. A message was encrypted using the Vigenère cipher twice. The first time the keyword POP was
used, and the second time the keyword FISH was used. If the ciphertext after both encryptions
is NDL LBKR EYIRUZEZD, what was the original message in plaintext?

Solution: We start by decrypting the message with the keyword FISH, to get the cipher-
text IVT EWCZ XTAZNUWHW.
Next, we use this output as our new ciphertext and apply the keyword POP to decrypt it
back into plaintext. This gives the original message: THE PINK JELLYFISH

10. Challenge: The message ONCE UPON A TIME was encrypted using four different ciphers in the
following order:
• A Caesar shift of 21 was used.
• The Atbash cipher was applied.
• The Vigenère cipher was used with the keyword STORY.
• The Pigpen cipher was applied.
What was the final ciphertext?

Solution: After applying a Caesar shift of 21, the message becomes JIXZ PKJI V ODHZ.
Using an Atbash cipher on this, gives: QRCA KPQR E LWSA.
Then, we apply the Vigenère cipher with the keyword STORY to get: IKQR IHJF V JOLO.
Finally, we translate this using the Pigpen cipher to get: IKQR IHJF V JOLO

8
11. Decrypt the following ciphers to fill in the crossword puzzle. The keyword and shift number
for the Vigenère and Caesar ciphers is given in parenthesis.

9
Solution:

12. Challenge: A plaintext was encrypted with a Caesar cipher, resulting in the following:

RCCJ NVCC KYRK VEUJ NVCC

What was the original plaintext?

Solution: One way of decoding this is through brute force! Trying all the possible Caesar
shifts would eventually reveal the plaintext: ALLS WELL THAT ENDS WELL.
Another way of figuring this out is by trying different combinations of double letters. The

10
most common double letters in the English language are SS, LL, EE, FF, TT, MM and
OO.
Instead of trying all possible Caesar shifts, you can focus on the shifts that change the
double letter CC into one of these common double letters listed above.
This would reveal that the CC in the ciphertext corresponds to LL in plaintext. This means
that a Caesar shift of 9 was used. Decrypting the rest of the message with a shift of 9
gives the plaintext: ALLS WELL THAT ENDS WELL.

11

You might also like