Search⌘ K

Project Creation: Part One

Explore how to create a character-level recurrent neural network to decrypt text encoded with the Caesar cipher. Learn to preprocess data by tokenizing characters, padding sequences, and mapping text to integers. This lesson guides you through dataset loading, model design, and preparing input for deep learning text decryption.

Introduction to the project

Now you understand the working of RNNs, and you have also created a project in the previous chapter. In this chapter, we are going to build a model that will decipher the string encrypted with a certain cipher.

What is a cipher?

A cipher is a cryptographic algorithm used to encrypt and decrypt data. In this project, we are going to use the Caesar cipher. It is a mono-alphabetic cipher, wherein each letter of the plaintext is substituted by another letter to form the ciphertext. It is the simplest form of a substitution cipher scheme. This cryptosystem is generally referred to as the Shift cipher. The concept is to replace each alphabet with another alphabet that is ‘shifted’ by some fixed number between 0 and 25.

For example, if we want to encrypt the string hello by a shift of 1 towards left, the ciphertext (encrypted data) will be ifmmp.

Take a small quiz below to check your understanding.

Decipher the text

1.

If we have a right shift of 10, what would be the deciphered text for the input text: “Go kbo vokbxsxq klyed mszrobc”?

A.

We are learning about ciphers

B.

We are learning about the ciphers

C.

You are working with ciphers

D.

None of these


1 / 1

Now that you understand what we are doing, let’s get started.

Download the dataset

The dataset ...