Skip to main content

A fractal-based encryption system

Project description

Fractal Encryption System(FES)

A Python library for encrypting and decrypting messages using fractal-based techniques.

Installation

pip install fractal_encryption

Usage

from fractal_encryption import generate_mandelbrot, generate_julia, generate_burningship, encrypt_message, decrypt_message
import secrets

# Generate fractal (Mandelbrot set)
width, height = 100, 100
max_iter = 256
seed = 12345  # User-defined seed value
iv = secrets.token_hex(16)  # Random initial vector
fractal_pixels = generate_mandelbrot(width, height, max_iter, seed, iv)

# Plain text
message = "Hello, Fractal Encryption!"

# Encrypt
encrypted_message = encrypt_message(message, fractal_pixels, iv)
print("Encrypted Message:", encrypted_message)

# Decrypt
decrypted_message = decrypt_message(encrypted_message, fractal_pixels, iv)
print("Decrypted Message:", decrypted_message)

# Generate fractal (Julia set)
c_real, c_imag = -0.7, 0.27015  # Julia set parameters
fractal_pixels = generate_julia(width, height, max_iter, seed, iv, c_real, c_imag)

# Encrypt
encrypted_message = encrypt_message(message, fractal_pixels, iv)
print("Encrypted Message (Julia):", encrypted_message)

# Decrypt
decrypted_message = decrypt_message(encrypted_message, fractal_pixels, iv)
print("Decrypted Message (Julia):", decrypted_message)

# Generate fractal (Burning Ship)
fractal_pixels = generate_burningship(width, height, max_iter, seed, iv)

# Encrypt
encrypted_message = encrypt_message(message, fractal_pixels, iv)
print("Encrypted Message (Burning Ship):", encrypted_message)

# Decrypt
decrypted_message = decrypt_message(encrypted_message, fractal_pixels, iv)
print("Decrypted Message (Burning Ship):", decrypted_message)

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

fractal_encryption-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

fractal_encryption-0.1.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file fractal_encryption-0.1.0.tar.gz.

File metadata

  • Download URL: fractal_encryption-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for fractal_encryption-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d3f4e0b56bebed8e51c99c0561695cc58e3295fa6e33e1c8104600d5369577e2
MD5 128a7566e9a0f0d48e1a7b06ae83b322
BLAKE2b-256 e2019ada55aa193314ff9f51b9a46f191458a5ad91b40d8f4fd8f681381fbdc8

See more details on using hashes here.

File details

Details for the file fractal_encryption-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fractal_encryption-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc48c93d5c2cd1850e55c8dd1e4088a696d37e06b412752407fb3b15e13eae09
MD5 a620ecd39654ab46061977f09c172e35
BLAKE2b-256 630390a7be606bdff16dcb1cd2be6f18763b51cd52da753bcc9f032b8b6b3412

See more details on using hashes here.

Supported by

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