Skip to content

CurvyStreamCrypt: A hybrid encryption system combining my BLAKE3 based stream cipher (StreamCrypt) with elliptic curve cryptography for end to end encryption.

License

Notifications You must be signed in to change notification settings

afkaf/CurvyStreamCrypt-Hybrid-ECC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

CurvyStreamCrypt

Overview

CurvyStreamCrypt is a hybrid encryption system that combines my BLAKE3-based StreamCrypt stream cipher with elliptic curve cryptography (ECC) using the brainpoolP256r1 curve. Designed for end-to-end encryption, it provides a secure and efficient method for encrypting and decrypting messages.

Features

  • Utilizes BLAKE3 for fast and secure key derivation in the stream cipher component.
  • Employs elliptic curve cryptography (ECC) on the brainpoolP256r1 curve for generating private and public keys, ensuring robust asymmetric encryption.
  • Offers point compression and key derivation functionalities, enhancing efficiency in key storage and exchange.
  • Designed for secure end-to-end encryption, making it suitable for confidential communications.

Requirements

  • Python 3.6 or above
  • NumMaster
  • TinyEC
  • NumPy
  • blake3

Installation

To use CurvyStreamCrypt, ensure you have Python installed on your system. Then, install the required Python packages using pip:

pip install nummaster tinyec numpy blake3

Usage

Key Generation

Generate a private key and its corresponding public key:

from CurvyStreamCrypt import create_private_key, create_public_key

privKey = create_private_key()
pubKey = create_public_key(privKey)

Encrypting a Message

Encrypt a message using the public key:

encrypted_msg = encrypt(b'Your message here', pubKey)

Decrypting a Message

Decrypt the message using the private key:

decrypted_msg = decrypt(encrypted_msg, privKey)

Example

Here's a quick example demonstrating how to encrypt and decrypt a message:

privKey = create_private_key()
pubKey = create_public_key(privKey)

emsg = encrypt(b'Hello, World!', pubKey)
print(f'Encrypted Message: {emsg}')

dmsg = decrypt(emsg, privKey)
print(f'Decrypted Message: {dmsg}')

Security Notes

  • Always keep your private keys secure and never share them.
  • Ensure secure storage and handling of all cryptographic material.

About

CurvyStreamCrypt: A hybrid encryption system combining my BLAKE3 based stream cipher (StreamCrypt) with elliptic curve cryptography for end to end encryption.

Resources

License

Stars

Watchers

Forks

Languages