The Hill 2-Cipher with Python
Keywords:
Plaintext, cipher text, modular29, inverse, matrices, encryption, decipheration, Python, SymPyAbstract
This research paper focuses on the utilization of the Hill 29 cipher to encrypt short sentences using symbols and spaces between words. The Hill 29 cipher relies on linear algebra and number theory concepts. The paper deals with matrix multiplication and inverse matrix, as well as working with the modulo 29 system. The mathematical formulas of the Hill 29 cipher are presented, along with the selection of a suitable key that meets certain conditions to ensure the effectiveness of the encryption process. The cipher is applied to a sentence consisting of 13 characters and three symbols, including spaces between words, and the encryption is successfully achieved. To verify the effectiveness of the encryption, the deciphering of the obtained crossed symbols was performed. The results confirmed that the key is necessary to reconstruct the original formula with its symbols and spaces. The key is considered as a password and is represented by a 2x2 matrix. The original formula with its symbols and spaces was successfully restored, thereby proving the effectiveness of the Hill 29 cipher. It can be relied upon, provided that the appropriate key selected conditions are met. At the end of this research paper, we used a high-level, general-purpose, and very popular programming language which is called Python (latest Python 3) to ensure and get fast results without a classical manual mathematical calculation to encrypt, decrypt sentences by a special code written in Python.