Skip to content

Sankalp-dasari/DNAVault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DNAVault


Overview

In October 2023, 23andMe suffered a significant data breach in which hackers accessed the personal information of over 7 million users (The Guardian). Less than two years later, the company filed for bankruptcy in March 2025 (Reuters).

As cyberattacks become increasingly sophisticated and the advent of quantum computing threatens traditional cryptographic methods, the need for resilient security protocols is more critical than ever. In response to these emerging threats, we have implemented a robust solution: a system that employs the Advanced Encryption Standard (AES) for encrypting sensitive user data, combined with Kyber, a post-quantum cryptographic scheme, to ensure secure and quantum-resistant key exchange.

This project demonstrates quantum-resistant encryption of DNA sequences using a hybrid cryptographic approach:

  • AES-128 for fast, symmetric encryption of DNA data blocks.
  • Kyber Key Encapsulation for secure post-quantum key exchange, ensuring resilience against quantum attacks.

It is designed to showcase end-to-end DNA data encryption and decryption with post-quantum security guarantees making it suitable for use in bioinformatics, healthcare, and genetic research fields where data confidentiality is paramount.

LINK TO THE PROJECT

Features

  • AES-128 Encryption:
    Custom implementation of AES operating on 4×4 matrices of 8-bit binary strings.
  • Kyber Key Exchange:
    Lattice-based key encapsulation providing post-quantum security (NIST PQC standard family).
  • DNA Sequence Support:
    Encoding and decoding of DNA (A, G, C, T) to binary form compatible with AES block size.
  • End-to-End Encryption/Decryption:
    Encryption of real DNA datasets, decryption, and validation of correctness.
  • Post-Quantum Ready:
    Quantum-safe key generation using Kyber ensures long-term security.

Comparisons

Key Generation Time (Kyber vs RSA) (IEEE Xplore)

Algorithm Duration (ms)
Kyber-512 0.21
Kyber-768 0.27
Kyber-1024 0.33
RSA-3072-Base64 484.74
RSA-7680-Base64 19329.88
RSA-15360-Base64 186792.53

On average, the Kyber-DNA algorithm is approximately 2.5507× $10^5$ times faster compared to the RSA-Base64 algorithm at key generation.

Classical and Quantum Attack Performance (DES vs AES vs RSA) (IEEE Xplore)

Factor DES AES RSA
Possible Keys 2⁵⁶ ≈ 7.2×10¹⁶ 2¹²⁸, 2¹⁹², 2²⁵⁶ Variable (RSA-2048 ≈ 112-bit equiv)
Time to Break (Classical) ~1 day (modern hardware) ~10¹⁸ years (AES-128 brute-force) RSA-2048: ~10¹⁵ years (factoring, classical)
Time to Break (Quantum) ~ seconds (Grover, too small key) AES-128: 2⁶⁴ operations (~0.6 years with ideal Grover) RSA-2048: polynomial time (minutes to hours, post-quantum)
Operations to Break 2⁵⁶ brute-force 2¹²⁸ brute-force; 2⁶⁴ Grover quantum Shor's Algorithm: polynomial in log(n)

AES can withstand both classical and quantum attacks well and is considered strong and is classified as safe for "top secret" information by the NSA.

Architecture Overview

flowchart TB
subgraph "AES Encryption/Decryption"
B1[Encode DNA → Binary] --> B2[Form 4×4 Matrices] --> B3[AES Encrypt Blocks]
B4[AES Decrypt Blocks] --> B5[Decode Binary → DNA]
end
subgraph "Kyber Key Exchange"
    A1[Kyber Key Generation] --> A2[Public Key Distribution]
    A2 --> A3
    A3[Key Encapsulation] --> A4[Shared Secret Key Derivation]
end

A4 --> B3
A4 --> B4
Loading

Security Design

Component Detail
Symmetric Cipher AES-128 block cipher (custom, 10 rounds)
Key Exchange Kyber (Lattice-based KEM, simplified implementation)
Data Mapping DNA bases mapped to 2-bit binary: A=00, G=01, C=10, T=11
Block Size 16 DNA bases per AES block (32 bits → 128 bits)
Quantum Resistance Kyber resists Shor’s algorithm and quantum attacks

Project Structure

  • aes.py – AES-128 custom implementation
  • dna_utils.py – DNA sequence encoding and decoding utilities
  • kyber.py – Kyber key encapsulation (simplified)
  • main.py – End-to-end workflow: DNA encryption & decryption
  • human.txt – Input DNA sequences (example)
  • encrypted_output.txt – Output file with encrypted & decrypted sequences

Installation

  1. Clone the repository:
    git clone git@github.com:Sankalp-dasari/DNAVault.git
    cd DNAVault
    

References

License

This project is released under the MIT License.

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors