Cryptography Challenge

Cryptography, or cryptology is the practice and study of techniques for secure communication. Cryptography relies on using more or less complex encryption algorithms to encode a readable message (plaintext) into a collection of characters (ciphertext) that is hard to decipher (decode).

For this challenge, we are giving you a piece of Python code used to encrypt a message.

Your first task is to reverse-engineer this code to understand how this encryption algorithm works. Then, your challenge consists of writing a new function called decrypt(), that takes two parameters (a ciphertext and a key) and returns the plaintext corresponding to the given ciphertext.

Decryption Table..

Using your new decrypt() function, decrypt the following messages:

# Ciphertext Key Plaintext?
#1 YFwoJeELOvlDVrOlNBDConouLwhdCC mkIjsYeKsuaGsDbSRJymLJVOaYNQRrgKBSifPOdnCbUleWCbf 4
#2 HNABntvVepMaQSNHyKxQTXZf HVbQXcqJSXfswOAuRBzpefOdfBeylimeqDHDlFc 7
#3 PqKgakYBpfzveAHVrrUgbzpkaMWUcskukxac QfsWpFSrTrwiaQRtSsXesGlrBqv 3
#4 HXelrEed fCxojmVersu Gtehvee NSluGnJ 1
#5 PHcRrveeRUmDnfqMFAnBJvvwyzSDrj tqXhrLRXIegaDLwdInIGCvqelcjzU 5


The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area

Did you like this challenge?

Click on a star to rate it!

Average rating 3.3 / 5. Vote count: 36

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: ,