Skip to main content

FEX v1.0-beta: Fast Encryption eXchange (novel symmetric cipher)

Project description

FEX Crypto v1.0-beta: Fast Encryption eXchange

WARNING: This is a beta, experimental cryptographic algorithm. It is NOT cryptographically proven or reviewed. DO NOT use in production or for sensitive data!


Overview

FEX (Fast Encryption eXchange) is a novel symmetric block cipher designed for high performance and flexibility. It features:

  • 128-bit block size
  • Variable key length: 16 to 1024 bits
  • Custom S-box, P-box, and key schedule (not derived from any standard cipher)
  • Optimized for speed using efficient bitwise operations
  • Python bindings via pybind11 for easy integration

This is a research beta. Security is NOT guaranteed.


Features

  • Block-based encryption (128 bits per block)
  • Variable key length (16–1024 bits)
  • Custom substitution-permutation network (SPN) with unique S-box and P-box
  • Simple, fast key schedule
  • C++ and Python API

C++ Usage Example

#include "fex.h"
#include <vector>
#include <iostream>

int main() {
    std::vector<uint8_t> key = {/* your key bytes */};
    std::vector<uint8_t> data = {/* your data bytes */};
    FEX fex(key.data(), key.size());
    // Pad data
    auto padded = FEX::pad(data);
    // Encrypt in-place
    for (size_t i = 0; i < padded.size(); i += FEX::BLOCK_SIZE)
        fex.encrypt_block(&padded[i]);
    // Decrypt in-place
    for (size_t i = 0; i < padded.size(); i += FEX::BLOCK_SIZE)
        fex.decrypt_block(&padded[i]);
    // Unpad
    auto recovered = FEX::unpad(padded);
    // ...
}

Python Usage Example

import fex

# Use a 256-bit key for this example
my_key = b'This is my secret 32-byte key!!'
my_data = b'This is the data to be encrypted.'

encrypted = fex.encrypt(my_data, my_key)
decrypted = fex.decrypt(encrypted, my_key)

print("Original:", my_data)
print("Encrypted:", encrypted.hex())
print("Decrypted:", decrypted)

assert my_data == decrypted

Building the Python Module

  1. Install pybind11:
    pip install pybind11
    
  2. Build the module:
    cd Fex
    python setup.py build_ext --inplace
    
  3. Use import fex in Python.

Security Warning

This is a beta, experimental cipher. It has NOT been reviewed or proven secure. Do NOT use for real-world or production cryptography. For research and educational use only!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fex_crypto-1.0b1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fex_crypto-1.0b1-cp313-cp313-win_amd64.whl (64.8 kB view details)

Uploaded CPython 3.13Windows x86-64

File details

Details for the file fex_crypto-1.0b1.tar.gz.

File metadata

  • Download URL: fex_crypto-1.0b1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for fex_crypto-1.0b1.tar.gz
Algorithm Hash digest
SHA256 555913a0eadd5ac41ad6fd2109711d0cd8362e01369e3681fde405fd3751a4fe
MD5 69791751720cd1dda8406d0e39d25b71
BLAKE2b-256 dedf0590fb7229a9e2f6df645816cacd4f3db691d5b5e98bca42df9791a29682

See more details on using hashes here.

File details

Details for the file fex_crypto-1.0b1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: fex_crypto-1.0b1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 64.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for fex_crypto-1.0b1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c9e4dd96826900c842e828a5c2b1600133736f14cf0a2bdfdccbe33807447814
MD5 ef78b744ae42812825e7effdd547b569
BLAKE2b-256 a6f30e9842fcca5876f86197d6d9208621bc7b96026a1dd19421edb09ffc5873

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page