# The Relations Of Cryptography And Mathematics Mathematics Essay

**Published:** **Last Edited:**

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Basic cryptography has been used starting from medieval times till the present day. Now, cryptography has become much more complex and the mathematics behind it has become even more intriguing, deep, and advanced. Cryptography is the study of mathematical techniques related to the aspects of augmenting information security, such as confidentiality or privacy. In other simpler terms, cryptography is the practice and study of hiding information as well as being able to send important or top-secret messages to someone without it being intercepted and deciphered on the way. So, cryptography is basically the process of writing using various methods ("ciphers") to keep messages secret. The root of the word, cryptography is derived from ancient Greek and is the combination of two words: "kryptó" or "hidden" and "gráfo" or "to write".

To understand some basic cryptography, it may be important to learn some history as it has advanced scientifically and mathematically throughout the many years. Cryptography was used in ancient times in three contexts: private communications, art and religion, and military or diplomacy uses. There are examples of funeral engravings from ancient Egypt in which the encrypted text was used to give some sense of mystery. This was perhaps the earliest known form of simple cryptography and is found in non-standard hieroglyphs carved into monuments from Egypt's Old Kingdom (over 4,500 years ago). These are not thought to be serious attempts at secret communications but rather to have been attempts at mystery, intrigue, or even amusement for onlookers. Some clay tablets found from Mesopotamia are clearly meant to protect information of encrypted recipes. During the years 500 BC-600BC, Hebrew scholars made simple usage of mono-alphabetic substitution ciphers, such as the Atbash cipher. For example, in the Book of Jeremiah, there are basic Atbash ciphering methods used.

In India, cryptography was developed and practiced for a variety of reasons as well.

Later on, the Greeks of classical cryptography used transposition ciphers that were claimed to have been used by the Spartan military. Herodotus, an ancient Greek historian, tells us of secret messages that were physically concealed under wax on a clay tablet. Another Greek method of ciphering was demonstrated by Polybius, now called the Polybius's Square. The Romans have also proved to have known something about cryptography because of Caesar's ciphering methods and its variation methods almost two-thousand years ago.

As the years progressed, so did encryption methods. During medieval times, Al-Kindi, an Arabian mathematician invented a technique for breaking mono-alphabetic substitution ciphers and published it in his book, Manuscript for Deciphering Cryptographic Messages. It was the most fundamental cryptanalytic advance until World War II. Cryptanalysis is the conversion of encrypted messages into plaintext without having the initial knowledge of the key used in the encryption of the initial plaintext message.. An Italian cryptographer, Giovan Battista Bellaso, devised a poly-alphabetic system that was published in his book in 1553. During the nineteenth century, Blaise de Vigenére was erroneously attributed the inventor of that system, and which is known today as the Vigenére cipher.

In Europe, during and after the Renaissance, citizens of some countries or religions were responsible for rapid proliferation of cryptographic techniques. In 1586, Mary, the Queen of Scotland, was executed for having wanted to assassinate her cousin Queen Elizabeth. Sir Francis Walsingham, Secretary of State, proved that Mary had taken part in the conspiracy by deciphering her communications with Sir Anthony Babington. Queen Mary made the mistake of poorly encrypting her messages. Although cryptography has a long and complex history, it wasn't until the 19th century that it started to develop rapidly.

There were many other great advances in the field of cryptography. Cryptography was used to send messages to officers in order to instruct them what to do during war or battle. Deciphering machines such as the Enigma, JN-25, British TypeX, SIGABA, Lacida, and the VIC cipher were used greatly by the Allies side and the Axis powers. Cryptography was used in warfare to send messages and impacted the events that took place.

In order to fully appreciate cryptography's many applications, there are essential terms and formulas that must be clarified. P is commonly referred to as the plaintext, or the original readable message in a certain language. C is the ciphertext which is the output of the encryption scheme, and is not readable until decrypted. E is the encryption function, or what was done to the plaintext to achieve the ciphertext. This provides us with the most basic cryptographic equation,. This equation means that the encryption function is being applied to the plaintext to acquire the ciphertext. D is the decryption function or the key that is used to decipher the ciphertext. It can be demonstrated by the following basic equation: .

There are many methods (ways to encrypt) the plaintext to the ciphertext. Among these are substitution methods, transposition methods, block methods, and stream methods. Within these four encryption methods, there are many different ways and variations. Substitution methods and transposition methods are part of historical/classical ciphers, while block methods and stream methods are considered modern and very complex and complicated ways to encrypt messages. There are also symmetric-keys (private keys) and asymmetric keys (public keys). Symmetric keys are a class of algorithms that use related and often identical cryptographic keys for both encryption and decryption. Asymmetric keys are a class of encryption methods and algorithms that use completely different keys for encryption and decryption, so if one was to intercept the message it would be nearly impossible to decipher.

Other substitution methods involve using keywords. The Keyword encryption key is an example of this encryption type. In these, the alphabet will be written out and then directly under there would be any keyword. Next, write out in order all the letters of the alphabet that the key word did not use. Below is an example where the keyword is actually "keyword".

The Vigenére Cipher, invented by the Italian cryptographer, Giovan Battista Bellaso was misattributed to the French cryptographer named Blaise de Vigenére. To encrypt, a table of alphabets, called a tabula recta or Vigenére table/square may be used. This consists of the alphabet written out 26 times in different rows, with each alphabet shifted cyclically to the left compared to the previous alphabet.. First, the plaintext should be written out next to each other with no spaces. Next, a key word should be chosen that is not longer than the plaintext. The key word should be repeated directly underneath as many times as necessary until all the spots have been filled. Then the table to the left should be used to encrypt the message by allowing the first letter of the key to be the left coordinate on the table and the first letter of the plaintext to be the top coordinate. The letter that the row and the column intersect is the encrypted letter. If the plaintext message is "DEFEND HOME", it would first become with no spaces, "DEFENDHOME". Then a random key word would be chosen such as "LIME", and it would be repeated as, "LIMELIMELI", which has the same number of letters as "DEFENDHOME" does. In order to encrypt the first letter, the first letter of "LIMELIMELI", which is the "L" row, would be located on the left hand side on the table above. To continue encrypting the first letter, the first letter of "DEFENDHOME", which is the "D" column, would be located on the top of the table above. The intersection of the row and the column will give you the encrypted letter, in which this case is "O". Using the table, the plaintext message will be encrypted to "OMRIYLTSXM", after repeating the steps above several times. That is the ciphertext for "DEFENDHOME" using the key, "LIMELIMELI". The Vigenére Cipher is actually a simple version of a poly-alphabetic substitution method. File:Vigenère square.svg

After receiving the numbers, the coordinates are written directly underneath each other again. The same procedure is followed for the bifid cipher, except the numbers are divided into triplets of 3 instead of pairs of 2.

The Four-Square cipher is a polygraphic method of encryption that was also invented by Felix Delastelle. The four square cipher uses four 5 x 5 matrices. Each of the 5 by 5 matrices contains the letters of the alphabet, but usually omits the letter "Q" or instead puts I and J in the same location. In general, the upper-left and lower-right matrices are the "plaintext squares" (which the plaintext is located in). The upper-right and lower-left squares are the "ciphertext squares" (which the ciphertext is found in). In the upper-right and lower-left squares, the Keyword encryption key is used. In this, there would be a keyword written out and then all the letters that were not used would be written in order. An example of the matrices is shown below using the keywords: "keyword" and "security".

In order to encrypt a message, first the plaintext message would be seperated into digraphs (pairs of 2). So, if the text was "ice cream" would become "ic ec re am". Next, one must find the first letter (i in this case) in the upper left matrix and the second letter (c in this case) in bottom right matrix. Next, find the letters in the other two matrices that are in the same row and column (or switched) of the letters i and c. So, the encrypted message for "ic" is YW, and if the whole message was encrypted, the ciphertext would be "YW CO PE CF".

Another method of encryption is the Playfair cipher. This polygraphic encryption method by Charles Wheatstone in 1854, but uses the name of Lord Playfair who promoted the use of the cipher. In fact, it is actually considered to be the first literal digraph substitution cipher. It is quite simple and demonstrates a certain key which has to be followed. It is arranged into a 5 x 5 square using the Keyword method (for example, the four-square cipher). Next, if the letters being encrypted are at opposite corners such as top-left and bottom-right, the ciphertext would become the letters at the top-right and bottom-left corners. It uses many other patterns such as that to encipher a message.

Invented in 1929 by Lester S. Hill, the Hill cipher is a polygraphic substitution cipher based on linear algebra. It requires some elementary knowledge onf how to multiply matrices. Matrices are commonly just mathematical objects represented by an array of numbers. The operation of the Hill cipher involves inventing a key (in the form of a matrix), where the number of columns in the key (1st matrix) is equal to the number of rows in the plaintext (2nd matrix). This pre-requisite allows multiplication to be more precise and brief, as well as allowing multiplication to easily avoid mistakes. In order to multiply matrices, the following two steps should be followed:

Multiply the elements of each row of the first matrix by the elements of each column in the second matrix.

Add the products.

This can be demonstrated more clearly by using the following example. If the plaintext is simply just "CAT", and the key invented in the case "KJUDMJITN", the following process of enciphering would be followed:

First the text "CAT" is converted into numbers, where A=0, B=1, C=2â€¦..Y=24, Z=25. So, the plaintext would become 2 0 19.

Next, the key "KJUDMJITN" would be converted into numbers as well, and would become "10 9 20 3 12 9 8 19 13".

Then the matrices would be multiplied to create a new matrix.

Finally, the numbers would be converted back into letters.

So, the matrices would appear as the following:

## MATRIX MULTIPLICATION STEPS

## (10 x 2) + (9 x 0) + (20 x 19) = 20 + 0 + 380= 400 (3 x 2) + (12 x 0) + (9 x 19)= 6 + 0 + 171= 177

(8 x 2) + (19 x 0) + (13 x 19)= 16 + 0 + 247= 263 Thus, the new matrix would be (mod 26), which after being calculated (using the concept of modulus), equals . This translates to the ciphertext of "KVD". That is how the Hill cipher's operation works and allows encryption.

The One-Time Pad cipher is considered a special cipher for many reasons. It is actually a different type of substitution cipher. It was invented near the end of WWI by Gilbert Vernam and Joseph Mauborgne in the US, and later it was mathematically proven unbreakable by Claude Shannon. Suppose that Alice wanted to send the message, "HELLO" to Bob. The first step is to convert the letters into numbers, from 0-25, that correspond to their position in the alphabet. So, the plaintext of "HELLO" would become in numbers, (7 4 11 11 14). Assume that the first five letters of the key that Alice and Bob decided on beforehand was "RWZCV". This too would be converted into numbers, and we would obtain, (17 22 25 2 21). The numbers from the plaintext and the "one-time pad" (key) would be added together, modulo 26. In this case, the new added numbers would be (24 26 36 13 35)[mod 26]= 24 0 10 13 9. Now these numbers would be converted back into the letters of the alphabet and would become "YAKNJ". The reason this method is called the "One-time" pad is because the key is destroyed and then a new key is generated for further messages.

## Asymmetric Key Algorithms (Public)

Asymmetric keys are a type of encryption method and algorithm that use completely different keys for encryption and decryption, so if one was to intercept the message it would be nearly impossible to decipher. Probably the most well-known and prevalent public key algorithm is the RSA Algorithm.

The RSA Algorithm is the most secure well known public key algorithm around. It stands for the first letters of Rivest, Shamir and Adleman who first publicly described it in 1978. It was one of the greatest advances in cryptography and is used widely for encryption because of its superior security. It involves three steps; key generation, encryption, and decryption. The RSA Algorithm can be quite complex and at times abstruse to understand.

## KEY GENERATION

The series of steps to generate the public and private key is listed below.

Choose two distinct prime numbers; p and q. In order for encryption to be most effective, choose large prime numbers.

Compute n, (the product of the prime numbers p and q).

This will later be used as the modulus for encryption.

Compute, which is generally referred to as \varphi(n).

Next, an integer e is chosen, providing that it is e> 1 but less than . Also, \varphi(n) and e must have no factors in common other than 1. In other words, those two integers should be coprime. \varphi(n)

The fifth step is to determine an integer d such that ]. In other words .

The public key is (n, e) and the private key is (n, d).

## ENCRYPTION

In order to now encrypt the message there are a series of steps.

First the message is converted to numbers using a pre-decided padding scheme.

Then, the numbers are raised to the power of e modulo n.

The number received from that exponential process is the encrypted ciphertext.

## Key generation and encryption can be shown better using a worked example somewhat similar to the one below:

## RSA KEY GENERATION AND ENCRYPTION WORKED EXAMPLE

The two prime numbers chosen are 37 and 41, for n and q consecutively.

The product of these prime numbers, referred to as n would be 1517.

, also, is which equals 1440. \varphi(n)

A possible value of q e that can be chosen is 7, for it is greater than 1 and has no factors in common with 1440 except 1. \varphi(n)

An integer d must be chosen under the restriction that ]. So, in this case, . To make calculating for possible values of d easier, the equation can be re-written as, with x representing any random value. Though, one should make sure that the expression is divisible by 7. So, for a worked example, x could be 15. So, for example, if x=4, then the equation would read as Thus, d is equal to 5761/71, which if calculated further, is exactly 823.

Now, if one wanted to encrypt the letter, "M", they would first convert this specific letter to a number using a pre-decided padding key. Assume that the key indicated that "M" should be converted to 43. The next step would be to raise 43 to the power of e (modulo n), and in this case, e is 7, while n is 1517 in this case. It is going to be used in the encryption process by acting as a modulus like indicated before. The final calculation involves. In order to simplify the preceding expression, the following would be conducted:.

The encrypted number sent would be 1030 for M.

Though, the important part about the RSA Algorithm is the fact that the encryption and decryption have different keys. Messages using the RSA Algorithm are encrypted with the use of the public key. In order to depict the message, the private key is needed. The only difference between the private and public keys is that the private key contains the decryption key, which is in fact d.

## USES IN DAILY LIFE/WORLD

The RSA Algorithm is probably the most effective encryption method and it is used by many people in many different professions for numerous reasons. In fact, cryptography in general is used for many different purposes.

On the personal basis, people sometimes apply simple Caesar Shift Methods to their password (consisting of their name and birthdate) by maybe adding one or subtracting one from their original letters. Though, one of the major uses of cryptography involves any sort of account that contains extremely personal information. For example, if one opened a bank account, and at time supplied their password to the bank server, some banks would take the password and apply the RSA Encryption Method using the public key. Now, if one wanted to decrypt it, it would have to have the decryption key applied, which only the bank has information about. So, whenever one enters the password of their account correctly, the bank server matches the encrypted text. Though, most banks apply a form of cryptographic encryption called hash function. This involves taking the smallest of passwords and then converting into an extremely large code with digits, letters, and symbols. The hash function is in fact a one-way encryption method. That means that the hashed code can never be decrypted back into the original password. So, many bank servers take the password that is entered for an account, encrypt it into a hash function and match it with the code and account name in a persistent storage such as a database to allow access. Internet mailing service such as Yahoo! And Gmail use a type of cryptographic encryption method referred to as PGP. Cryptography is actually also used by the government to secure information. The government agency involved with cryptography is the NSA (National Security Agency). Like mentioned before, cryptography is definitely used in wars to communicate and plan battle or defense strategies. Most websites on the internet that involve commerce have security symbols which represent that the information given will remain secure. Variations of cryptography are used widely and everywhere in some form. Cryptography has helped the human race in many ways; so much so that some websites and people depend on it entirely to keep their private information safe.

Cryptography has rapidly been improving and advancing over the years, and has become indispensable in this electronic-interconnected world. The pervasive internet has exploded the need for security, thus making cryptography an important aspect of everyday life. In conclusion, the internet and many modern-day advances electronically would not be the same without cryptography. Although many may not be aware of cryptography and its usage, it can be assured that cryptography has paved the pathway for our digital world and solved our surmountable security needs.