## Search Obioku's Thoughts

### Things I Would Like To Happen Soon

For all those who believe in speaking ideas into existence and prayer in the universe will return to a person.  I simply want to write a lis...

## Thursday, January 07, 2016

### Report on Encryption Algorithms

Data encryption is one of the main components to computer security and communication.  Encrypting information is the process of changing the message, image or file to another form to protect it from an unplanned user.  Once the data is received, the intended recipient can then revert the documents to its original form by means of decryption.  This is mainly done to avoid the damage that could be caused by the loss of confidentiality or integrity while the information is being sent back and forth.  Decryption simply reverses the process of encryption so I will focus the topic to one aspect of this form of securing information.  There are two major categories for encryption methods, symmetrical and asymmetrical [1].  Symmetrical encryption provides a public key which is shared for both parties.  Some symmetrical algorithms would be DES and blowfish.  For symmetrical though the algorithm is public and well known, the best are still very difficult to have an effective attack against.  Since its policy is fixed, many of them eventually are worn down and begin to get cracked.  As the attacks become successful, the encryption strategy starts to phase out and get replaced by a newer one which has yet to meet strenuous testing.  Asymmetrical allows for shared key as well as two private keys.  One for the sender and another for the recipient.  Examples of asymmetrical algorithms would be RSA and digital signature.
During this semester we have learned about many different algorithms to protect transmissions against attackers.  Some were stressless to comprehend like the Caesar Cipher.  Caesar Cipher takes messages written in plaintext and shifts each character clockwise by three.  Therefore A turns to D, B becomes E so on and so forth.  The formula for the algorithm can be expressed as c = E(3, p) = (p + 3) mod (26) where p is the plaintext and c is the cipher result.  This is one of the simpler examples that if you knew it were being used then you could attack and recover both the plaintext and ciphertext.  We also learned about the extensive and complicated advanced encryption standard.  AES creates a thorough course of bit manipulation and transformation from four specific implementations of addRoundKey, subBytes, shiftRows and mixColumns [2].  AES breaks the data into 2 character hexadecimal numbers or 8 digit binary numbers to produce a 4 by 4 matrix.  AES involves mathematical operations and resorting of the different matrix cells.  The first round involves key expansion which produces numerous keys to be used throughout the rest of the process.  Addroundkey is the next process in the first round but the last in every other iteration.  Addroundkey process creates a new string of data with a key generated from the expansion method.  Then comes the subBytes.  In subBytes, the complete matrix is changed.  Some research can provide a value to swap using S-box transformation for the values contained in each spot of matrix.  ShiftRows follows subBytes and moves each rows to the right by the numbers of indexes of the row it is located in.  MixColumns then performs the two mathematic operations of multiplication of the each column element of the encrypted text with the each rows element of a fixed matrix for this procedure.  The product of each result is xor to assigned one value to the cell.  An illustration of this is provided below [2].

This has developed into a widespread industry standard for its results and reliable security.  These two are just some of the examples of this genre.  More recent references have discussed both alternative methods and further analysis into the idea of encryption.  I will write about a few that I have found interesting.
A hybrid method was proposed by the authors Prakash Kuppuswamy and Saeed Q. Y. Al-Khalidi [3].  They suggest a system where user A first obtains a key from user B.  Then creates a new key and encrypts the message with the new key.  The new key is then encrypted using the shared key.  The new key and message are sent to user B.  User B then decrypts new key with their own private key and decrypts the message with the result.  The image below may help with my explanation of the process [3].

The concept of having a message encrypted and decrypted with different algorithms which produces the appropriate text is intriguing.  The encryption method is geared towards mathematics like many algorithms.  The key is generated by selecting a number as n and the inverse of it in the finite field of 37 as key 1.  Then a negative random number is chosen as n1 and its inverse as key 2 [3].  There is a value assigned to each character from A to Z and 0 to 9.  That value is then multiplied by a random number and modulus of 37 is applied to return to the field.  The cipher text is created as the plaintext character times both keys and then the modulus of that amount.  So to refer back to this being a hybrid, the public key is knowing the modulus factor of 37 is a core component to this algorithm.  The private keys are the random selected numbers to define the key matrix.  It is not completely clear to me the process and the solution to this algorithm but I think it is a very interesting one to think of and invent.
There is also the topic of a polybit shuffling encryption that was introduced by author Harinandan Tunga [4].  This algorithm is similar to playfair cipher that we learned about this semester.  In the playfair cipher, there is a 5 by 5 matrix created for alphabet characters.  Though there are 26 letters in the alphabet, I and J are combined in a cell to make it work.  For any given keyword, it is placed in the matrix first.  The remainder is then filled with the unused letters in sequential order.  The ciphertext is then created by where the letters are found based on their arrangement in the matrix.  For the polybit algorithm, there are two numbers chosen n and m.  These two are comprised to produce s as mn and c as log2s [4].  The following is a brief excerpt directly from the article, “for example, if we choose N = 4 and M = 4 i.e. a 4 x 4 x 4 x 4 matrix then S = 4^4 = (2^2)^4 = 2^8, therefore C = 8 bit = 1 byte. If we choose N = 4 and M = 8 i.e. an 8 x 8 x 8 x 8 matrix then S = 8^4 = (2^3)^4 = 2^12, therefore C = 12 bit. If we choose N = 5 and M = 4 i.e. a 4 x 4 x 4 x 4 x 4 matrix then S = 4^5 = (2^2)^5 = 2^10, therefore C = 10 bit” [4].  Once the matrix is created, there is a process of diagonal swapping to reorganize the numbers shown in the image below [4].

Files are divided into a number of “chunks”.  The chunks then have transformations performed on each group using a linear algorithm.  The more transformations that are performed adds additional keys and padding which may inadvertently add confusion.  As new rows are created a new value is assigned.  I have not gotten a full grasp of the logic of its encryption but I feel the algorithm is worth looking into.
The last algorithm is being proposed by a group of contributors and is being compared RSA and PSR by them [5].  The algorithm is mainly based on a three part format of positioning, substitution and randomization.  It begins from the source file and a key level.  A valid encryption string is then retrieved from the database and the file is then encrypted based on that.  A key is then generated from the length of the file.  The partially encrypted data then becomes 64 bytes.  The file then starts the substitution phase on the basis of a character shift by the user.  The final step is to rearrange the data using a randomized pattern.  A complete flow chart is shown below [5].

This encryption seems stable in my opinion.  This is something that I could try to use on my own.  The explanation was very clear and concise.
In conclusion, there are many ways to encrypt and protect data.  I thank all the designers of the algorithms as contributors to this assignment.  I would also wish them the best and hope that their creations become successful.  The complexity of each algorithm is just as vital as the choice to use it over another.  Personally since I do not fully understand the reasoning behind each, the possibility of whether or not I can actually encipher or decipher data would determine which I use to implement.  But it was somewhat fun reading about this information.  Maybe one day I will be able to construct an algorithm myself and see if it would be useful for others.
Bibliography
[1] "Encryption Algorithms.” Asymmetric Encryption Algorithms: Symmetric Encryption Algorithms. N.p., n.d. Web. www.encryptionanddecryption.com/algorithms/encryption_algorithms.html 23 Nov. 2015.
[2] Pitchaiah, M., and Philemon Daniel. "Implementation of Advanced Encryption Standard Algorithm." International Journal of Scientific & Engineering Research ISSN 2229-5518 3.3 (2012): 1-6. Web.
[3] Kuppuswamy, Prakash, and Saeed Q. Y. Al-Khalidi. "Hybrid Encryption/decryption Technique Using New Public Key and Symmetric Key Algorithm." MIS Review 13.2 (2014): 1-13. Web.
[4] Tunga, Harinandan. "A New Polybit Shuffling Encryption and Decryption Algorithm Based on N Dimensional Encryption-Decryption Matrix." International Journal of Emerging Technology and Advanced Engineering 2.2 (2012): 143-49. Web.
[5] Srinivararao, P., Lakshimipriya, P. V., Azad, P. C. S., Alekhya, T., Raghavendrarao, K. and Kishore, K. “A Technique for Data Encryption and Decryption.” International Journal of Future Generation Communication and Networking 7.2 (2014) 117-126 Web.