Cryptography Using Automata Theory

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Cryptography using Automata Theory

Kuldeep Vayadande1, Kirti Agarwal 2, Aadesh Kabra 3, Ketan Gangwal4, Atharv Kinage 5

1
Vishwakarma Institute of Technology, Pune, India
2
Vishwakarma Institute of Technology, Pune, India
3
Vishwakarma Institute of Technology, Pune, India
4
Vishwakarma Institute of Technology, Pune, India
5
Vishwakarma Institute of Technology, Pune, India

Abstract- Cryptography's two most important aspects are encryption and decryption. The
primary goal of both systems is to protect data. To convert ordinary text to ciphertext, we used
encryption. In the opposite direction of encryption, decryption is the process of transforming
encrypted text into plain text. The devised encryption solution assures data secrecy for secure
communication by utilising a finite state machine and the LU decomposition approach. We
also use lower and upper triangular matrices, which are created by decomposing a square
matrix, in our proposed method. The key will be a lower triangular matrix modulated by a
prime number in the encryption process, and an upper triangular matrix modulated by a prime
number in the decryption process. The strategy is advantageous. In industries where sensitive
data must be supplied, such as banking and military services, this strategy is advantageous.

1. Introduction

Cryptography relies heavily on encryption and decryption. Both tactics are primarily used to protect
data. To convert plain text to encrypted text, we use an encryption technique. In the opposite direction
of encryption, decryption is the process of transforming encrypted text into plain text.[3] Someone
who works with encryption and decoding is referred to as a "cryptographer." When a user possesses a
certain piece of concealed knowledge, information is identified. A key is the hidden information that is
transferred to the receiver. In cryptography, the encryption process is the process of safely converting
data from one form to another. As a result, ciphertext is the value of encryption because it cannot be
read by unauthorised individuals. Encryption protects data stored on a computer system or transmitted
over the internet. The most critical part of any encryption is the encryption key. The two types of keys
are public and private keys. In the encryption and decryption operations, both keys are used. Public
keys are available to everyone, but private keys must be kept private.[23] The key size is proportional
to the encryption strength. As a result, breaking encrypted data gets increasingly harder as the key size
increases. Decryption is the process of transforming encrypted text into text that we or our computer
can read and comprehend. Decryption is the manual process of decrypting data using the necessary
codes or keys. Without the secret key, decoding data is exceedingly difficult. We'll get the original text
after decoding. Automata theory has several applications in the field of cryptography. Deterministic
finite automaton (DFA )is a field of Theory of Computation which is based on Automata. For every
given string character input, a finite state machine creates a unique encoded string. The words
"deterministic" and "uniqueness of computation" are synonymous. On a comparable input symbol,
non-deterministic finite automata allow for zero, one, or many transfers from one state to another. If S
is a non-empty collection of kjlstates, then the outcome is an element of S for deterministic automata
and a subset of S for non-deterministic automata. A finite state machine is therefore an algorithm with
a fixed count of states and transitions. Nowadays, this technique is widely used in cryptography to
encode data and ensure data privacy.

a. Vernam Cipher and secret key cryptography

Vernam Cipher is a cryptographic encryption algorithm. It is one of the Transposition methods used to
convert plain strings to an encrypted string. In this strategy, we allot a number to each character in the
normal-Text.
Method for obtaining a key:
In the Vernam cypher algorithm, we use a key to encrypt the strings, and the key's length should be the
same as the string’s length.

Algorithm for Encryption:


1. Assign a numerical value to each count in the string.
2. Add the two numbers together.
3. If the extra integer is larger than 26, deduct the integer from 26; else you are good to go.

b. Finite Automaton Public Key Cryptosystems:

Finite automata are the foundations of language-theoretic cryptosystems. The vast majority of
cryptosystems based on language and word issues are either unsafe or fail to fulfil the cryptographic
signature prosperity criteria. Automata-based cryptosystems are divided into three categories:
transducers, cellular automata, and acceptors. In this study, we explore the benefits and drawbacks of
popular finite automata-based cryptosystems such as FAPKC, Gysin, Wolfram, Kari, Dmsi's
cryptosystems[20].

Any cryptosystem must adhere to two fundamental principles: secrecy and authenticity. These two
concepts provide a dilemma for the symmetric cryptosystem. The difficulty with confidentiality in
symmetric cryptography is that, as we all know, a secret key is used to both convert and decode the
communication. As a result, this key must be interchanged by both communication parties in some
way, or they must depend on a third organisation, such as a key allocation centre, to allocate the
key.[15]

However, depending on a third organisation jeopardises the secret key's confidentiality. In public key
cryptography, each user must produce a pair of keys, one of which is kept hidden and is known as a
private key, while the other is made public and is known as a public key.It is entirely up to the program
whether the original communication can be encrypted using the giver's secret key or the beneficiary’s
public key.[20].

c. Cellular automata and cryptography

Cellular automata are dynamic with distinct attributes. This algorithm consists of a sequence of cells,
and which are updated in sequential manner with random time. Cellular Automata is a distinct
computing paradigm that gives an easy, extensible, and effective platform for revitalising large
systems and executing sophisticated computations based on evidence from the surroundings[12]. CA
is made up of two parts. 1) a collection of cells and 2) a set of regulations. Control signals are used on
a CA structure in PCA.

The primary goal of LCASE's (Lightweight Cellular Automata) design is to significantly improve both
parties' necessities. The model, on the other hand, has several flaws to deal with traditional security
concerns and different difficulties taken into account when developing the suggested algorithm are:

a. Fast performance with a low code density.


b. Impervious to attacks like traditional cryptanalysis
as well as assault timing
c. Code-effective and simple implementation.

2. LITERATURE REVIEW

The paper[1] by Ayush Mittal and Dr. Ravindra Kumar Gupta suggests an approach on research to
develop a novel cryptographic technique based on the LU decomposition method and finite state
machine.
In the Journal[2], written by Kearns Michael and Valiant Leslie in the year 1994, the paper showed
how a constant depth threshold circuit, DFA, has significant cryptographic and number theory
implications.

Application of finite automata in cryptography[3] by A.A.Sharipbay, Zh.S.Saukhanova,


G.B.Shayakhmetova and N.S.Saukhanov explain key ideas in symmetric and asymmetric
cryptosystems. The applications of the finite automaton model in information encryption are also
examined.

Ivone Amorim, Antonio Machiavelo, and Rogério Reis' work On Linear Finite Automata and
Cryptography[4] focuses on formalisation and derives fundamental conclusions on the issue. It also
proposes a different criterion for a specific type of automaton.

The authors S. Nandi, B.K. and Chaudhari offer a system in their study[5] by discussing the theory
and applications of Cellular Automata for a class of block and stream ciphers. Analytically, the authors
demonstrated that cellular automata using XNOR rules may create an alternating group.

In this Paper[6], The writers use computer theory tools for encryption and decryption. Encryption is
done using an encryptor formed by using a Turing machine and Decryption using a decryptor.

Next Paper that we reviewed was written by Umesh Prasad , Sahu Madhusmita . This study offers a
novel block cipher encryption and decryption procedure based on the principles of nonlinear and linear
cellular automata.[7]

The article[8] by Harsh Bhasin, Ramesh Kumar, and Neha Kathuria provides a Cellular Automata and
Genetic Method-based encryption algorithm. The approach has been deployed, and preliminary results
show that it is capable of competing with AES.

The authors created a producer to produce numbers arbitrarily using a unidimensional type of
extended automata.[9]
In the next article, the writers proposed a new graphic symmetric cryptosystem to encode coloured
pictures defined by pixels and many other colours in their paper[10]. This cryptosystem employs a
pseudo random bit generator and is based on bi-dimensional cellular-automata.

Study of Cellular Automata Applications by Kumaresan and Gopalan used numerous examples and
examined the fundamental ideas of several functions of automata which discusses their uses in this
field.[11]

We reviewed a journal in which the authors researched about one dimensional cellular automata and
used a genetic model to see protocols of cellular automata cells resulting in sequences matching for
symmetric key cryptography.[12]

3. PROBLEM STATEMENT

With the growing influence of the internet in terms of communication and e-commerce, data security
is becoming increasingly important. The data security can be provided by various encryption
techniques. These techniques use various algorithms to make the encryption and decryption more
secure. The goal of this project is to provide a novel encrypting system that makes use of a FSM and
recurrence matrix.

4. METHODOLOGY

The following table shows the conversion of alphabets/characters to specific numerical values.

Table I

Encryption :

1. Take the String input as plain text. Encode each character according to the table. Split the plain
text into x number of characters, and then position them into a matrix of order x, where x is
greater than 0. This square matrix is called a plain matrix.
2. Get the input for the machine by adding all the numbers of the plain matrix and converting the
final result into binary form. This input is the secret key too.
3. Create a Finite state machine. For this project we have used the “Mealy machine”.
4. The recurrence matrix will be used to build the key matrix.
5. The formula for calculating the encrypted text matrix is: Encrypted matrix at t𝑖+1th state =
Encrypted matrix at t𝑖th state (Key) (result at t𝑖+1th state)(mod p).
6. Using the above formula calculate the cipher text matrix for all plain text matrices, at each
stage.
7. Finally, reconvert the numbers of the last encrypted matrix into alphabets or characters. Lastly,
send this encrypted text to the receiver.

Decryption :

1. The encrypted text, matrix, private key and FSM are sent to the recipient..
2. Conversion of each symbol into corresponding value using the above table.
3. Then , the original message is obtained at the end.

Instancing Encryption:

1. Take a plain text, for example ‘ENCRYPT DECRYPT’.


2. Convert them to numerical form using alphabet to numerical conversion table.
3. Organise it in a matrix.

4. Add the plain text’s numerical values and convert it into binary form. So we get 11111100 as
the secret key.
5. If we give this as an input to the Mealy machine, the output considering residue mod 5 can be
given as:

6. Consider a key matrix and use formula 1 to compute the cypher matrix for each state.
7. This would result as follows.
Hence, the encrypted string is : XPP@AANLAVFMAANL

Instancing Decryption :
1. Using the alphabet to numerical conversion table, change each symbol of the final ciphered
text into a numeric value.
2. Arrange the numeric values into the square matrix.
3. Formula for calculating the matrix :
Encrypted matrix at t state = Encrypted matrix at t𝑖+1 th state * [inverse of {(Key)(output at
t𝑖+1 th state)}](mod p), where we take p = 31.
4. The final matrix obtained after performing all the Decryption steps is :

5. Reconvert each character of the above matrix into numeric using the above table. We receive
the original message ie - ENCRYPT DECRYPT.
5. Future Scope
The algorithm of the encryption technique can be made even stronger to prevent malicious attacks.
This study proposes two optimization targets to define greater algorithm efficiency: the fewest
ciphertext pairings and the minimum computational complexity. We provide the related optimum key
recovery algorithms with varied optimization orders of these two goals. This method is helpful in
sectors where sensitive data must be delivered, such as banking and military services.

6. Conclusion
The proposed approach is based on several matrix operations and a FSM. The selected FSM,
recurrence matrix, other matrix operations and secret key all contribute to the security. Although
extracting original information from encrypted text is challenging, a method exists.

References
[1] Encryption and Decryption scheme involving Finite State Machine and LU Decomposition by
Ayush Mittal, Dr. Ravindra Kumar Gupta
[2] Cryptographic Limitations on Learning Boolean Formulae and Finite Automata by Michael
Kearns, Leslie Valiant
[3] Application of finite automata in cryptography by
A.A.Sharipbay,Zh.S.Sarukhanova,G.B.Shayakhmetova,N.Z.Soukhanov
[4] On Linear Finite Automata and Cryptography by Ivone Amorim, Ant ́onio Maquiavelo, Rog ́erio
Reis
[5] Encryption and Decryption Using Automata Theory by Zubair Saqib, Murtza Ahmad Shahid and
Muhammad Umair Ashraf
[6] Encryption and Decryption algorithm using two dimensional by Zubair Saqib, Murtza Ahmad
Shahid and Muhammad Umair Ashraf
[7] Cellular automata rules in Cryptography by Sambhu Prasad , Umesh Prasad , Madhusmita Sahu
[8] Cryptography Using Cellular Automata byHarsh Bhasin, Ramesh Kumar, Neha Kathuria
[9] Harsh Bhasin, Ramesh Kumar, Neha Kathuri A Symmetric Cryptography based on Extended
cellular automata by Zhao Xuelong, Li Qianmu, Xu Manwu and Liu Fengyu
[10] Graphic Cryptography with Pseudorandom Bit Generators and Cellular Automata Gonzalo
Alvarez Mara on, Luis Hern ́andez Encinas,Ascenso ́on Hern ́andez Encinas, Angel Mart ́ ́ ın del
Rey, and Gerardo Rodr ́ıguez S ́anchez
[11]An Analytical Study of Cellular Automata and its applications in Cryptography by G. Kumaresan,
N.P. Gopalan
[12] Evolving Collective Behavior of Cellular Automata for Cryptography by Miroslaw Szaban,
Franciszek Seredynski and Pascal Bouvry.

[13] Vayadande Kuldeep, Ritesh Pokarne, Mahalaxmi Phaldesai, Tanushri Bhuruk, Tanmai Patil,
and Prachi Kumar. "SIMULATION OF CONWAY’S GAME OF LIFE USING CELLULAR
AUTOMATA." International Research Journal of Engineering and Technology (IRJET) 9, no. 01
(2022): 2395-0056.
[14] Vayadande Kuldeep, Ram Mandhana, Kaustubh Paralkar, Dhananjay Pawal, Siddhant
Deshpande, and Vishal Sonkusale. "Pattern Matching in File System." International Journal of
Computer Applications 975: 8887.
[15] Vayadande Kuldeep, Neha Bhavar, Sayee Chauhan, Sushrut Kulkarni, Abhijit Thorat, Cellular
automata Image Encryption.
[16] Kuldeep Vayadande, Harshwardhan More,Omkar More, Shubham Muley,Atahrv Pathak,
Vishwam Talanikar, “Pac Man: Game Development using PDA and OOP'', International Research
Journal
[17] Kuldeep B. Vayadande, Parth Sheth, Arvind Shelke, Vaishnavi Patil, Srushti Shevate,
Chinmayee Sawakare, “Simulation and Testing
[18] of Deterministic Finite Automata Machine,” International Journal of Computer Sciences and
Engineering, Vol.10, Issue.1, pp.13-17, 2022.
[19] Rohit Gurav, Sakshi Suryawanshi,Parth Narkhede,Sankalp Patil,Sejal Hukare,Kuldeep
Vayadande,” Universal Turing machine simulator”, International Journal of Advance Research,
Ideas and Innovations in Technology, ISSN: 2454-132X, (Volume 8, Issue 1 - V8I1-1268
[20] Kuldeep Vayadande, Krisha Patel, Nikita Punde, Shreyash Patil, Srushti Nikam, Sudhanshu
Pathrabe, “Non-Deterministic Finite Automata to Deterministic Finite Automata Conversion by
Subset Construction Method using Python,” International Journal of Computer Sciences and
Engineering, Vol.10, Issue.1, pp.1-5, 2022.
[21] Kuldeep Vayadande and Samruddhi Pate and Naman Agarwal and Dnyaneshwari Navale
and Akhilesh Nawale and Piyush Parakh,” Modulo Calculator Using Tkinter Library”, EasyChair
Preprint no. 7578, EasyChair, 2022.

You might also like