A high-performance chaos-based cryptographic system designed for modern applications. ChaosStream combines the unpredictability of chaotic systems with efficient implementation for secure data encryption.
Designed & Implemented by: Enigmatikk (Hornoiu Dragos Ionut)
Version: 1.0
Language: C
ChaosStream is built on the logistic map chaotic system:
xₙ₊₁ = r · xₙ(1-xₙ)
where r = 3.99999 (maximum chaotic behavior)
This system provides:
- Extreme sensitivity to initial conditions
- Deterministic but unpredictable behavior
- Non-linear dynamics
- Strong avalanche effect
- 256-bit key size with 128-bit IV
- High-performance implementation (130+ MB/s)
- SIMD optimizations (AVX2/SSE2)
- Multi-threading support
- Dynamic key-dependent operations
- 64-byte block size for better throughput
- Chaos-based security model
- Dynamic S-box generation
- Key-dependent diffusion matrix
- Dynamic Operations: All transformations are key-dependent, unlike fixed operations in traditional ciphers
- Larger Block Size: 512-bit blocks vs typical 128-bit blocks
- Continuous Evolution: State evolves chaotically vs fixed round transformations
- Software Optimized: Designed for modern CPU architectures
- Flexible Scaling: Efficient from IoT devices to high-performance servers
- Encryption: 131.19 MB/s
- Decryption: 133.44 MB/s
- Multi-threaded scaling: Near-linear up to 32 threads
- Block Size: 512 bits (64 bytes)
- Memory Footprint: Minimal (< 1KB per context)
- GCC compiler
- OpenSSL development libraries
- pthread support
- Make (optional)
gcc -c ChaosStream.c -o ChaosStream.o
ar rcs libchaosstream.a ChaosStream.ogcc -c ChaosStream.c -o ChaosStream.o -fPIC
gcc -shared -o libchaosstream.so ChaosStream.o -lssl -lcrypto -pthread -lm#include "ChaosStream.h"For static linking:
gcc your_program.c -L/path/to/lib -lchaosstream -lssl -lcrypto -pthread -lmFor dynamic linking:
gcc your_program.c -L/path/to/lib -lchaosstream -lssl -lcrypto -pthread -lm
export LD_LIBRARY_PATH=/path/to/lib:$LD_LIBRARY_PATH#include "ChaosStream.h"
// Initialize context
ChaosStreamContext* ctx = chaosstream_create();
uint8_t key[32], iv[16];
// Generate secure key and IV
chaosstream_generate_key(key);
chaosstream_generate_iv(iv);
// Initialize cipher
chaosstream_init(ctx, key, iv);
// Encrypt data
size_t ciphertext_len;
uint8_t* ciphertext = chaosstream_encrypt_buffer(
plaintext, plaintext_len,
key, iv,
&ciphertext_len
);
// Clean up
chaosstream_free(ctx);- Hash-based key expansion
- Chaotic mixing of key material
- Dynamic round key generation
- Continuous chaotic state updates
- Non-linear feedback mechanisms
- Key-dependent transformations
- Dynamic S-box substitution
- Key-dependent diffusion matrix
- Multi-round mixing operations
- SIMD vectorization
- Cache-aligned operations
- Thread-safe design
- Zero-copy operations where possible
-
Secure Communications
- Real-time data encryption
- Network protocol security
- VPN implementations
-
File System Encryption
- Transparent disk encryption
- Secure file containers
- Backup encryption
-
Database Security
- Column-level encryption
- Secure indexes
- Transparent data protection
-
IoT Device Security
- Lightweight encryption
- Efficient power usage
- Small memory footprint
- Enable SIMD support during compilation
- Use multi-threading for large datasets (>4KB)
- Align data to 64-byte boundaries
- Pre-allocate contexts for repeated operations
- Use direct buffer operations for large files
- Implement pipeline processing for streams
Detailed documentation is available in the docs/ directory, including:
- Mathematical foundations
- Architecture details
- Implementation guide
- Security analysis
- Performance benchmarks
- Integration examples
Run the test suite:
gcc -o chaosstream_test ChaosStream.c ChaosStreamTest.c -lssl -lcrypto -pthread -lm
./chaosstream_testThe test suite includes:
- Correctness verification
- Performance benchmarks
- Multi-threading tests
- Memory leak checks
- Edge case handling
While this is primarily a personal project, suggestions and improvements are welcome. Please ensure:
- Code follows existing style
- All tests pass
- Documentation is updated
- Performance is not compromised
- Security properties are maintained
This project is the intellectual property of Hornoiu Dragos Ionut (Enigmatikk). All rights reserved.
- Author: Hornoiu Dragos Ionut
- Alias: Enigmatikk
Made with by Enigmatikk