So if we go back to our program now, here, you can see we are using four six year staff in the range
line of the afine cipher, Dumbledore's symbolistic the double multiplied by two, OK.
So in this, if you know that there are almost a length of the finci for the simplest possible integers
for key and the length of a finci for the model, Symbolistic returns as a possible integer for Key
Beevor.
Now to get the entire range of the possible keys, we multiply these values together because we are
multiplying the same value by itself.
We can use the double exponential operator in explanation length in the package of fine for the model
symbol double multiplied two.
Now after that we call the gatekeeper function over here.
If you look at.
And that we have used in our finci for them now to split a single individual into two individuals.
So in this example, we're using a function to get even part of VR testing.
Now, Ricola, the return value of this function call is a couple of the integers, one for A1 and one
for B1.
So here then we are storing the value of the Dupas first integer in A1 by placing it.
That is zero, which is the first of the values.
OK, so for example, if we say a fine site for the model gatekeeper's jarring bracket ATSDR zero,
it evaluates to the tuple of the index.
So 42 to zero, which is divided into 42, the value of the index zero.
So this just gets the key A1 part of the return value and stores that in the variable give and key one
part is ignored because we don't need we want to calculate whether even as valid now for the afine cipher.
And if it does not, the program continues for the next key to trial.
Now to understand how the execution moves back to the start of the loop, you need to learn about the
continuous succumbing to the continuous statement, which is basically using the continual key word
by itself.
And it takes no parameter.
We use a continuous statement inside of a loop, and when a continuous statement executes a program,
execution immediately jumps from the start of the loop for the next iteration.
Now, this also happens when the program execution's reaches the end of the loops block.
What a continuous statement makes the program execution jump back to the start of the loop before it
reaches the end of the loop.
Now look at more about this continuous statement.
Let's go back here in the interactive shell.
And here we would create say, for Ivan in the range, say three.
OK, here we are seeing print command for Ivan.
We are giving here a print see by.
So he'll never get zero by one python to Python.
Now, in this case, the for loop loop through the range object and the value in Iven becomes each integer
from zero, but not including three.
So on each iteration, it will print Python function calls display Python on the screen.
Now contrast that for a loop with the next example, which we will see, except it has a continuous
statement before the print.
So over here we would write down again, say for Iven in range, three remains, same print.
Even here we see continue.
Then we give print.
S. Biton.
OK, and now we end it, so now we get just zero one and two Prender, notice that Bipin never gets
printed because the continual statement causes a problem execution to jump back to the start of the
for loop for the next iteration.
And the execution never reaches the print python line.
The continual statement is often placed inside, and if statements look so that the execution continues
at the beginning of the loop under certain conditions.
Now let us return to our call and see how it uses the continual statement to skip execution, depending
on the key.
So if we go back to our demo in this old school, you have seen that we are using the GCD function in
the Cryptome at one module to determine whether Key even is relatively primed with the symbols set.
Now, recall that two numbers are relatively bright if there is one.
So if GI, A1 and the symbols that size are not relatively prime, the condition on this particular
line is true and the continual statement executes.
Now this causes the program execution to jump back to the start of the loop for the next iteration.
So as a result of this, the program skips the call to the decrypt method Asgeir function if the key
is invalid and continues to try another key until it finds the right one.
Now, when the program finds the right message is decrypted by calling the decrypt message Istria with
the key on the given line over here where we are passing the key and the message.
OK, now, if Silent Mode was set to force the right key messages printed on the screen, but if it
was said to true print, call is skipped.
Next, we use the is English a function over here?
And we check from the other file that the English module to check whether the decrypted message is recognized
as English.
So if a wrong decryption key was used, the decrypted message would look like a random characters and
this is English check would return false.
But if the decrypted message is recognized as readable English, the program displays it to the user.
So we are displaying a snippet of the decrypted message that is recognized as English because is English
check function might mistakenly identify text as English, even though it hasn't found the correct.
So if the user decides that they are indeed the correct description, they can type D or they can press.
And so we are giving those options over here for the user.
Otherwise, the user just press enter to return to the blank screen or string from the input call and
they have find again continues trying merkies not from the indentation of the beginning.
We can see that we have executed the for loop which has completed over here.
When we use this written statement, do this, the for loop is still continuing, so the for loop finishes
and reaches this return line.
Then it has gone through every possible decryption key without finding the correct one.
So at this point, the Hackel a fine function returns the non-value to this signal that it was unsuccessful
attacking the ciphertext.
Now if the program had found the correct execution would have previously returned from the function
I never reached until this written statement over here.
Now, after this written statement, what are we doing?
Is as normal.
We are running the program with the special underscore, underscore name, underscore variable that
will be set to the string mean instead of the program name.
So in this case, we call the main function.
So that is how we conclude the Afine Saiful hacking program.
Thank you very much.