Symmetric Key Cryptosystem based on Sequential State Machine

Cryptography is a type of art that translate strings of plain text into strings of cipher text and is very important in sharing of secrete information in communication system. It is very essential to have cryptographic algorithms to provide high security by utilizing optimum computational resources during information sharing to achieve data confidentiality, privacy, integrity and other security services. The traditional conventional encryption algorithms (DES, AES) have high computational cost due to generating number of sub keys and bilinear concept. Hence this paper propose the sequential state machine (Mealy state Machine) based cryptosystem which is very light weight in nature and provide high security due to its weakly invertability concept with relatively smaller key size. The paper also presents the performance analysis on proposed algorithm and describes the security analysis on it.


Introduction
Cryptography is an art of language used for transmitting the secrete writing [1]. The main idea of cryptography is to translate meaningful message or sentence to uncommon message which is not understood by unauthorized person. This process is useful only when hard to retrieve the original message. The cryptography acts as middle man between sender and receiver who take care of secrecy of information being transmitted. In the cryptography technology, the original or human understandable message is called "Plain text", the translated message is called "cipher text or crypto text" and the technique is used for the translation process is called "Encryption and decryption" technique. The research scientists have proposed different hybrid encryption techniques of symmetric or one key encryption [2,3] (DES, AES, Blowfish, Twofish etc.) and Asymmetric or public key encryption (RSA, ECC, Elgamal, ABE, IDE, FKE, QKE, HE, etc.). The basic objective of these techniques to provide confidentiality, privacy, integrity, authentication, authorization, auditing, non-repudiation services [4,5] over the data transmission in insecure channel. All these techniques are based on number theory which might cost heavily due to utilization of large number of computational resources, bi-linear theory and logarithmic concept. Due to this reason, many researchers have shown their interest towards the state machine based cryptosystem. The mathematical model of finite state machine based cryptography is widely studied and presented in [6]. Authors have presented the one-key and public key based encryption and decryption technique. The idea of state machine based cryptosystem is very simple. The encryption process will be depends on the state machine that acts as key space for encryption process and the inverse of state machine acts as key space at receiver end for decryption process. the security of the system relies on the difficulties in constructing the inverse machine to decrypt the information.
The traditional cryptography techniques are based on number theory [7] gives more computational cost interms of time complexity. The authors of [8,9,10,11,12,13] have started proposing the cryptosystem based on cellular automaton and later finite state automaton based cryptosystem -a mathematical model has been presented by the author [6]. The author also described that, the applications of finite state machine can be used for one-key and two-key cryptosystem. In this paper we discusses the performance of one-key cryptosystem based on sequential state machine(Mealy state machine) for different size of plain text. This paper also gives an insight into security analysis on proposed methods.

Motivating Example
One key or shared key cryptosystem is a method of encryption and decryption process that is uded used for secrete communication between two parties [14]. This cryptosystem is faster than two-key cryptosystem -consumes the lot of network and CPU resources due to its bi-linear concept used in key generation algorithm and one-key cryptosystem is also efficient to provide confidentiality and privacy of information being transmitted in communication channel [14]. Due to the better efficiency and faster in time complexity than two-key cryptosystem, it is used in encrypting huge amount of data being exchanged between client and server.
The security of existing one-key cryptosystem [2,3] (DES,AES,Blowfish,RC4) is depends on length of key, bi-linear theory and logarithmic concept of number theory. This will leads to significant delay in encryption and decryption process eventhough these cryptosystems are highly effective [15]. The researchers [16,9,10,11,12,13,17,18] have concentrated only on two-key cryptosystem based on finite state machine. It is very essential to have one-key cryptosystem that consumes less resources and provide faster encryption and decryption mechanism during data intransit. Consider the scenario of HTTP client server secure communication [19] as a motivating example where user as a client would like to make online money transaction through the online banking system. The customer enters url of netbanking in browser that will initiate HTTP connection between customer and bank server. The bank server takes the login credentials and verify. Once the customer credentials are accepted, the HTTP protocol(at Client side) shares the secrete key (shared key) to bank server as session key to have secure communication between customer and bank server. The all communication between customer and bank server will be encrypted and decrypted by using session key at both the ends [20]. It is very important that, the encryption and decryption algorithm must be faster and efficient one for large data set. Hence we propose a very light weight one-key cryptosystem for encryption and decryption process based on sequential state machine. The system has relatively small key size and higher security due to its weakly invertablity concept.
The rest of the paper is organized as follows: Section 1 briefs about the introduction on cryptography and its applications and about sequential state machine. The sequential state machine based one-key cryptosystem is explained in section 2 with proposed method and algorithm. The section 3 discusses the experimentation details and security analysis on proposed method. The section 4 gives you the related work on cryposystems based on state machines IOP Publishing doi:10.1088/1757-899X/1187/1/012026 3 proposed by researchers and scientists. Finally we conclude the paper in section 5.

Cryptosystem based on Sequential state Machines
Sequential state machine changes their states and produces the output sequence for each input symbols [21]. The behavior of the sequential state machine are represented by set of components: Set of states, set of input symbols, set of output symbols, start state and final state. There are two types of sequential state machines -Moore Machine and Mealy machine and these machines are also called as finite state machine since the states in the machines are finite. These machine are used as cryptography techniques due to its generation of output sequence for each input sequence. Most of the proposed cryptography uses the applications of cellular automata, transducers (More and Mealy Machine) and state machines with accepting state and without output symbols. It means to say that, the system provides output sequence for each input sequence at different states are called sequential state machines. These Moore and Mealy machines are represented by graphical notation for digital circuits [22]. (i) The Mapping function δ for any given state q 0 ∈ Q and the input sequence a 0 a 1 ....a l−1 ∈ I with length l > 0, then we get next states q i ∈ Q i.e δ(q 0 , a 0 a 1 a 2 ......a l−1 ) = q i+1 ∈ Q where q 0 is the current state and q i+1 is the next states for each input sequence a 0 , a 1 , a 2 .....a l−1 ∈ I. Consider the transition table of M shown in table 1 and string 10010, then The mapping function λ for moore and Mealy machines are defined as (a) The mapping function for mealy machine λ with any state q 0 ∈ Q and the input sequence a 0 a 1 a 2 ....al − 1 ∈ I with length l > 0, then we get sequence of output symbols are the set of output sequence for the input sequence a 0 a 1 a 2 .....a l−1 ∈ I. This is also equivalent to λ(δ(q 0 , a 0 ), a 1 a 2 .....a l−1 ) In this length of output sequence must be same as length of input sequence. Consider the transition table of M shown in table 1 and string 10010, then (b) For moore machine, the mapping function λ is with any states q 0 , q 1 .....q n , then we get sequence of output symbols on each O are the set of output sequence for the input sequence a 0 a 1 a 2 .....a l−1 ∈ I on each state q i .
We are using mealy state machine in our proposed method. The applications of Mealy state machine (MSM) is used for encoding (Encryption) and decoding (Decryption) of cryptosystem. It is very essential to obtain inverse of MSM M = (Q, I, O, δ, λ, q 0 ) can be used for decoding process. One of the most important issue in information coding and transmission is to reconstruct the input sequence (data transmitted) from output sequence at receiver end. We use MSM based encoder and decoder to encrypt and decrypt the data at sender and receiver end respectively. That means, receiver must have inverse of MSM to reconstruct the input sequence from the received output sequence. The inverse of MSM is a state machine that produces the input sequence with finite delay. If machine is information loss less then only inverse of MSM can be constructed. Therefore, first the MSM must be verified whether it is information lossless or not [23]. A MSM is said to be information loss less of order(µ), if lower testing table [23] does not consist of same repeating pair of states. Consider the states in the MSM are Q = {q 0 , q 1 , q 2 , ....} and pair of states (q 0 , q 0 ), (q 1 , q 1 )...etc said to be repeating same pair of states. The MSM with no repeating such states are called information loss less.
A  The table 2 shows the encoding(encryption) and decoding(Decrption) process by using MSM for the sample input sequence 11100101 and the same sequence is reconstructed at receiver end from the output sequence 11000011. The transition movement along with output bit generation for each input bit is also presented in table 2.
The plain text (input sequence) a 0 a 1 a 2 ....a i will be represented over the GF (2) or sequence of binary bits. These binary bits will be input symbols to MSM M = (Q, I, O, δ, λ, q 0 ) that encrypts it and generate the cipher text (output sequence). Before generating output sequence, the permutation function is applied to plain text to construct the randomness of cipher text as shown in figure 1(a). The encoder in figure 1(a) takes plain text a i and apply the permutation function g(a i ) on plain text a i and give it to MSM M . The MSM M generates the cipher text(output sequence) b i with help of output mapping function λ and the same is shown in figure 1(a). The plain text will be reconstructed at the receiver end by using inverse of MSM M = (Q , I , O , δ , λ , q 0 ) as shown in figure 1(b). The decoder in figure 1(b) takes cipher text b i and apply the inverse permutation function g −1 (b i ) on b i and give it to inverse of MSM M . The M generate the corresponding output sequence as plain text for input sequence(cipher text)b i received from encoder and the same is shown in figure 1(b).
The algorithm 1 presents the step wise step for encryption and decryption process by using MSM and the size of key space is used in the algorithm is length of states in MSM. If size of each state is one byte then the size of key space will be K = |Q| × 8. Consider the same scenario discussed in motivating example, the plain text over GF (2)   That means to say that, we considered |Q| × 8 = 64 bit key space for the encryption and decryption process and the number of rounds will be depending upon number of plain text block size.
The plain text(Input sequence) a 0 a 1 a 2 ......a i will be represented over GF (2) [2,3] or sequence of binary bits. These binary bits are inputs to the MSM that encrypt plain text(msg in figure 3) and produce cipher text(cipher in figure 3) and original plain text(in figure 3) can be retrieved back from cipher text, the same is as shown in figure 3. It also apply the permutation function g(a i ) to binary bits of plain text. The plain text is divided into number of blocks of size 64 bits. The performance has been conducted for both DES and designed algorithm in python 3 interpreter with above mentioned system configuration and speed of proposed method has been observed for different size of plain text and same is presented in the table 1 and figure 4. The computer system with above configuration was running with 97 process with CPU usage 51% and physical memory 73%. The table 3 and figure 4 shows that, the proposed method has better time complexity compare to DES algorithm in encryption and decryption process.

Security Analysis
The proposed cryptography based on mealy state machine has variable length of key space is depends on the number of states in the machine. If number of states in the MSM is 8, then size of key will be 64 bit. The key space is of variable length depends on the number of states present in the state machine and same is used in the proposed method. The security of algorithm will be increased if MSM has more number of states. Since entire MSM is a key space in the encryption and decryption process, it is very difficult to find the decryption key for eavesdropper due to its weakly invertable concept. In our implementation, we define 8 states, that means to say that size of key is 64 bit in the designed algorithm. The eavesdropper need 2 |Q|×8 time to get encryption key. Even if eavesdropper is able to get the encryption key, but it is very hard to get inverse of MSM. Hence the security of proposed method is completely depends on the Mealy state machine and number of states used in it.

Related Work
The sequential state machines are the models that takes the sequence of inputs and produces the sequence of outputs. These models are used as cryptographic techniques due to its generation of outputs sequence for the input sequences. The primary concept of sequential state machine based cryptosystem is very simple: The encryption key will be a state machine itself and inverse of it is the key for decryption. The security of whole system is depends on the difficulties in identifying state machine and inverse of given state machin [24]. Most of the proposed cryptography uses the applications of cellular automata, transducers (More and Mealy Machine) and state machines with accepter and without output symbols. The author of [8] has proposed the cellular automata based cryptosystem in 1985 to generate pseudorandom stream of bits P i , then later the sequence of bits will be added to plain text a i for cipher text generation i.e C i = P i ⊕ a i . The decryption process is found in [16] and in this method, if plain text sequence a i is known to adversory, then known-plain text attack can be possible. To overcome this problem, the author of [25] presented cryptosystem based on reversible cellular finite automata. The cipher text will be generated by using cellular finite automata, but the key size used in this method is big problem [24]. The other cryptography techniques based on cellular automata is found in [9,10,11,12,13] The author of [26] has presented novel encryption technique for sharing of secrete information by using finite state machine. The author has used the recurrence relation matrix to get the cipher text, but there is no performance testing of proposed automata based cryptography. These systems depends on constructing the inverse of it. The author of [27] has developed and presented one-key cryptosystem by using extended mealy state machine. However, it is observed that, the brute force attack is possible on the proposed method and also it is slower than the DES encryption alogirthm. Then later the author [6] presented a mathematical model of cryptography (one-key and two key) based on extended finite state automata. The authors presented different mathematical models of public key cryptosystem like FAPKC, FAPKC2 and FAPKC3 based on linear and non-linear finite state automata.
The stream cipher technique based on Rabbin-scott model of finite state machine is presented in [17] i.e state machine without output symbols. The proposed method suffers from the practical difficulties that effects the performance of algorithm. The author of [7] has presented DES encryption technique based on finite automata for plain text as well as images. The author have used finite state machine for generating 16 sub-keys for encryption and decryption process and also presented the performance testing for different texts size and images. The author of [18] have proposed finite state machine based block cipher to exploit the idea of parallel computation and introduce the new block cipher that perform well with high security. This block cipher depending upon the moore machine that is used for encryption and decryption process. The Moore machine based cryptography is also presented in [28]. The paper presents the secret sharing technique by using fibonacci recurrence matrix to provide higher security so Based on the observations made in related work, the most of the authors have concentrated only on public key based cryptosystem based on finite state machine which are relatively slow compare to DES encryption algorithm and exploited to cryptanalytic attacks. Hence we propose symmetric key (one key) encryption technique based on sequential state machine (Mealy Machine) which is faster than DES and provide higher security due to weakly invertible state machine concept.

Conclusion
The one-key cryptosystem is faster than two-key cryptosystem consumes the lot of network and CPU computational resources. One-key cryptosystem is also efficient to provide confidentiality and privacy of information being transmitted in communication channel. The traditional conventional one-key cryptosystems are in high computational cost due to security dependency on size of key, key generation algorithm and bilinear concept. It is very essential to reduce the time complexity of cryptosystem during data communication system. The proposed sequential state machine -Mealy State Machine(MSM) based one-key cryptosystem that reduces the time complexity 30% w.r.t DES algorithm that utilizes the optimal computational resources and provide the higher security due to difficulties in identifying MSM M as well as inverse of MSM M . The proposed algorithm is explained with help of motivating example and then implementation results are compared with DES block cipher algorithm with 64 bit key size, the proposed method is faster than the DES algorithm.
This work can be further expanded by using extended mealy machine with additional customize excitation function to provide higher randomness and higher security.  Table 1. Mealy state machine with its inverse M -Transition Table  δ a = 0 a = 1