Data encryption is essential in securing exchanged data between connected parties. Encryption is the process of transforming readable text into scrambled, unreadable text using secure keys. Stream ciphers are one type of an encryption algorithm that relies on only one key for decryption and as well as encryption. Many existing encryption algorithms are developed based on either a mathematical foundation or on other biological, social or physical behaviours. One technique is to utilise the behavioural aspects of game theory in a stream cipher. In this paper, we introduce an enhanced Deoxyribonucleic acid (DNA)-coded stream cipher based on an iterated

The idea presented for cryptography has shown practical and theoretical usefulness in diverse fields, including computer networks, cybersecurity and information security. Cryptography seeks to provide a secure and reliable platform for the communication of both senders and receivers in public channels. The primary categories of cryptography include asymmetric and symmetric algorithms used in encryptions. Both approaches have the specific purpose of translating input data that is easily understandable to the reader (plaintext) to a configuration that is non-readable (ciphertext). However, the applied encryption and decryption methodologies differ considerably between the two categories. On the one hand, symmetrical cryptography applies only one key for decryption and as well as encryption of the messages between the receiver and the sender. On the other hand, the asymmetrical category applies two distinct keys, referred to as the private and public key, in the process of both encryption and decryption. It is examined that the the private key are not easily accessible as their content is kept secret whereas, the other users can easily access the public key.

It is anticipated that Shift registers comprised of linear and non-linear feedback [

The interactions that take place between parties that have mutual distrust can be well explained using the game theory. This approach is commonly applied in businesses whose diverse organisations seek to boost their market share and gain a competitive edge over their rivals. Katz [

DNA cryptography emerges from the integration of cryptography and biology and represents a significant field of interest. Encoding is done using DNA bases, which should be compatible with the applied computations of the DNA and security requirements. DNA cryptography contributes to the proposal of diverse schemes to enhance data security while revealing possible issues in existing approaches to security. Nevertheless, keystream generation is quite time-consuming for some DNA-based cryptography schemes. Consequently, the performance of both the processes of encryption and decryption is considered currently as unsatisfactory [

Recently, by considering the game theory and DNA coding, a stream cipher was introduced [

Our main contribution focuses on two main factors: performance and security. As for security, our enhanced design uses a more complicated game model based on the ‘

The remaining sections are structured as follows. The preliminaries can be found in Section 2. Section 3 includes the discussion of associated works, and Section 4 elaborates on the proposed scheme. Section 5 presents the security analysis, and the evaluation of complexity is discussed in Sections 6 and 7. Lastly, Section 8 provide a concluding remarks on the presented research study.

The sender and receiver first develop secret information that they will then use in the encryption and decryption procedures applied in stream ciphers. The primary keystream generator (KSG) in stream ciphers is a pseudorandom generator with two characteristics, an initial vector (IV) and a secret key, both of which are used to generate a set of keys in a specific sequence known as the keystream. The keystream is then applied in the encryption or decryption of plaintext using the exclusive-or (XOR) operation.

The security applied to the keystream generator is the primary aspect that determines the essence of a stream cipher. Cryptanalysts focus on evaluating the keystream generator to identify possible behavioural and statistical patterns that may contribute to cryptographic vulnerabilities that are easily exploitable by attackers. Both DNA coding and game theory are useful concepts used in both encrypt/decrypt (E/D) procedures and the development of random keystreams in KSG. Section 4 of this paper provides a clear overview of the implementation process.

INPPD is a realistic game for modelling real-life problems [

Regardless of what the other player does, each player receives a higher payoff for defecting behaviour than for cooperating behaviour.

All players receive a lower payoff if all players defect than if they all cooperate.

Similar to the 2IPD scenario, participants individually select to cooperate (C) or defect (D). A player’s payoff is a function of the total value of cooperators (

Based on [

If the majority of players cooperate, the payoff will be greater for additional cooperators. However, the same is true for an additional defector, as the second inequality of the monotonicity condition shows.

_{i} is refered to the payoff obtained by a player who played _{i} is referred to the payoff obtained by a player who played

A short-sightedly rational player will choose to defect, since

The payoff for the group increases when a player starts cooperating. This condition is represented by

In this study, we adopt the payoff matrix presented in [

# of cooperators among players’ actions | ||
---|---|---|

0 1 2 3 4 …………… |
||

C_{0} C_{1} C_{2} C_{3} C_{4} …………… 2( |
||

D_{0} D_{1} D_{2} D_{3} D_{4} …………… 2( |

# of cooperators among players’ actions | ||
---|---|---|

0 1 2 3 4 …………… |
||

0 2 4 6 8 …………… 2( |
||

1 3 5 7 9 …………… 2( |

Nucleotides are the main components of DNA. They are comprised of 4 bases including adenine, cytosine, guanine and thymine (A, C, G, T). DNA cryptography includes the encryption of the plaintext and the translation of the ciphertext to DNA bases. The sender carries out a mapping procedure between the binary bits of the ciphertext and the combination of DNA bases in the encryption process. This approach is useful for increasing the encryption’s level of security. Every combination inherent in the DNA bases contributes to the formation of a sequence of DNA, and the outcome is a collection of sequences of DNA.

Studies conducted by Li et al. [

According to Sohal et al. [

A new trend in cryptography takes inspiration from natural biological phenomena to develop true randomness given the inability of computer-generated software tools to perform the same tasks. It is revealed that cryptographic systems, stimulated by biological processes, are crucial for current cryptography, which necessitates the use of devices based on machine-learning and algorithms that have a biological influence to facilitate security in the data dissemination phase [

Qiu-yu et al. [

The authors of [

Meftah et al. [

The use of DNA coding has significantly influenced and enhanced the application of high-efficiency encryption techniques. Privthran et al. [

Recently, a stream cipher based on a two-player prisoner’s dilemma (2PD) game and DNA coding was introduced in [

In conclusion, the application of game theory and DNA approaches provides benefits in the cryptographic field. This work presents an enhanced design of the promising stream cipher introduced in [

With reference to [_{1}, Val_{2}, Val_{3} and Val_{4}) for producing a 512-bit keystream/round. The design of the algorithm utilises randomness in most of the components (core operations) to avoid correlations and statistical dependencies. As we are enhancing the original formation of the DNA-coded stream cipher proposed in [

According to

The main goal behind this enhanced design is to improve both the performance and security of the original stream cipher design. The original design allows only two players (represented by two bits) to play one PD game. The payoff achieved by each player is calculated based on a 2PD payoff matrix.

However, in our proposed enhanced scheme, we replace the concept of 2PD game with iterated n-player prisoner’s dilemma (INPPD) games. Hence, all IVec_{p} bits play against all PL1 bits in a multiplayer game. In this case, the payoff is calculated according to the INPPD payoff matrix (

In this stage, both the SecK and IV are initialised. Like the original design, our enhanced design restricts the size of the SecK to 256 bits, while the IV is divided into four keys of 8-bit each (Val_{1} – Val_{4}). The four V

As for the general IV value (IVec_{p}), we stick with the original scheme where IVec_{p} is formulated according to

Our enhanced stream cipher assumes different game scenarios than those that are assumed by the original design. The SecK is a set of players (PL1, PL2, PL3 and PL4) defined by

The set of PL_{p} and three randomly chosen players from a pool of players that adopt benchmark strategies (BMSs). These strategies are widely used in research papers discussing PD-based models [

Strategy No. | Strategy Short | Strategy | Description |
---|---|---|---|

1 | BMS1 | Always cooperate | Always choose to cooperate |

2 | BMS2 | Always defect | Always choose to defects |

3 | BMS3 | Tit-for-Tat (TFT) | The first move is to cooperate, then last move of the oppenant is coppied. |

4 | BMS4 | Suspicious TFT | The first move is to defect, then last move of the oppenant is coppied. |

5 | BMS5 | Tit-for-two-Tat | The first move is to cooperate, then defection is choosen if the opponent choose to defect in two moves. |

6 | BMS6 | Hard TFT | The first move is to cooperate, then defection is choosen if the opponent choose to defect in any of the previous three moves. |

7 | BMS7 | Pavlov | The first move is to cooperate, then defection is choosen if the moves of the players are not identical. |

8 | BMS8 | Spiteful | Always choose to cooperate unless the opponent defects, after that, choose to defect all the time. |

9 | BMS9 | Soft majority | The first move is to cooperate, then continue to cooperate as long as the total number of opponent cooperations is greater than or equal to the defection. Otherwise, start to defect. |

10 | BMS10 | Hard majority | The first move is to defect, then continue to defect as long as the total number of opponent defection is greater than or equal to the cooperation. Otherwise, start to cooperate. |

A given player can use 64 bits as part of its strategy in every single game, where bits 0 and 1 represent defection and cooperation strategies, respectively. In any game, each PL_{p} and three randomly chosen players from the BMS pool. _{i} times, and the outcome of the last round is considered as the final output. Parallelism is implemented to expedite the process of generating keystreams (Sec_SK). Each PL

Recall that each game is composed of V_{p}[

When we reach the last round, the value

Randomness is also applied in the way our design chooses the BMS_{3} times to the left and Val_{4} times to the right. Accordingly, the actual strategy associated with the three selected BMS

Like the original design, the sequences generated by each player are concatenated to generate the keystream bits. This process generates a total of 2,048 bits (

As we generate the first set of keystreams, the INPPD matrix must be re-initialised with the new set of IV values (

The process of keystream generation is parallelised; multiple threads are created to run the keystream generation process over a separate copy of the BMS pool simultaneously. Each thread is associated with a player PL

As the keystream bits are ready to use, the encryption function is called to XOR the plaintext with the keystream (Sec_SK). The encryption method uses the keystreams generated by the four threads (denoted by Sec_SK_{1}, Sec_SK_{2}, Sec_SK_{3} and Sec_SK_{4}) sequentially. The first thread feeds the encryption method with the keystream bits (Sec_SK_{1}) needed to complete the encryption. If the number of plaintext bits available for encryption exceeds the number of keystream bits, the second thread will feed the encryption method with more bits from Sec_SK_{2}, and so on. Practically, once the thread consumes all its keystream bits, it will restart the process of keystream generation to create a new set of Sec_SK. Note that the encryption algorithm works sequentially on the Sec_SK to assure synchronisation with the text decryption process. The encryption process is implemented in Algorithm 4.

The DNA encoding process is implemented as in the original design of the cipher [

As for implementing the decryption process, we follow the same procedures by generating keystreams using four threads. However, DNA sequences are converted back to their binary representation based on the corresponding DNA mapping. Finally, the ciphertext is XOR’ed with the keystream to recover the plaintext.

Following the evaluation standards, the NIST statistical test suite [

Test | p-value | Passing rate | Decision |
---|---|---|---|

Runs | 0. 173013 | 0.989 | |

CS | 0. 247851 | 0.988 | |

Non-OT | 0. 301454 | 0.987 | |

OT | 0. 407601 | 0.987 | |

REV | 0. 512543 | 0. 983 | |

Rank | 0. 111162 | 0.984 | |

Linear complexity | 0. 356097 | 0.984 | |

Longest run | 0. 119103 | 0.988 | |

FFT | 0. 019919 | 0.985 | |

Universal | 0. 618663 | 0.985 | |

Approximate entropy | 0. 790224 | 0.985 | |

Random excursion | 0. 209812 | 0.985 | |

Block frequency | 0. 233345 | 0.987 | |

Serial | 0. 532474 | 0.984 | |

Frequency | 0.043356 | 0.992 |

Since the DNA coding process is not modified, our statistical results show that no statistical bias is detected over the generated DNA bases (

# of CTxt characters | % C | % G | % T | % A |
---|---|---|---|---|

100 | 24.0% | 25.0% | 26.0% | 25.0% |

200 | 24.5% | 25.5% | 25.5% | 24.5% |

500 | 24.8% | 25.8% | 24.8% | 24.6% |

1000 | 25.1% | 25.3% | 24.7% | 24.9% |

5000 | 24.9% | 25.2% | 25.3% | 24.6% |

10000 | 25.0% | 25.1% | 25.4% | 24.5% |

For enhanced cipher for this study, the avalanche effect of altering one bit is measured in the SecK. This is done for generating Sec_SK in comparison with the original design. It is also examined that the avalanche effect can be measured on the ciphertext. The analysis of the results presents that around 70% of the bits are altered right after modifying 1 bit in the SecK (

SecK |
SecK |
||||
---|---|---|---|---|---|

Original cipher | Enhanced cipher | Original cipher | Enhanced cipher | ||

No. of generated Sec_SK | 300 | Size of CTxt (bits) | 5000 | ||

Min % of changes | 69.00% | Min % of Changes | 68.00% | ||

Max % of changes | 76.00% | Max % of Changes | 74.00% | ||

Avg % of changes on Sec_SK | 72.49% | Avg % of changes on |
71.00% |

Our enhanced design relies on an INPPD matrix to produce encryption keys. Consequently, for any two exactly similar ciphertexts, the sequences of DNA that are generated are completely different. Therefore, the presented cipher is found resistant to ciphertext-only attacks.

The ciphertext is produced as a sequence of binary bits that result of implying XOR to the plaintext and the secret keys. This sequence of binary bits are later coded in DNA bases. As the DNA bases are chosen randomly, this guarantees that the cipher will produce two completely different ciphertexts for any two similar plaintexts. Accordingly, our algorithm presented in this study is found resistant to known-plaintext attacks.

Our enhanced algorithm also showed resistance to differential attacks. The Sec_SK is not repeated in the generation procedure of the Sec_SK. Generating new Sec_SK requires re-initialising both the IVs and INPPD matrix by new random numbers. Accordingly, identical plaintext will be transferred to a totally different ciphertext, which conserve the presented cipher against differential attacks.

In our enhanced cipher, the modification does not change the size of the input keys. Therefore, this attack has to compute 2^{256} + 2^{32} guesses (for each thread) to disclose both the IV and the key. The time required to reveal the two keys is considered impossible to be achieved with available computational resources [

Our complexity analysis shows that our enhanced cipher involves one extra process, which is responsible for generating multiple threads. This process is found to have a complexity of O(^{2}) due to the involvement of multiple loops applied over different plaintext segments received from different threads (

Key/IV setup | Thread creation | Keystream gen. | Encryption | DNA encoding | |
---|---|---|---|---|---|

Complexity | O(1) | O( |
O( |
O(^{2}) |
O(log |

The enhanced cipher is coded in Python and installed on a laptop with Intel Core i7® and 6 GB RAM, 500 GB HDD, 128 GB SSD and MS Windows 11 as the operating system. We used 20 Newsgroup dataset, which has also been used in similar research papers [

In addition to the original design, we compared the performance of our enhanced cipher to that of AES-128, RC4 ciphers [

The reason for this improvement in the throughput is the parallelism implemented in the enhanced design. Four threads operate simultaneously over an independent set of parameters to generate the keystream sequences. However, super-linear speedup could not be achieved since the encryption process is carried out sequentially over the plaintext sequences.

AES-128 | RC4 | DNA_Cipher [ |
Original cipher [ |
Enhanced cipher | |
---|---|---|---|---|---|

Throughput (Mbit/s) | 1,888.89 | 1,879.3 | 0.008 | 1,230.77 | 1,877.22 |

In this paper, we presented an enhanced design of the DNA-coded stream cipher introduced in [

One contribution of our enhanced design was to replace the 2PD game model with an INPPD game model. This replacement added one more layer of randomness to the behaviour of the keystream generation. In addition, we introduced a new pool of benchmark strategies, which includes 10 well-known strategies to represent the behaviour of three randomly chosen players included in each game. This contribution allowed our new design to enhance the overall security of the keystream generation process.

However, adding these extra layers makes the encryption method more time-consuming. Hence, parallelism is introduced through the multi-threading paradigm. Multiple threads are created to run independently in order to generate keystream sequences for encryption purposes. The experimental results show that the multi-threading model assisted our stream cipher to achieve a throughput of 1,877 Mbit/s. This throughput represents a 34% enhancement ratio compared to the original design. The achieved throughput expands the capabilities of stream cipher in different security applications.

From the security and statistical perspectives, our analysis shows that the enhanced design maintained the same level of high security against cryptographic attacks. NIST statistical tests also showed that no statistical biases were detected in the generated keystream. These results enabled our enhanced DNA-coded stream cipher to reach a practical level of performance, and it can be considered a secure alternative stream cipher in many applications.

The author presents his thanks to the Arab Open University, Saudi Arabia for providing consistant support in completing this research.

No funding was needed in the study.

The author declares that he has no conflicts of interest to report regarding the present study.