Lesson finished
Up next: Symmetric Key Cryptography: Shared Keys and Stream Cipher Basics
Unlock all 22 lessons of Cryptography Basics & ImplementationFull course ₹40,000 · paid
Caesar Cipher, Playfair Cipher and Matrix Math for Cryptography
A free lesson from Skill-Lync's Cryptography Basics & Implementation course, on Grow by Skill-Lync · Last updated 16 Nov 2026 · Session: “Week 1 Session 2”
What will you learn in this free Cryptography Basics & Implementation lesson?
Explains the Caesar cipher using a fixed shift and modular arithmetic, then the Playfair cipher with its digraph rules and advantages. Closes with the matrix mathematics used in cryptography, including multiplication, transpose, adjoint and inverse.
- Caesar cipher shifts and modular arithmetic
- Playfair digraph preparation and the three encryption rules
- Advantages and disadvantages of the Playfair cipher
- Matrix multiplication, transpose, adjoint and inverse
What comes after lesson 2?
The next free lesson is lesson 3, “Symmetric Key Cryptography: Shared Keys and Stream Cipher Basics” (38 min). Later in Skill-Lync's Cryptography Basics & Implementation course (paid): lesson 4, Week 2 Session 1 Part 2; lesson 5, Week 2 Session 2 Part 1; lesson 6, Week 2 Session 2 Part 2. The full course has 22 lessons (11 h 10 min of video); see the course overview or its price and syllabus.
Lesson transcript
Machine transcript of the lesson audio (lightly cleaned). Technical terms may contain errors; the video is the reference.
So, in this slide, we are about to see what are the Caesar cipher. So, the Romans used a secret communication to deliver a message to an intended person for which they followed this particular method. So, the letters were left shifted by a fixed number of positions and the corresponding value of that letter, that position is considered. So, the Caesar cipher technique is one of the earliest and simplest method of encryption technique. It's simply a type of substitution cipher, that is, each letter of a given text is replaced by letter with a fixed number of positions down as the alpha. For example, with a shift of 1, A would be replaced by B and B would become C and so on. So, the method is apparently named after the Julius Caesar who apparently used it to communicate with his officiant. Thus, to cipher a given text, we need an integer value known as a shift which indicates the number of positions each letter of the text has been moved down. So, the encryption message can be represented using a modular arithmetic by first transforming the letters, transforming the letters into a numbers according to the scheme. That is, let's say for example, A equal to 0, B equal to 1 and so on, such as Z equal to 25. So, even in this image, you could see the message B has been altered to the position B. So, let me give you an example of this. So, if I'm having the text message of or text alphabetical convention which is having from A to Z and then if the shift to this 23 in the first place, so my message will be considering from that is from starting from X, Y, Z and it ends till W. And the same is if I'm, let's say for example, if I'm trying to send a text message, that is my text message is an attack once. So, if I'm using a shift of 4, so my cipher will be E-X-X-E-G-O-E-X-R-G-I. So, you can just try it on your own on this message. So, taken out, the text is attack at once and then if you could have the shift position as 4, the cipher will be E-X-X-E-G-O-E-X-R-G-I. So, in cryptography, the Z cipher is a categorized as substitution cipher in which the alphabet in the plain text is shifted by a fixed number of alphabet. So, let's see what are all the advantages of this when we are trying to using a cipher cipher.
So, one of the easiest methods to use in this cryptography and can provide a minimum security to the information. So, use of only a short key in the entire process. So, we don't need to use any kind of elongated keys here, which is just within 25 keys in the first place. And then, one of the best methods to use if the system cannot use any complicated coding technique. And even this requires very few computational resource, that is very few computing resource. And let's see what are all the disadvantages of this ciphering. So, it is simple in structure usage and can only provide minimum security to the information.
And the frequency of the letter pattern provides a big glow in deciphering the entire message. So, this is what the Caesar cipher is all about. So, let's see what is in vinegar cipher. So, the key needed here is a dynamic key and the length of the characters in this message should be equal. So, let's take the first letter from a message and go on with that row in the vinegar chat. So, take that first letter in the key and go to that column and match the exact alphabet where both row and column coincide and that should be the start value of the cipher. And then, perform the same for all the ciphers in this.
So, this is the image where you will see where the image represent where the alphabet must be. So, the vinegar cipher is an algorithm that is used to encrypting and decrypting the text. So, the vinegar cipher is an algorithm of encrypting the alphabetical text that uses a series of interwoven Caesar ciphers. It is based on a keywords letter. It is an example of polyalphabetic substitution cipher. This algorithm is easy to understand and implement as well. This algorithm was first described in 1653 by Kervan Battista Blasso. It uses a vinegar table or vinegar square for encryption and decryption of the text.
The vinegar table is also called as a tabula recta. Let's say for an example, I need to decode and the key is key here and then the alphabet starts from A to Z. So, let's say take an example. Take the first letters of the plain text D that is the message which I am about to encrypt is decode and then in that I am going to take the first letter as D. And then the value is equal to key because the key is having a 3 letter of value and then the value is going to be 3 and then the key value is 10 and then add them together.
There is 3 plus 10. So, the overall will be 13 and then the letter which the value for 13 is n. Now continue with the next letter of plain text and then the next letter of the key. When arrived at the end of the key go back to the first letter of the key. So, the example is decode here and then the keys KEY KEY. So, what is the vinegar cipher decryption process here? So, decrypting a ciphertext message back to its original plain text message requires a reversal of the encryption process.
So, in this decryption process, we would first find the row that corresponds to the nth letter in the Virginia cipher key. We then keep looking along that row until we find the nth letter in the ciphertext. The letter present at the top of the column in the vinegar square is a plain text letter. Let us consider the ciphertext as OCGG and the vinegar cipher key is DOG. In order to decrypt the ciphertext message back to its original message that is the plain text message, we start at the new row D in the vinegar square and look for the position of the letter O in the row.
The letter represented at the top of the column is L which is the first letter of the original plain text message. So, how easy or difficult is it to break this vinegar cipher in the first place? So, it should be noted here that we can employ a variety of technique in order to decrypt a Caesar cipher and we don't even need to know about this Caesar cipher key. This is because the patterns in the plain text message get reserved by a Caesar cipher in Christian scheme.
However, when compared with the Caesar cipher, it is more complex to break the vinegar cipher. In the vinegar cipher, the number of places a letter in the plain text message is shifted in the alphabet changes for each letter in the plain text message. This in terms means that the most frequently used letters in the ciphertext do not correspond to most frequently used letters in the plain text. Boom! And then if we find the letter used more than once consecutively in the ciphertext, that doesn't mean that consecutively used letter in the ciphertext correspond to one consecutively used letter in the position in the plain text.
So, as a result of these features, it took a lot longer to break the vinegar cipher than it looked to break the Caesar cipher. So, however, having said all these, the vinegar cipher is not unbreakable at all. For example, spies used the lines of famous poems as the vinegar cipher keys in the second world. So, the German code breakers have figured out the pattern and it then become easier for them to guess the ciphertext encryption key and eventually decrypt the message. It is a matter of common sense that being able to guess that key which has been used for the encrypt a plain text message will mean that the ciphertext message can be decrypted back to its original plain text message.
So, the patterns in the ciphertext can still provide some clues. It is very likely that a sequence of letters repeated in the multiple places in the ciphertext message could be the same word or even a part of a word of which the plain text message encrypted using the same part of the key. It is quite less likely that such reputation in the ciphertext message are different set of letters in the plain text message that were encrypted as same pattern in the ciphertext message. So, code breakers could use a technique called as a dragging to crack the vinegar cipher.
Suppose that code breaker thinks that he or she may know about a word or a phrase that will be in plain text message. The code breaker can then test to see if his or her guessed word or phrase has been encrypted anywhere in this message until the time that such a process produces a key that appears not to be random. When the code breaker has a clue to the key, he or she can then try to decrypting the rest of the ciphertext message. By doing that, the code breaker will have an idea if he or she has been able to discover the whole key.
And if not, the code breaker has to try multiple approaches which is quite unusual. So, with the dragging process until enough patterns in the message that can help in decrypting the ciphertext message back to its original plaintext message and that can be even spotted. So, let's see what is the transposition cipher is all about. So, this cipher does not do any substitution. Instead, it takes a different approach while generating the cipher. The plaintext converts to ciphertext by computing the computation to the plaintext. So, in mathematical terms, a bijective function is used to characters the position to encrypt and the inverse function is used to character the position to the decrypt.
So, transposition cipher simple data encryption scheme in which the plaintext characters are shifted. Some regular pattern to form a site. So, in manual system, the transpositions are generally carried out with the aid of an easily remembered memoning. For example, a popular schoolboy cipher is the rail fence in which the letters of the plain text are written alternating between rows and the rows are then read sequentially to the site. So, in depth, two rail fence, that is the two rows where the message we are discovered, save yourself, would return example as a transpositions where on the top it will be W, on the bottom it will be E, and then on the top we could see the alphabet A, on the bottom R, and so long.
So, the simple frequency counts on the cipher text would reveal to this script analysis that letters occur with precisely the same frequency the cipher as in an average plain text and hence that a simple rearrangement of the letters is probable. So, the rail fence is the simplest example of class of transposition cipher known as root ciphers that enjoyed considerable popularity in earlier history of cryptography. So, in general, the elements of the plain text are written in a pre-arranged order, that is a root into a geometric array, that is a matrix.
So, typically a rectangle agreed upon in advance by the transmitter and the receiver and then read off by the following another prescribed route through the matrix to produce the cipher. So, the key in a route cipher consists of keeping secret the geometric array, the starting point and the routes. So, clearly both the matrix and the routes can be more complex than in the example, but even so, they provide a little security. So, one form of transposition that was widely used dependence on an easily remembered keyword for identifying the route in which the columns of a rectangular matrix can be written.
So, in decrypting a route cipher, the receiver enters the ciphertext symbols into a agreed upon matrix according to the encryption route and then reads the plain text and then they can read the plain text according to the original order of an entry. A significant improvement in crypto security can be achieved by re-encrypting the cipher obtained from one transposition with another transposition. Both the result of two transposition is also a transposition that affect the multiple transpositions is to define a complex route in the matrix, which is itself would be difficult to describe by any simple pneumonia.
So, in the same class also follows the system that makes use of perforated cardboard matrices called grills. So, descriptions of such systems can be found in the most older books of cryptography. In contemporary, cryptography transposition save principle as one of the several encryption steps in forming a compound of product cipher. So, this is how the transposition matrix will be all about. So, in this slide, we are going to see about the playface cipher. So, the playface cipher construct a 5 to 5 square matrix and fill it with the key that is provided for the encryption.
So, after filling the keyword in the matrix with the available alphabets, fill the rest of the empty spaces. There is always going to be one letter missed. Predominantly, it is going to be I or J or both that include, I mean, that could add it to be a single block. So, consider the original message and split them by two letters until the entire message is arranged this way. If there are some letters, ensure that the conceivable letters is replaced with a random letter. If there are loan letters at the end, ensure to add a random letter to it to make it even in the first place.
So, if both the two letters are there in the same column, take the next letter to those two letters. If the two letters are there in the same row, take a letter to the right to each letter. So, if the letters are not in the same row or a column for a rectangle with the letters that are at their respective position, and consider taking the horizontal opposite corner of each letter. So, the playface cipher was the first practical digraph substitution cipher. The scheme was invented in 1854 by Charles Wheatstein, but was named after a Lord Playfair who promoted the use of this particular cipher.
In Playfair cipher, unlike the traditional cipher, we encrypt a pair of alphabets, that is a digraph, instead of a single alphabet. So, what are the Playfair ciphers elements is all about? So, the Playfair cipher was significantly popular on the World War I and II era because of its complexity and level and compared to then available ciphers. Further, it didn't need any kind of special tools or equipment to encrypt or decrypt that kind of information. However, after the invention of computers, the Playfair cipher was no longer used as the computers can solve the Playfair ciphers in a few seconds using the break codes.
So, due to this reason, with the advancement of digital encryption and the passage of time, the Playfair cipher was no more an acceptable form of encoding the messages as there was a risk of data getting into wrong hands. Thus, the Playfair cipher cannot be recommended for business organization. Further, it is a manual and labor-centric process that does not need any of a Playfair cipher calculator or decoder. However, there are Playfair cipher algorithms in C and Python. So, what are the Playfair ciphers, encryption and decryption is all about?
So, we will have a look at some example Playfair cipher with encryption and decryption process. So, the Playfair cipher has a key and a plain text. So, the key is a form of a word in which it can be a sequence of 25 letters without repeats. And we can build a key sequence using that particular key. So, the Playfair cipher encryption algorithm, right? So, it is based upon the two steps here. One is generating the key square. So, the key square is a 5-5 grid consisting of an alphabet that helps encrypting the plain text.
And all the 25 letters should be unique. Since the grid can accommodate only 25 characters, there are no j in this table and any j in the plain text is replaced by i. So, now remove any of the characters of the punctuation that are not present in the key square. Instead, fill out the numbers, punctuations and other non-alphabetic text. The key square will start with the keys unique alphabet in order to appear and followed by the alphabetic remaining characters in the order. So, how we can encrypt this kind of plain text in the first place?
So, before encrypting the text, you just need to divide the Playfair cipher plain text into digraphs. So, the pairs of two letters. In the case of plain text with an odd number or letters, just add the letter Z to the last letter. If there are double letters in the plain text, replace the second occurrence of the letter Z, that is example, but that is if I am having a letter B-U-T-T-E-R, it will be made as B-U-T-Z-E-R because we do have two letters over there. So, in terms of another T, I am just going to add the Z here.
So, what are the rules for this Playfair cipher encryption? So, in case one, both the letters in the digraphs are in the same row. That is, consider the letters right of each alphabet. Thus, if one of the digraph letters in the rightmost alphabet is the grid, consider the leftmost alphabet is the same row. Another case two, both the letters in the digraph are in the same column. So, consider the letters below each alphabet. Thus, if one of the digraph letters in the great-bottommost letter, consider the topmost alphabet in the same corner.
And then in case number three, it is neither case one or two is true. So, form a rectangle with two letters in the digraph and consider the rectangle's horizontal opposite corners. So, now let's see what are the advantages and disadvantages of this Playfair. So, let's see the advantages of the Playfair cipher. So, the first advantage is relatively difficult to decrypt. Because Playfair cipher is secure and needs significant efforts to decrypt the message, making it relatively difficult to crack. And then at the same time, the complex mathematics behind it makes it equally difficult for the receiver to decode that information.
As the frequency analysis used for simple substitution cipher doesn't work with the Playfair cipher, it is significantly trickier to break. Further, if one decides to undertake the frequency analysis, it needs more cipher text on 24 cross 25. That is around 625 possible digraphs than 25 possible monographs in case of a simple substitution cipher. And then the next advantage is safer alternatives. So, the encrypting and decrypting of the data in the Playfair cipher is a manual method that eliminates the need of a Playfair cipher calculator. So, without any need to use a Playfair cipher decoder, the information can securely travel between its source and destination without getting into the wrong hands when you implement the Playfair cipher encryption or decryption in C.
Now, let's see what are the disadvantages of this Playfair cipher. So, the major disadvantage is symmetric cryptography. So, as the Playfair cipher is a symmetric cipher, it uses the same key for encryption and decryption. So, one can easily crack the symmetric cryptography through a Playfair cipher program technique. Although, the amount of encryption and decryption will be relatively less. And the next disadvantage is it is not useful for a huge data volume because one primary disadvantage of Playfair cipher is that you can't use it to transmit a massive data.
And then the last one is about the is. It is about easily to exploit. So, in Playfair cipher, the substitution is self-inverse. It means that the diagram in the ciphertext, that is a DB and its reverse, that is a BA, have correspondents. Plain text such as RU and UR. So similarly, the ciphertext UR and RU have a corresponding plain text, that is even AB and BA. So one can easily exploit it using the frequency analysis and provide he or she known the language of the plain cycle. So in this slide, you could see the example how the playfair is being used. So let's say for an example, if I'm using the name called as a placer, it will be on a phi n to phi. So where it will be having P-L-A-Y-F-A-I-R.
So if I need to use the playfair naming convention P-L-A-Y-F-A, I couldn't use the A again because it is having the text once again. So all I could use P-L-A-Y-F and then I need to go to I in the first place and I should not repeat that A. So I will give another example too. So in first split the plain text into a digraph that is pair of two letters. In the plain text, the odd number of the letters up and in the letter Z at the end of the plain text. It makes the plain text of even more simple. For example, the plain text mango has five letters. That is M-A-N-G-O. So it is all about a five letter.
So it is not possible to make a digraph now. Since we will append the letter Z at the end of the plain text. That is M-A-N-G-O-Z. Because as I said we need it must be in an odd number letters. That is it should be in the even letters in the first place. And then after that break the plain text into digraph that is pair of two letters. If any letters appears twice. Put X at place of the second occurrence. And suppose the plain text is communicate. That is C-O-M-M. That is I am having two M here.
So C-O-M-M-U-N-I-C-A-T. Then the digraph comes here is C-O-M-X-M-U-N-I-C-A-T. So similarly the digraph for the plain text J-A-S-S will be G-A-Z-X. That is J-A-Z-Z will be converted to G-A-Z-X. So Z-A-X as a plain text of green. So this is how it will be break in the first place. And then to determine the cipher text. We need to build a 5-5 key matrix as it is shown on this example. So fill the first row that is from left to right with the letters of the given word. That is playfair. If the keyword doesn't duplicate letters that is if there is anything we need to avoid them.
So it means a letter will be considered only once. After that fill the remaining letters in the alphabetical order. And then let's create a 5-5 key matrix for the playfair. So this is what the playfair cipher is all about. So let's see what is the evolution of the cryptography. So in the day-to-day cryptography, we have two set of examples. That is a secure hypertext transfer protocol. And then we could see what is an ATM cache withdrawal. So these are the two day-to-day cryptography that we have been using on the daily basis.
And let's try to explore that. So what is an HTTPS here? So this is predominantly the existing in our day-to-day layer. So when you're typing a typical person, try to type google.com. The packet first is the Google server and then perform a TCP three-way handshake. So once that is completed, then comes the transport layer security, that is TLS and handshake, which is about browsing the contents using HTTP of the secure channel. So this means the secure channel here is the TLS. So let's say when you're trying to open a website, which is an HTTPS, you could see a padlock symbol on that website, which means that it will be secured in the first place.
So let's see what happens on the HTTPS handshake here. So the client tries to negotiate with the server that it would support which type of encryption, hashing and which version of TLS. So a TLS handshake takes place whenever a user navigate to a website over HTTPS and then the browser first begins to query the website origin server. A TLS handshake also happens whenever any other communication uses HTTPS, that is include the API calls and GNS for the HTTPS queries. So the TLS handshake occurs after a TCP connection has been opened via TCP handshake.
So what happens during this TLS handshake in the first place? So during the course of a TLS handshake, the client and the server together will do the following. That is specify which version of TLS here. So we do have N number of versions of TLS. That is TLS 1.0, 1.2, 1.3, etc. So we are going to specify which version reader and decide on which cipher suite they will be using. So there are multiple cipher suite we just need to mention which specific cipher suite that we are going to use to establish this kind of particular communication.
And authenticate the identity of a server via the server's public key and the SSL certificate authority digital signature. Now generate a session key in order to use the symmetric encryption and after the handshake is complete. So this is how the TLS is all about and let's see what are the steps on the TLS handshake. So the TLS handshake are a series of datagrams or a message exchanged by a client and a server. A TLS handshake involves multiple steps as the client and the server exchange the information necessary for computing the handshake and making further conversation possible.
The exact steps with the TLS handshake will vary depending upon the kind of key exchange algorithm used and the cipher suite supported by both sides. The RSA key exchange algorithm while now considered not secure were used in the versions of TLS before that is 1.3. So it goes roughly as follow. So the first message be the client will be sending in hello message. So the client initiated the handshake by sending a hello message to the server. The message will include which TLS version the client supports, the cipher suite supported and the string of a random bytes from not the client random number.
And then the next one is about the server sent the hello message. So in reply to the client's hello message, the server sends a message containing the server's SSL certificate. So the server chosen the cipher suite and then server's random another random string of bytes that has been generated by the server. And then the next thing is about the authentication. So the client verifies the server's SSL certificate with the certificate authority that issued it. So this confirms that the server is who it says it is and that the client is interacting with the actual owner of that particular domain.
And then the next part is about the pre-master secret key. So the client sends one more random string of bytes, the pre-master secret. The pre-master secret is an encryption with the public key and can be only decrypted with the private key by the server. And then the next point is about the private key used. So this server decrypts the pre-master secret and then we have the session keys created. So both the client and the server generate a session key for the client random, the server random and the pre-master secret.
So they should arrive at the same result. And then we could see when the client is ready. So the client sent a finished message that is the encrypted with the session key and then the server is ready. The server single sends a finished message encryption with the session key. So secure symmetric encryption achieved, right? So the handshake is completed and the communication continues using this session key. So these are all the ways where the HTTPS handshake goes. Now let's see what are the advantages of this kind of HTTPS.
So the first part is about the encryption. One of the major benefits of HTTPS is the data encryption. The data that travels through the HTTPS always gets encrypted. Thus, the information are highly secure. Even if the hackers manage to get those informations, they will not be able to misuse them since the data is already encrypted. And then the next one is about the protection. So unlike HTTP where it serves the data on the client system, not any data of the user is stored inside the client system in the HTTPS.
Hence, the data is not at risk of theft at the public space. And then the next one is about the verification. So always a certificate make sure that the policies and the website policies are the same. If not, the user will get a notification that it is unsecured connection. Therefore, if you are using HTTPS, users can guarantee that their data is being sent to the right place and not to any individual sites. So this builds up on trust in potential clients who are trying to do a business online.
And then the next point is about the data validation. The HTTPS does process of data validation through handshake. So all of the data transfer that are taking place and components such as sender and the receiver are validated. And only if the validations are successful, that the data transfer occurs. And if not, the operations are just simply about it. And the next advantage is about the reliability. So the green padlock that appears on the webpage URL gives a sense of trust that the visitor that the site is security conscious.
So when the site is reliable, the customers will be probably ready to make those kind of transactions. And then the next advantage is about the SEO. So having a HTTPS connection is one of the ranking signals to Google. A site that contains a HTTP certificate will rank higher than the site that doesn't. Therefore, the HTTPS is most often preferred by a site that regularly deals with money transfers, usernames and passwords. Now, let's see what are the major disadvantages of this HTTPS. So, the first one is about the cost. So, when you move to HTTPS, you need to purchase a SSL certificate. Although, many SSL certificates are issued by the website hosting provider, it should be renewed yearly through an annual fee. So, apart from that, there are always ways to get a free SSL certificate, but for the security reasons, it is not even recommended in the first place.
And then the next disadvantage is about the performance. So, the HTTPS connection does involve a lot of computations to encrypt and decrypt the data. So, thus, the response time is delayed and decreasing the speed of the website as well. And then the next point is about the caching here. So, some contents will have a problem of caching in HTTPS. So, public caching, those will happen earlier, will not occur again. Therefore, ISPs will be unable to cache encrypted content. So, this kind of problems are usually faced by the site with large visitors. However, as a result of higher bandwidth, the issues are counter-attracted.
And then the next disadvantage is about the accessibility. So, there are some firewalls and proxy systems that deny access to HTTPS. So, this can be intentional as well as non-intentional too. So, in the case of non-intentional, the administrators might have a forgotten to allow access to HTTPS. And sometimes this can be done deliberately as a security measurement too. And then it's about the mixed content. So, if there is a problem in the configuration, a site will start downloading files from HTTP instead of HTTPS. Therefore, during a course of time, the users will get a warning message as insecure content.
And then the next point is about the computing overhead. So, due to overhead of encryption and decryption data, the additional computing overheads are processed from both servers and the browser. However, these overheads are usually not noticeable as there are extra latency emitted from a connection setup. But if your HTTPS connection handles both HTTPS connection, simultaneously, this can be an issue. And then the next point is about the ATM cash withdrawal. So, in this image, you could see how we are trying to use the ATM in the first place.
So, it is all about insert or swipe the card. So, we need to select the language and then enter the forwarded ATM pin, feed the amount and press the enter. And then in case of withdrawal, select the count type and select the option like withdrawal balance or inquiry. And then we need to collect the cash. And for additional transaction, we need to select yes or no. And then select yes if you want a printed receipt or just click no. So, a pin can be verified by user plugging them to an ATM or it can be stored in the magnetic strip in an encrypted format.
The decryption key will be available in some facilities and then the ATM will be in live connection with those centers. So, the ATM will communicate with the bank to verify about the bank account, account status in the bank. The online pin is always encrypted. The pin or offline pin that could be either planned or an encrypted and used with the debit card transaction or a merchant. How confident that you are having the ATM pin with you and then since it is having four digit in the first place.
So, how can we ensure that it is secure and what if it has been hacked in the first place? That is, is it possible to detect the four digit pin? So, a four digit pin can be plenty secure enough if like almost banks, you lock a card after a certain number of failed attempts. So, if you only have three attempts to nail a four digit pin, so you have only got 0.03 percentage of chance of getting a random one. And even, and even if you know the victims picked a date as their pin and limiting them to 0.01, 0.031, 0.201 and 0.299.
And so, for you will still have only 0.82 percentage of chance of getting a random one. So, it is almost 0.08 percent even though if you are trying to do something based on the birthdays or something relevant to them. So, this is the reason where the even the financial institutions will be saying that it is asking the customers to reset their pin once in six months or quite often. So, in next slide, let's see what is the mathematics behind this cryptography. So, it is all about the matrix.
So, the matrix is a collection of numbers that are arranged by rows and columns. So, a matrix of any size, that is rows and columns is represented within the parenthesis or a bracket. So, the order of a matrix is determined by number of rows into number of columns. That is ideally, it is mentioned as a row by column. And then, we could see that there are various forms of matrix and in favor of course, we would restrict to inverse, adjoint or transpose the matrix. So, let's see what is the matrix multiplication.
So, in this, consider the row of the first matrix and add each value with the column of the corresponding matrix to generate the resultant matrix. And then, the next is some of the transpose matrix. So, the row values are chained to column and column values are chained to rows. That is, the transpose matrix is obtained by chaining its rows and columns. That is, a rectangular array of numbers or functions that are arranged in the form of rows and columns is called a matrix. So, the arrays of numbers are called the entries of the elements of the matrix.
And, the adjoint matrix. So, the adjoint of the matrix is the transpose of the co-factor matrix. And, let's see what is the inverse of the matrix. So, the inverse of the matrix is just writing the matrix of the power of minus 1. That is, 1 minus 1. Note, and we never divide a matrix by any number. We should be knowing about the determination of a matrix which can be defined as a scalar quantity, that is, functional value of types of square matrix. So, the inverse of the matrix is calculated, multiplying the inverse of the determinant of a matrix which is coefficients.
So, in this week, we have covered upon what is the definition of cryptography and what is the technography is all about. And then, why we have been using it in the first place. And then, we saw about the terminologies used in the cryptographic operations such as the encryption, decryption, and then the ciphertext. So, these are the terminologies that we have been using. And then, we saw about the various substitution based of cryptographic form. And then, we saw about the various polyalphabetic cryptographic form. And then, we saw about the modern usage of cryptographies such as HTTPS and ATN.
So, we saw about how the HTTPS communication works in the place. And then, why we are using the TLS and how secure it is. And then, we saw the example of the 18th withdrawal also as an example. And then, the basic max involved in this performing the operation of the various cryptographic terms. So, these are all the topics that which we have covered in this week. Thank you.