title: DNAs in Cryptography. type: posts
Found a pretty cool paper this week  A New Hybrid Cryptosystem Involving DNA, Rabin, One Time Pad and Fiestel (opens in a new tab). Thought I'd discuss it.
This paper proposes a novel approach to cryptography by combining DNA sequences, the Rabin cryptosystem, onetime pad (OTP), and a Feistel structure. DNA cryptography provides several advantages that enhance the security of traditional methods. Why DNA?
 Extremely large keyspace  DNA sequences of length $n$ have $4^n$ possible combinations, enabling an astronomically large number of keys. Even relatively short DNA strands can have keyspaces infeasible for brute force attacks.
 True randomness  Biologically generated DNA sequences exhibit more randomness than computationally generated keys, improving cryptographic security.
 Availability  Many websites provide randomly generated DNA sequences that can be readily used as cryptographic keys.
 Compact storage  DNA can store vast amounts of data at a molecular scale, allowing the use of large keys in a small footprint.
Feistel Network The Feistel structure splits the input data into two halves and works through multiple rounds of substitution and permutation (confusion and diffusion) on the halves to scramble the data thoroughly.
Rabin keygen, encryption, decryption The Rabin cryptosystem is a publickey cryptosystem based on the difficulty of factorizing large composite numbers into their prime factors. It was invented by Michael O. Rabin in 1979. The scheme consists of four algorithms: Key Generation, Encryption, Decryption, and Primality Testing.
The Rabin cryptosystem can be defined as follows:

Key Generation:
 Choose two distinct prime numbers, $p$ and $q$, of equal length such that $p \neq q$.
 Compute the modulus $N = p \cdot q$.
 The public key is the modulus $N$.
 The private key consists of the prime factors $p$ and $q$.

Encryption:
 Convert the plaintext message $M$ into an integer representation.
 Compute the ciphertext $C$ as $C = M^2 \mod N$.

Decryption:
 Compute the four possible square roots of the ciphertext $C$ modulo $N$.
 The four possible plaintexts $M_1, M_2, M_3, M_4$ are given by $M_i = \sqrt{C} \mod N$, for $i = 1,2,3,4$.

Primality Testing:
 To verify the primality of an integer $x$, check if $x^{\frac{N1}{2}} \equiv 1 \mod N$ or $x^{\frac{N1}{2}} \equiv 1 \mod N$. If neither condition holds, $N$ is composite.
The security of the Rabin cryptosystem relies on the difficulty of factoring the modulus $N$ into its prime factors. To ensure secure communication, the prime factors $p$ and $q$ must be kept secret.
The Rabin cryptosystem has certain vulnerabilities related to its deterministic nature, such as the existence of nontrivial square roots of ciphertexts. To address these issues, additional steps and techniques, such as padding and digital signatures, can be incorporated into the scheme.
The algorithm discussed
Key Generation:
 Sender generates a random DNA sequence to be used as a onetime pad (OTP) key.
 Receiver generates a public/private key pair for the Rabin cryptosystem. Sends the public key to sender.
Encryption:
 Sender preprocesses plaintext by inserting a "spy" character at the start of each character.
 Convert plaintext characters to ASCII values, concatenate pairs of ASCII values.
 Encrypt the ASCII values with Rabin encryption using receiver's public key.
 Convert the Rabin ciphertext to binary.
 XOR the binary ciphertext with the random DNA OTP key.
 Rearrange the XOR output using a Feistel network structure.
 Send the rearranged ciphertext to the receiver.
Decryption:
 Receiver reverses the Feistel network scrambling.
 XORs the result with the DNA OTP key to undo that step.
 Decrypts the Rabin ciphertext using private key. Gets 4 possibilities for each.
 Checks "spy" character to select the correct plaintext from the 4 options.
 Removes "spy" characters and converts ASCII values back to characters.
This achieves a high level of security by combining the strengths of all the components  DNA key randomness, Rabin asymmetric encryption, OTP unbreakability, and Feistel structure scrambling.
TL;DR (Thanks GPT!)

Proposes new encryption method combining DNA sequences, Rabin cryptosystem, onetime pad (OTP), and Feistel structure.

DNA sequences used as cryptographic keys provide massive keyspace, true randomness, availability, and compact storage. Harder to crack.

Rabin publickey encryption used for asymmetric crypto. Computational security based on factoring large semiprimes.

OTP with DNA key gives unbreakable security through XORing.

Feistel structure adds confusion through multiple rounds of substituting and shuffling halves.

Hybrid system leverages strengths of each: DNA randomness/keyspace, Rabin math security, OTP unbreakability, Feistel confusion.

Goal is very secure cipher resistant to various crypto attacks by synergizing different techniques.