Skip to content

Secure Messaging with Kyber and AES-256, ensures that the encrypted messages are protected against both classical and quantum attacks.

Notifications You must be signed in to change notification settings

abhisekjha/pqc_aes_multipath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure Messaging with Kyber and AES-256

This project demonstrates how to securely encrypt packets of messages using AES-256, with the keys being securely exchanged using Kyber, a post-quantum cryptographic algorithm. The process ensures that the encrypted messages are protected against both classical and quantum attacks.

Check Out the Webpage to learn more

Flowchart

+-----------------------+
| Generate Kyber Keys   |
| (Public & Private)    |
+-----------------------+
           |
           V
+-----------------------+
| For each message:     |
| 1. Encrypt session key|
|    with Kyber         |
+-----------------------+
           |
           V
+-----------------------+
| Encrypt message using |
| AES-256 with session  |
| key                   |
+-----------------------+
           |
           V
+-----------------------+
| Store encrypted session|
| key and encrypted      |
| message in a file      |
+-----------------------+
           |
           V
+-----------------------+
| For decryption:       |
| 1. Decrypt session key|
|    with Kyber         |
| 2. Decrypt message    |
|    with AES-256 using |
|    session key        |
+-----------------------+

Usage

  • Includes the Encoded files in input folder.
  • Test cases can be run by make
  • Makefile will run below test files.
    • python3 tests/test_encryption.py
    • python3 tests/test_decryption.py
    • python3 tests/test_key_generation.py
    • python3 tests/test_main.py
    • python3 tests/test_pqc_multipath.py
  • tests/test_main.py includes the general test for sample message
  • test/test_pqc_multipath includes the test with Multipath encoded files

This script ensures the secure encryption and decryption of messages using a combination of Kyber and AES-256, providing strong security against both current and future threats.

Steps to Run the Test

  1. Activate the environment
source venv/bin/activate
  1. Git clone the pqc_aes_multipath repo:
https://github.com/abhisekjha/pqc_aes_multipath.git
cd pqc_aes_multipath
  1. git clone Kyber based PYKY
https://github.com/asdfjkl/pyky.git
  1. Set the PYTHONPATH to include the current directory and the pyky directory:
export PYTHONPATH=/path/to/pqc_aes_multipath:/path/to/pqc_aes_multipath
  1. To Verify PYTHONPATH
echo $PYTHONPATH
  1. Install requirements.txt
pip install -r requirements.txt
  1. Run test cases using make
make

Acknowledgements

I would like to thank the pyky repository for providing the implementation of the Kyber cryptographic algorithm, which was used in this project.

About

Secure Messaging with Kyber and AES-256, ensures that the encrypted messages are protected against both classical and quantum attacks.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages