Welcome to the first session in our python hacking advanced level course in this session, forced,
we would write such a program to narrow down the list of potential decryption outputs to the right one
for topics covered in this session would be over patterns.
Candidates, potential decryption letters, letters, cipher mappings, regular expressions, subject
matter.
So now let's come to first using the word Partons to decrypt.
Now, in brute force attack, we try each possible to check whether it can be krip the ciphertext.
If the key is correct, decryption result in a readable English.
But by analyzing the ciphertext first, we can reduce the number of possible keys to try and maybe even
find a full or partial key.
So let's assume the original plaintext consists mostly of vowels in an English dictionary file like
one we use in the earlier sessions.
Although a cipher text won't be made up of real English words, it will still contain a group of letters
broken up by spaces just like votes in a regular sentence.
So we'll call this as a cipher vote, for example.
And in a substitution cipher, every letter of the alphabet has exactly one unique corresponding encryption.
Let them now.
We will call that letter in the ciphertext as a cipher letters not because each plaintext letters can
encrypt to only one side four letter.
We are not encrypting spaces in this version.
The plaintext and ciphertext will share the same word, but does not.
For example, say we have a plain text like C
Mississippi and still now the corresponding ciphertext would look something like, say, R.G. B, B,
G, BCBG X, x, g, b, x, space b, x, g, h, for example.
Now the number of letters in the first vote of the plaintext and the forced cipher board are saying,
look at this, it's one, two, three, four, five, six, seven, eight, nine, ten, eleven.
Look at this.
One, two, three, four, five, six, seven, eight, nine, ten, eleven.
OK, so we have made here, I think, a mistake.
This one, it's like this the one, two, three, four, five, six, seven, eight, nine, ten, eleven.
Now, the same is true for the second plaintext also.
So if you look at this, it's one, two, three, four, five.
And this one also has five.
So the plaintext and the ciphertext share the same pattern of letters and spaces.
Also notice that letters that repeat in the plaintext repeat the same number of times in the same place
in ciphertext.
Also like here, if we are building here, beebees repeating here, if we are repeating BP here, X-axis
repeating here we are repeating l so you're just repeating.
So we would therefore assume that a cipher word corresponds to a word in the English dictionary file
and that word patterns would match.
Then we can find which word in the dictionary decipher what decrypts do we can figure out the description
of each cipher letter in that war.
And if we figure out enough cipher letter decryption using this technique, we may be able to give the
entire message.
So now let's come to understand the finding work patterns.
Now let's examine the whole pattern of design for word.
For example, the Etch A Sketch, you, for example, now you can see that decipher what has certain
characteristics which the original plaintext word must share, what words must have the following things
in common.
One is they should be five letters long for third and fourth letters should be same because here we
have h h h.
Right.
They should have exactly three different letters.
That is, it should be replaced by one little G should be replaced by one letter.
You should be replaced by one little.
So now in this particular pattern, you may have votes, for example, like, say, a puppy or you may
have your here you can see forced our repeating third and fourth.
Then there are only three characters that be one.
Right.
And there are also in the same pattern.
So be for the first, say third and fourth, and you for the second and for the first one.
Similarly, you may have another word likes it, mommy, or for that case, Bobbit or C naanu with these
all fits in the same pattern.
So these words along with others in the English dictionary that matches the criteria, are all the possible
descriptions for this particular word.
Now, to represent a vocal proponent of that program can understand will make each partner into a set
of numbers separated by if that is not, that indicates the pattern of the letters not creating what
pattern is easy.
False letter gets a number zero and the first occurrence of each different letter thereafter gets the
next number.
So, for example, the word patency over here, if you're I don't know what that would be says is zero,
not one, but two.
So over here and same we say if we have version, say, for example, classification, which is a lower
level here, we may have something like Zettl.
One, two, three, four, five.
Then again, let's have your say four zero two six four seven eight.
Now, in this case, in the simple substitution cipher, no matter which keys used to encrypt a plaintext,
what an insightful would always have the same word pattern.
So the word pattern for ciphertext over here that we have used will come to something like zero, then
one, then again, zero zero.
And next is two, which means the word pattern for a plain text corresponding to this will be equal
to also zero one zero zero two.
Now, moving to finding the potential decryption letters now to decrypt this, what we need to find
all the words in an English dictionary whose work pattern is this, that we have this great civil call,
the plain text word that have the same word pattern as a cipher Wolf.
The candidates in this particular session just to understand.
So here's a list of all the candidates available for this in which we have calculated this puppy, mommy
will be our nanny.
Now, using the word patterns, we can guess which plaintext little cipher letters might decrypt them,
which will call as a potential decryption letters.
Now to crack a message encrypted with a simple substitution cipher.
We need to find all the potential decryption letters first of each word in the message and determine
the actual decryption letter through the process of elimination.