Skip to content

Murphy052/Crypto_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto_Project

Project Overview

Cryptography course project requiring to implement KDC (Key Distribution Center) that allows two users to share safely a Ceaser key index. KDC should rely on self written RSA implementation.

Purpose

The purpose is to improve and strengthen the knowledge obtained during classes by implementing Needham-Schroeder Protocol, Asymmetric and Symmetric algorithms.

Team

  • Nazim Ganizada
  • Ismayil Guliyev

Details

Needham-Schroeder Protocol

Our implementation is same as in wikipedia with a slight change, at last stage where A proves to B ability to decrypt with Ksa A generates and send Ceaser key for further communication.
Needham-Schroeder.png Interaction between clients provided by WebSocket in json format containing custom fields method, payload and dest for handling protocol flow. Only payload is encrypted during transfer. Source code of implementation id in src/client/static/board.js

RSA

Source code is in src/core/tools directory

Implementation overview

The implementation consists of a Python module containing RSA class with methods for key generation, encryption, and decryption, as well as static methods for encryption and decryption with custom keys. The module also imports functions from a separate MathTools module for prime number generation and modular arithmetic operations.

Tech stack

  • FastAPI: backend
  • WebSockets: for full-duplex connection between clients
  • Pyodide: executing python code inside of browser(as the RSA was implemented in python, there was need to use it in browser without writing new implementation in JS)
  • Jinja2: templating for front end.
  • Poetry: dependency management

Running Project

For first time run:

SECRET_KEY=$(openssl rand -hex 20 | cut -c -32) && echo "SECRET_KEY=$SECRET_KEY" >> .env
poetry install

Running project:

poetry shell
python manage.py run

References

About

Final project for university cryptography course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published