1 CHAPTER 1 ON FINITE STATE MACHINES AND RECURSSIVE FUNCTIONS – APPLICATIONS TO CRYPTOSYSTEMS 1.1 Introduction The thesis “ON FINITE STATE MACHINES AND RECURSSIVE FUNCTIONS – APPLICATIONS TO CRYPTOSYSTEMS” suggest that this thesis deals with cryptosystems using finite state machines and recurssive function, which is required in the present e- world . The latest technologies being developed now a days primarily aim towards automation in real time. Some of the illustrative examples are NASA’s Mars roves, Robots, Mobile cellular phones etc., each of these application performs a specific defined function. Such systems which pave way for automation are based on the basic concept called real time embedded system. 1.1.1 Finite state machines A finite-state machine (FSM) or finite-state automaton or simply a state machine, is a mathematical abstraction sometimes used to design digital logic or computer programs. It is a behavior model composed of finite number of states, transitions between those states, and actions, similarly to a flow graph in which one can inspect the way logic runs when certain conditions are met. It has finite internal memory, an input feature that reads symbols in a sequence, one at a time without going backward; and an output feature, which may be in the form of a user interface, once the model is implemented. The operation of an FSM begins from one of the states (called a start state), goes through transitions depending on input to different states and can end in any of those available, however only a certain set of states mark a successful flow of operation (called accept states). There are many variants, for instance, machines having actions(outputs) associated with transitions (Mealy 2 machines) or states (Moore machines), transitions conditioned on no input symbol or more than one transition for a given symbol and state (non deterministic finite state machine), one or more states designated as accepting states etc. Finite state machines are of two types. The original simple finite state machine is deterministic, meaning that given an input and the current state, the state transition can be predicted. An extension on the concept at the opposite end is a non – deterministic finite state machine. This is where given the current state; the state transition is not predictable. It may be the case that multiple inputs are received at various times, means the transition form the current state to another state cannot be known until the inputs are received (event driven). There are two main methods for handling where to generate the out puts for a finite state machine. They are called a Moore machine and a Mealy machine, named after their respective authors. A Moore machine is a type of finite state machine where the out puts are generate as products of the states. In Moore Machine every of finite state machine has a fixed output. Mathematically Moore machine is a six- tuple machine and is defined as M= ( Q, ∑, ∆, δ , λ' , q0 ) Q : A nonempty finite set of state in Moore machine ∑ : A nonempty finite set of inputs. ∆ : A nonempty finite set of outputs. δ : It is a transition function which takes two arguments one is input state and another is input symbol. The out put of this function is a single state. λ' : Is a mapping function which maps Q x ∑ to ∆ , giving the output associated with each transition. 3 q0 : is the initial state of Q For example Moore Machine which calculates residue mod 2 is Fig 1.1 Moore Machine which calculates residue mod 2 A Mealy machine unlike a Moore machine is a type of finite state machine where the outputs are generated as products of the transition between states. Mealy machine is a six- tuple machine and is defined as M= ( Q, ∑, ∆, δ , λ' , q0 ) Q : A nonempty finite set of state in Moore machine ∑ : A nonempty finite set of inputs. ∆ : A nonempty finite set of outputs. δ : It is a transition function which takes two arguments one is input state and another is input symbol. The out put of this function is a single state. λ' : Is a mapping function which maps Q x ∑ to ∆ , giving the output associated with each transition. q0 : is the initial state of Q For example Mealy Machine which calculates residue mod 2 is 4 Fig. 1.2 Mealy machine which calculates residue mod2 1.1.2 Advantages of Finite state machine • Their simplicity makes it easy for inexperienced developers to implement with little to no extra knowledge (low entry level). • Predictability (in deterministic Finites state machine), given a set of inputs and a known current state, the state transition can be predicted, allowing for easy testing. • Due to their simplicity, finite state machines are quick to design, easy of implementation and fast in execution. • Finite state machine is an old knowledge representation and system modeling technique and it is been around for a long time, as such it is well proven even as an artificial intelligence technique, with lots of examples to learn form. • Finite state machines are relatively flexible. There are a number of ways to implement a finite state based system in terms of topology, and it is easy to incorporate many other techniques. 5 • Easy to transfer from a meaningful abstract representation to a coded implementation. • Low processor overhead well suited to domains where execution time is shared between modules or subsystem. Only the code for the current state needs to be executed, and perhaps a small amount of logic to determine the current state. • Easy determination of reach ability of state, when represented in an abstract form, it is immediately obvious whether a state is achievable from another state, and what is required to achieve the state. 1.1.3 Disadvantages of Finite state machine • The predictable nature of deterministic finite state machines can be unwanted in some domains such as computer games (solution may be non – deterministic finite state machine). • Larger systems implemented using a finite state machine can be difficult to manage and maintain with out a well thought out design. The state transitions can cause a fair degree of “spaghetti – factor “when trying to follow the line of execution. • Not suited to all problem domains, should only be used when a systems behavior can be decomposed into separate states with well defined conditions for state transitions. This means that all states, transitions and conditions need to be known up front and be well defined. • The conditions for state transitions are ridged, meaning they are fixed. 6 1.1.4 Applications of finite state systems In computer science we find many examples of finite state system, the theory of finite state systems, and the theory of finite automata as a useful design tool for these systems. A primary example is a switching circuit. A switching circuit is composed of finite number of gates, each of which can be in one or two conditions, usually denoted by 0 and 1. • Automata theory plays an important role when we are making software for designing and checking the behavior of digital circuit. • The lexical analyzer of the typical compiler, that is the compiler component that breaks the input text into logical units such as identifiers, key words and punctuations. • Software for scanning large bodes of text, such as collections of pages, to find occurrence of words, phrases or other patterns, • Automata theory is very important to software for verifying systems of all types that have a finite number of distinct states such as communications protocols or protocol for secure exchange of information. • Automata theory is most useful concept of software for natural language processing. • Finite state machines are an adopted artificial intelligence technique which originated in the field of mathematics, initially used for language representation. It is closely related to other fundamental knowledge representation techniques which are worth mentioning, such as semantic networks and an extension of semantic net works called state spaces. 7 1.1.5 Recurrence relations A recurrence relation relates the nth element of a sequence to its predecessors. Recurrence relations are useful in certain counting problems like Fibonacci number. A recursive relation for the sequence a 0 , a1 , a 2 .......... an−1 ………. Initial conditions for the sequence a 0 , a1 , a 2 .......... are explicitly given values for a finite number of the terms of the sequence. For example The Fibonacci numbers Fn are the terms of the sequence 0, 1,1,2,3,5,……wherein each term is the sum of the two preceding terms, and we get things started with 0 and 1 as F0 and F1 . A k-th order linear recurrence relation for the sequence a 0 , a1 , a 2 ,.......... has the form a n = c1 a n −1 + c 2 a n − 2 +….+ c k a n− k + f n for n>k where c1 , c 2 .,.........c k are constants and f n is given some sequence. If f n =0, then the linear recurrence relation is called homogeneous. Recurrence relations are used in various fields of engineering such as computer science, Electrical and electronics and also in biology etc. 1.1.6 Cryptography Cryptography is the study of mathematical techniques related to aspects of information security such as confidentiality, data integrity, entity authentication and data origin authentication. Cryptography is not the only means of providing information security but rather onset of techniques. 1.1.7 Cryptographic goals 1. Confidentiality is a service used to keep the content of information from all but those authorized to have it. Secrecy is a term synonymous with confidentiality and privacy. There are numerous approaches to providing confidentiality, ranging from physical protection to mathematical algorithms which render data unintelligible. 8 2. Data integrity is a service which addresses the unauthorized alteration of data. To assure data integrity, one must have the ability to detect data manipulation by unauthorized parties. Data manipulation includes such things as insertion, deletion, and substitution. Fig. 1.3 Cryptography goals 3. Authentication is a service related to identification. This function applies to both entities and information itself. Two parties entering into a communication should identify each other. Information delivered over a channel should be authenticated as to origin, date of origin, data content, time sent, etc. For these reasons this aspect of cryptography is usually subdivided into two major classes: entity authentication and data origin authentication. Data origin authentication implicitly provides data integrity (for if a message is modified, the source has changed). 4. Non-repudiation is a service which prevents an entity from denying previous commitments or actions. When disputes arise due to an entity denying that certain actions were taken, a means to resolve the situation is necessary. For example, one entity may authorize the purchase of property by another entity and later deny such authorization was granted. A procedure involving a trusted third party is needed to resolve the dispute. 9 1.1.8 Classification Cryptographic systems are generally classified along three independent dimensions: 1. Type of operations used for transforming plaintext to cipher text. All encryption algorithms are based on two general principles. Those are substitution, in which each element in the plain text is mapped into another element and transposition in which elements in the plaintext are rearranged. The fundamental requirement is that no information be lost. Most systems referred to as product systems, involved multiple stages of substitution and transposition. 2. The number of keys used: If sender and receiver use the same key, the system is referred to as symmetric, single key or secret key conventional encryption. If the sender and the receiver each uses a different key the system is referred to as asymmetric, two key, or public-key encryption. 3. The way in which the plaintext is processed: A block cipher processes the input on block of elements at a time, producing an output block for each input block. A stream cipher processes the input elements continuously, producing output one element at a time, as it goes along. 1.1.9 Algorithms and Keys A cryptographic algorithm, also called a cipher, is the mathematical function used for encryption and decryption. (Generally, there are two related functions: one for encryption and the other for decryption). If the security of an algorithm is based on keeping the way that algorithm works a secret, it is a restricted algorithm. Restricted algorithms have historical interest, but are woefully inadequate by today’s standards. A large or changing group of users cannot use them, because every time a user leaves the group everyone else 10 must switch to a different algorithm. If someone accidentally reveals the secret, everyone must change their algorithm. Even more damning, restricted algorithms allow no quality control or standardization. Every group of users must have their own unique algorithm. Such a group can’t use off-the-shelf hardware or software products; an eavesdropper can buy the same product and learn the algorithm. They have to write their own algorithms and implementations. If no one in the group is a good cryptographer, then they won’t know if they have a secure algorithm. Despite these major drawbacks, restricted algorithms are enormously popular for low-security applications. Users either don’t realize or don’t care about the security problems inherent in their system. Modern cryptography solves this problem with a key, denoted by K. This key might be any one of a large number of values. The range of possible values of the key is called the key space. Both the encryption and decryption operations use this key (i.e., they are dependent on the key and this fact is denoted by the K subscript), so the functions now become: Ek(M) = C Dk( C) = M Those functions have the property that: Dk (Ek(M)) = M Some algorithms use a different encryption key and decryption key. That is, the encryption key, K1, is different from the corresponding decryption key, K2. In this case: Ek1 (M) = C Dk2(C) = M 11 Dk2 (Ek1 (M)) = M All of the security in these algorithms is based in the key (or keys); none is based in the details of the algorithm. This means that the algorithm can be published and analyzed. Products using the algorithm can be mass-produced. It doesn’t matter if an eavesdropper knows your algorithm; if she doesn’t know your particular key, she can’t read your messages. Figure 1.4 Process of encryption and decryption A cryptosystem is an algorithm, plus all possible plaintexts, cipher texts, and keys. 1.1.10 Symmetric Algorithms There are two general types of key-based algorithms: symmetric and publickey. Symmetric algorithms, sometimes called conventional algorithms, are algorithms where the encryption key can be calculated from the decryption key and vice versa. In most symmetric algorithms, the encryption key and the decryption key are the same. These algorithms, also called secret-key algorithms, single-key algorithms, or one-key algorithms, require that the sender and receiver agree on a key before they can communicate securely. The security of a symmetric algorithm rests in the key; divulging the key means that anyone could encrypt and decrypt messages. As long as the communication needs to remain secret, the key must remain secret. Encryption and decryption with a symmetric algorithm are denoted by: Ek(M) = C Dk (C) =M 12 Symmetric algorithms can be divided into two categories. Some operate on the plaintext a single bit (or sometimes byte) at a time; these are called stream algorithms or stream ciphers. Others operate on the plaintext in groups of bits. The groups of bits are called blocks, and the algorithms are called block algorithms or block ciphers. 1.1.11 Public-Key Algorithms Public-key algorithms (also called asymmetric algorithms) are designed so that the key used for encryption is different from the key used for decryption. Furthermore, the decryption key cannot (at least in any reasonable amount of time) be calculated from the encryption key. The algorithms are called “public-key” because the encryption key can be made public: A complete stranger can use the encryption key to encrypt a message, but only a specific person with the corresponding decryption key can decrypt the message. In these systems, the encryption key is often called the public key, and the decryption key is often called the private key. The private key is sometimes also called the secret key, but to avoid confusion with symmetric algorithms, that tag won’t be used here. Encryption using public key K is denoted by: Ek(M) = C Even though the public key and private key are different, decryption with the corresponding private key is denoted by: Dk( C) = M Sometimes, messages will be encrypted with the private key and decrypted with the public key; this is used in digital signatures. Despite the possible confusion, these operations are denoted by, respectively: Ek(M) = C Dk( C) = M 13 1.1.12 Symmetric-key vs. public-key cryptography Symmetric-key and public-key encryption schemes have various advantages and disadvantages, some of which are common to both. (i) Advantages of symmetric-key cryptography 1. Symmetric-key ciphers can be designed to have high rates of data throughput. Some hardware implementations achieve encrypts rates of hundreds of megabytes per second, while software implementations may attain throughput rates in the megabytes per second range. 2. Keys for symmetric-key ciphers are relatively short. 3. Symmetric-key ciphers can be employed as primitives to construct various cryptographic mechanisms including pseudorandom number generators, hash functions, and computationally efficient digital signature schemes, to name just a few. 4. Symmetric-key ciphers can be composed to produce stronger ciphers. Simple transformations which are easy to analyze, but on their own it can be used to construct strong product ciphers. 5. Symmetric-key encryption is perceived to have an extensive history, although it must be acknowledged that, notwithstanding the invention of rotor machines earlier, much of the knowledge in this area has been acquired subsequent to the invention of the digital Computer, and, in particular, the design of the Data Encryption Standard in the early 1970s. (ii) Disadvantages of symmetric-key cryptography 1. In a two-party communication, the key must remain secret at both ends. 2. In a large network, there are many key pairs to be managed. Consequently, effective key management requires the use of an unconditionally trusted TTP. 14 3. In a two-party communication between entities A and B, sound cryptographic practice dictates that the key be changed frequently and perhaps for each communication session. 4. Digital signature mechanisms arising from symmetric-key encryption typically require either large keys for the public verification function or the use of a TTP. (iii) Advantages of public-key cryptography 1. Only the private key must be kept secret (authenticity of public keys must, however, be guaranteed). 2. The administration of keys on a network requires the presence of only a functionally trusted TTP as opposed to an unconditionally trusted TTP. Depending on the mode of usage, the TTP might only be required in an “off-line” manner, as opposed to in real time. 3. Depending on the mode of usage, a private key/public key pair may remain unchanged for considerable periods of time, e.g., many sessions (even several years). 4. Many public-key schemes yield relatively efficient digital signature mechanisms. The key used to describe the public verification function is typically much smaller than for the symmetric-key counterpart. 5. In a large network, the number of keys necessary may be considerably smaller than in the symmetric-key scenario. (iv) Disadvantages of public-key encryption 1. Throughput rates for the most popular public-key encryption methods are several orders of magnitude slower than the best known symmetric-key schemes. 15 2. Key sizes are typically much larger than those required for symmetric-key encryption, and the size of public-key signatures is larger than that of tags providing data origin authentication from symmetric-key techniques. 3. No public-key scheme has been proven to be secure (the same can be said for block ciphers). The most effective public-key encryption schemes found to date have their security based on the presumed difficulty of a small set of number-theoretic problems. 4. Public-key cryptography does not have as extensive a history as symmetric-key encryption, being discovered only in the mid 1970. 1.1.13 Attacks Over the years, many different types of attacks on cryptographic primitives and protocols have been identified. Attacks are mainly classified as 1. Passive attack: A passive attack is one where the adversary only monitors the communication channel. 2. Active attack: An active attack is one where the adversary attempts to delete, add or in some other way alter the transmission on the channel. 1.1.14 Attacks on encryption schemes The objective of the following attacks is to systematically recover plaintext from cipher text, or even more drastically, to deduce the decryption key. 1. Cipher text only attack: A cipher text only attack is one where the adversary tries to deduce the decryption key or plaintext by only observing cipher text. Any encryption scheme vulnerable to this type of attack is considered to be completely insecure. 16 2. Known plain text attack: A known plain text attack is one where the adversary has a quantity of plaintext and corresponding cipher text. This type of attack is typically only marginally more difficult to mount. 3. Chosen plain text attack: A chosen plaintext attack is one where the adversary chooses plaintext and is then given corresponding cipher text. Subsequently, the adversary uses any information deduced in order to recover plaintext corresponding to previously unseen cipher text. 4. Adaptive chosen-plain text attack: An adaptive chosen-plain text attack is a chosen plaintext attack wherein the choice of plaintext may depend on the cipher text revived from previous requests. 5. Chosen cipher text attack: a chosen cipher text attack is one where the adversary selects the cipher text and is then given the corresponding plaintext. One way to mount such an attack is for the adversary to gain access to the equipment used for decryption. The objective is then to be able, without access to such equipment, to deduce the plaintext from cipher text. 6. Adaptive chosen cipher text attack: An adaptive chosen cipher text attack where the choice of cipher text may depend on the plain text received from previous requests. 1.1.15 Attacks on protocols The following list of attacks which might be mounted on various protocols. 1. Known key attack. In this attack an adversary obtains some keys used previously and then uses this information to determine new keys. 2. Replay: in this attack an adversary records a communication session and replays the entire session, or a portion thereof, at some later point tin time. 17 3. Impersonation: Here an adversary assumes the identity of one of the legitimate parties in a network. 4. Dictionary: This is usually an attack against passwords. 5. Forward search: This attack is similar in spirit to the dictionary attack and is used to decrypt messages. 6. Interleaving attack: This type of attack usually involves some form of impersonation in an authentication protocol. 1.2 Motivation of the thesis Finite state machine originally proposed to model brain functions, turned out to be extremely useful for a variety of other purposes. Formal grammars proposed by the linguist N.Chomsky have close relation ship to abstract automata and serve today on the basis of some important soft ware components, including parts of compilers. Generating input/output set for finite state machine is a bit difficult, when we want to apply such technique on cryptography protocol implementation, specifications cases. The finite state machines based method is need to discover a transition from initial set to a finial set. A cryptosystem is an algorithm, plus all possible plaintexts, cipher texts, and keys. With out apt key, it is very difficult to decode the cipher text with the known algorithm. So Key management i.e., the set of processes and mechanisms which support key establishment and maintenance of ongoing keying relationships between parities, including replacing older keys with new keys as necessary. Recurrence relations are less used in cryptography due excessive space requirement and convergence and they are used to generate codes in computer science. Many researchers have tried to identify the difficulties in implementing the finite state machines to cryptosystems. However, there little consensus among 18 researchers regarding the relative importance of implementing finite state machines in cryptosystems using mathematical devices such as matrices , generating functions, set of values etc., and benefits are not fully realized until they are integrated. With a view to test finite state machine in cryptosystems using mathematical devices such as matrices, generating functions, set of values etc.is under taken 1.3 Objectives of investigation The general objectives of investigations are to: • Develop appropriate cipher using finite state machine and mathematical device. • Implement and validate the cipher. • Perform the security analysis. The specific objectives of investigation include: 1.4 • Efficacy of the proposed algorithm. • Different levels of security. • Key management Scope and limitation of investigation The scope of the present investigation includes: • Development of cipher using mathematical devices such as matrices, generating function, set of values etc using finite state machines. • Implementation and validation of the ciphers using finite state machines. • Security analysis on the cipher. The limitations of the present investigations are: • Evidences show that finite sate machines are may not be successful for all cryptosystems due to predictable nature and finiteness. 19 • The length of the secret key in binary form with suitable length is preferred. • Implementation has led to mixed results, often creating negative assessments of the cipher. Hence, maximum efforts should be made to develop best ciphers. 1.5 Organization of the thesis This dissertation entitled “‘on finite sate machine and recurssive function – application to cryptosystem.’ Consists of five major chapters(4to8) that represent the major results of the author’s research. It is organized as follows: Chapter 1 presents a brief introduction to finite state machines, cryptosystems and recurrence relation. Chapter 2 narrates the reader with an overview of related work specific to each of the four major chapters. Chapter 3 discusses the different variants of ciphers using finite state machines. Chapter 4 includes the application of recurrence matrix in cryptosystems using finite state machine, security analysis and validation of the proposed algorithm. Chapter 5 includes the application of generating function in cryptosystems using finite state machine, security analysis and validation of the proposed algorithm. Chapter 6 includes the application of one to one mapping on set of values in cryptosystems using finite state machine, security analysis and validation of the proposed algorithm. Chapter 7 includes the application of graph structure in cryptosystems using finite state machine, security analysis and validation of the proposed algorithm. 20 Chapter 8 includes the self generating encryption schemes using finite state machines, security analysis and validation of the proposed scheme. Chapter 9 presents the summary of results of the present investigation and the conclusions based on these results. The guidelines for future research work are also suggested. The present investigation aims to develop, implement and validate the cipher using finite state machine and different mathematical devices.
© Copyright 2026 Paperzz