Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simplified Signal Protocol Implementation

Overview

This repository contains a Python implementation of a simplified version of the Signal Protocol, developed as a term project for CS411. The project demonstrates secure key management, forward secrecy, deniability, and end-to-end encrypted communication.

The implementation is inspired by the Signal Protocol and uses elliptic curve cryptography (Ed25519), modern hash functions, and authenticated encryption primitives.

Features

  • Identity Key (IK) generation and registration
  • Signed Pre-Key (SPK) generation and verification
  • One-Time Pre-Key (OTK) generation and lifecycle management
  • Secure session establishment using X3DH
  • Post-Quantum X3DH (PQXDH) support
  • Forward secrecy via one-time keys and KDF chains
  • Authenticated encryption using AES-256-CTR and HMAC-SHA256
  • Secure asynchronous client-to-client messaging
  • Conference key establishment for group communication

Project Structure

Phase I

Handles public key registration, including identity keys, signed pre-keys, and one-time pre-keys.

Phase II

Implements secure messaging, session key derivation, message encryption and decryption, integrity verification, and OTK management.

Phase III

Extends the protocol with conference key establishment and post-quantum secure communication using PQXDH.

Security Design

  • Long-term keys are never used directly for message encryption
  • Each message block derives fresh encryption and authentication keys
  • One-time pre-keys are consumed exactly once
  • Message integrity and authenticity are enforced using HMAC and digital signatures
  • All sensitive key material is stored locally and excluded from version control

Requirements

  • Python 3.x
  • Cryptographic libraries as specified in the course documentation
  • Network access to the project server (VPN required when off-campus)

Usage Notes

This project interacts with a remote server for key registration and message exchange. Keys must be generated and registered in the correct order, and protocol phases should be executed sequentially as specified in the assignment.

Disclaimer

This implementation is not production-ready and should not be used for real-world secure communication.

About

Simplified Signal Protocol implementation in Python with secure key registration, X3DH/PQXDH session establishment, forward secrecy, authenticated encryption, and secure client-to-client messaging.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages