Skip to content

0xkuze/aurora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 Aurora - Experimental Encryption Project

License: CC BY 4.0 Zig Status Learning

⚠️ DISCLAIMER: This is an experimental amateur project created for learning and fun. It is NOT cryptographically secure and should NOT be used for real data protection!

Aurora is an experimental file encryption project that explores bio-inspired cryptographic concepts. This is a learning project by an experienced programmer (not a cryptography expert) who wanted to experiment with Zig and creative encryption ideas with significant AI assistance.

🎯 What This Project Is

  • 🧪 Experimental - A fun exploration of bio-inspired encryption concepts
  • 📚 Learning Project - Built to learn Zig programming and encryption basics
  • 🤖 AI-Assisted - Developed with significant help from AI tools
  • 🎮 For Fun - Created for enjoyment and experimentation, not production use
  • 📖 Educational - May be interesting for learning about creative crypto approaches
  • ⚠️ Amateur Work - Made by someone who is NOT a cryptography expert

⚠️ Important Disclaimers

Security Warning

DO NOT USE FOR REAL DATA! This encryption is experimental and has not been:

  • Reviewed by cryptography experts
  • Tested against real-world attacks
  • Proven to be mathematically secure
  • Validated by security professionals

About the Author

  • Experienced programmer - But amateur in cryptography field
  • AI-assisted development - Used AI tools for cryptographic concepts and guidance
  • Learning cryptography - Exploring encryption concepts through hands-on coding
  • Experimental purpose - Built for learning crypto concepts, not production security

Intended Use

  • Learning Zig - Exploring the Zig programming language
  • Experimenting - Playing with bio-inspired algorithm concepts
  • Having fun - Enjoying the creative programming process
  • Sharing knowledge - Maybe others can learn from or improve this code

📋 Table of Contents

🤔 About This Project

This started as a way to explore cryptographic concepts while working with Zig. The "swarm intelligence" approach came from curiosity: "What if encryption could simulate biological ecosystems?"

While I'm comfortable with the programming side, I'm amateur in cryptography - so this is experimental learning rather than serious security. The implementation explores various programming techniques and crypto concepts that might be educational.

🧠 Algorithm Overview

Aurora experiments with a "Symbiotic Swarm Cipher" - an attempt to simulate an ecosystem of agents working together to transform data. This represents my amateur exploration of bio-inspired concepts applied to encryption.

Note: While the programming is solid, the cryptographic design is amateur work - security properties are unknown!

Core Architecture

graph TB
    A[Input Data] --> B[Chunk Processing]
    B --> C[Swarm Agent System]
    C --> D[Multi-Dimensional Keystream]
    D --> E[5D Encryption Engine]
    E --> F[Encrypted Output]
    
    G[Environmental Factors] --> C
    H[Anti-RE Security] --> C
    I[Adaptive Parameters] --> D
    
    style A fill:#e1f5fe
    style F fill:#c8e6c9
    style C fill:#fff3e0
    style E fill:#fce4ec
Loading

Encryption Process Flow

sequenceDiagram
    participant U as User
    participant E as Encrypter
    participant S as Swarm System
    participant K as Keystream Generator
    participant O as Output
    
    U->>E: Input file
    E->>E: Initialize swarm agents
    E->>S: Create ecosystem environment
    
    loop For each 240-byte chunk
        E->>K: Generate dimensional keystream
        K->>K: Apply swarm intelligence
        K->>E: Return keystream
        E->>E: Apply 5D encryption
        E->>O: Write encrypted block (256 bytes)
    end
    
    E->>U: Encrypted file + key
Loading

🚀 Installation & Usage

Prerequisites

  • Zig 0.13.0 or later
  • Linux/macOS/Windows (tested on Linux)
  • 32-character obfuscation key (required at build time)

Quick Start

# Clone the repository
git clone https://github.com/your-username/aurora-crypto.git
cd aurora-crypto

# Build the system
zig build -Dobfuscation_key="your_32_character_key_here_123456"

# Encrypt a file
./zig-out/bin/aurora_encrypter myfile.txt

# Decrypt a file
./zig-out/bin/aurora_decrypter myfile.txt.aurora

Build Options

# Build with custom optimization
zig build -Dobfuscation_key="your_key" -Doptimize=ReleaseFast

# Run tests
zig build test -Dobfuscation_key="your_key"

# Build development tools
zig build tools -Dobfuscation_key="your_key"

# Individual tool usage
zig build benchmark-test -Dobfuscation_key="your_key"
zig build memory-test -Dobfuscation_key="your_key"

🔬 How It Works (Experimental)

1. The "Symbiotic Swarm Cipher" Experiment

The main idea was to create a bio-inspired encryption approach that simulates an ecosystem of interacting agents. Whether this actually provides good security is unknown - it's more of a creative experiment in algorithm design.

graph LR
    subgraph "Swarm Ecosystem"
        A[Predator Agents] --> B[Keystream Generation]
        C[Prey Agents] --> B
        D[Neutral Agents] --> B
        E[Hybrid Agents] --> B
        F[Quantum Agents] --> B
    end
    
    subgraph "Environmental Factors"
        G[Temperature] --> H[Agent Behavior]
        I[Resource Density] --> H
        J[Seasonal Cycles] --> H
        K[Gravity] --> H
    end
    
    H --> B
    B --> L[5D Encryption]
    
    style A fill:#ffcdd2
    style C fill:#c8e6c9
    style D fill:#fff9c4
    style E fill:#e1bee7
    style F fill:#bbdefb
Loading

Agent Types & Behaviors

Agent Type Behavior Keystream Contribution
Predator Aggressive, high-energy movement High entropy, unpredictable patterns
Prey Evasive, survival-focused Defensive transformations, chaos injection
Neutral Balanced, steady operations Stability and consistency
Hybrid Adaptive, multi-strategy Complex pattern combinations
Quantum Superposition-based behavior Quantum-inspired randomness

2. Multi-Dimensional Keystream Generation

Aurora generates keystreams in a 5-dimensional space (X, Y, Z, Time, Energy) where each dimension contributes unique cryptographic properties.

graph TB
    subgraph "5D Keystream Generation"
        A[X Dimension] --> F[Combined Keystream]
        B[Y Dimension] --> F
        C[Z Dimension] --> F
        D[Time Dimension] --> F
        E[Energy Dimension] --> F
    end
    
    subgraph "Dimensional Properties"
        A --> A1[Spatial Distribution]
        B --> B1[Agent Interactions]
        C --> C1[Depth Complexity]
        D --> D1[Temporal Evolution]
        E --> E1[Energy Flow Patterns]
    end
    
    F --> G[Encryption Application]
    
    style F fill:#4fc3f7
    style G fill:#81c784
Loading

Dimensional Calculations

X(t) = base_position + velocity * time + acceleration * time²
Y(t) = interaction_strength * agent_density * environmental_factor
Z(t) = energy_level * resource_availability * seasonal_modifier
T(t) = temporal_hash(previous_states, current_epoch)
E(t) = kinetic_energy + potential_energy + interaction_energy

3. Encryption Process Detail

flowchart TD
    A[Input Chunk<br/>240 bytes max] --> B{Size Check}
    
    B -->|≤ 32 bytes| C[5D Encryption<br/>Advanced Mode]
    B -->|> 32 bytes| D[Standard Encryption<br/>Performance Mode]
    
    C --> E[Generate 5D Coordinates]
    E --> F[Apply Dimensional Transformations]
    F --> G[Swarm Agent Processing]
    G --> H[Energy-based Scrambling]
    H --> I[Output Block<br/>256 bytes]
    
    D --> J[XOR with Keystream]
    J --> K[Apply Checksum]
    K --> I
    
    I --> L[Final Encrypted Block]
    
    style C fill:#e8f5e8
    style D fill:#fff3e0
    style I fill:#e3f2fd
Loading

4. Security Layers

Aurora implements multiple security layers working in tandem:

graph LR
    subgraph "Security Architecture"
        A[Anti-RE Layer] --> B[Swarm Intelligence]
        B --> C[5D Encryption]
        C --> D[Checksum Verification]
        D --> E[Key Management]
    end
    
    subgraph "Protection Methods"
        F[Debugger Detection] --> A
        G[Timing Analysis] --> A
        H[Memory Protection] --> A
        I[Code Obfuscation] --> A
    end
    
    subgraph "Cryptographic Strength"
        J[256-bit Keys] --> E
        K[Dynamic Keystreams] --> B
        L[Environmental Entropy] --> B
        M[Quantum Resistance] --> C
    end
    
    style A fill:#ffcdd2
    style C fill:#e1f5fe
    style E fill:#f3e5f5
Loading

🛡️ Experimental Features

⚠️ Remember: These are experimental concepts, not proven security features!

What This Project Attempts

Aurora tries to implement some interesting ideas:

  • Debugger Detection - Attempts to detect debugging tools (basic implementation)
  • Memory Cleanup - Tries to clean up sensitive data after use
  • Code Obfuscation - Uses build-time keys for some basic obfuscation
  • Dynamic Keystreams - Generates different keystreams based on "environmental" factors

Technical Details (Unverified)

  • Block Size: 240-byte input → 256-byte output (adds some padding)
  • Agent Simulation: Uses structs to simulate "biological agents"
  • Multi-dimensional Processing: Attempts 5D coordinate transformations
  • Environmental Factors: Simulates ecosystem conditions affecting encryption

Cryptographic Experiments (Amateur)

Warning: Amateur cryptography - not mathematically analyzed!

  • Bio-inspired Design - Attempts to use ecosystem concepts for encryption
  • Dynamic Systems - Behavior changes based on environmental factors
  • Complex Interactions - Multiple agent types working together

These are programming experiments with crypto concepts, not proven security!

⚡ Performance

Performance Notes

⚠️ These are rough estimates from basic testing - not professional benchmarks!

Metric Aurora (estimated) Notes
Throughput ~1-2 GB/s Depends on system, not optimized
Memory Usage ~5-20 MB Streaming approach helps
CPU Usage Variable Burst processing style
Latency Variable Not professionally measured

Memory Usage Approach

graph TB
    subgraph "Traditional Approach"
        A[Large File] --> B[Load All in Memory]
        B --> C[High RAM Usage]
    end
    
    subgraph "Aurora Streaming"
        D[Large File] --> E[Process in Chunks]
        E --> F[Lower Memory Usage]
    end
    
    style C fill:#ffcdd2
    style F fill:#c8e6c9
Loading

Implementation Features

  • Streaming Processing - Attempts to process files in chunks
  • Basic Optimization - Some effort to use memory efficiently
  • Simple Architecture - Straightforward implementation approach

🧪 Testing

Aurora includes testing for basic functionality and some experimental security concepts:

Test Categories

mindmap
  root)Testing Approach(
    Basic Functionality
      Round Trip Tests
      Data Integrity
      Error Handling
      Memory Management
    Amateur Security Tests
      Simple Randomness Checks
      Basic Pattern Detection
      Encryption/Decryption Verification
      File Size Testing
    Experimental Features
      Agent System Testing
      Environmental Simulation
      Performance Measurement
      Fuzzing Tests
Loading

Running Tests

# Core functionality tests
zig build test -Dobfuscation_key="your_key"

# Security test suite
zig test src/security_tests.zig -Dobfuscation_key="your_key"

# Performance benchmarks
zig build benchmark-test -Dobfuscation_key="your_key"

# Memory usage analysis
zig build memory-test -Dobfuscation_key="your_key"

# Fuzzing tests
zig build fuzzing-test -Dobfuscation_key="your_key"

🏗️ Project Structure

aurora/
├── src/                      # Core implementation
│   ├── aurora_core.zig       # Main cryptographic system
│   ├── encrypter.zig         # File encryption tool
│   ├── decrypter.zig         # File decryption tool
│   ├── security_tests.zig    # Security test framework
│   └── security_benchmarks.zig # Advanced security tests
├── tools/                    # Development tools
│   ├── benchmark_test.zig    # Performance benchmarking
│   ├── memory_test.zig       # Memory usage analysis
│   ├── fuzzing_test.zig      # Fuzz testing
│   └── gpu_acceleration.zig  # GPU acceleration exploration
├── build.zig                 # Build configuration
├── TOOLS_USAGE.md           # Tools usage guide
└── README.md                # This file

🔧 Configuration

Build-time Configuration

Aurora requires a 32-character obfuscation key at build time for security:

# Example obfuscation keys (use your own!)
zig build -Dobfuscation_key="my_super_secret_key_123456789012"
zig build -Dobfuscation_key="prod_aurora_key_2024_secure_build"

Runtime Parameters

The system automatically adapts various parameters:

  • Agent Count: Scaled based on input size
  • Environmental Factors: Derived from system entropy
  • Optimization Level: Adjusted for file size and available resources

🚨 Security Considerations

Key Management (Experimental)

  • Key Generation: Based on file content and metadata hash (amateur approach)
  • Key Storage: Not stored in encrypted files - user manages keys
  • Key Approach: Attempts 256-bit operations (not cryptographically validated)
  • Key Handling: Basic format checking (not security-hardened)

Usage Guidelines

⚠️ IMPORTANT: Do NOT use this for anything important!

  1. Experimental only - This is not secure encryption
  2. Learning purposes - Great for understanding concepts
  3. Keys get lost - Don't encrypt anything you need
  4. Bugs exist - Expect things to break sometimes

🔬 Possible Future Ideas

Note: These are just ideas, not planned features or promises!

  • GPU Experimentation - Maybe try GPU acceleration someday
  • More Testing - Could add more test cases
  • Code Cleanup - Always room for improvement
  • Learning More - Continue learning about cryptography and Zig

🤝 Contributing

If you're interested in this experimental project, feel free to:

  1. Fork and experiment
  2. Suggest improvements - I'm still learning!
  3. Point out issues - Probably lots of them
  4. Share ideas - Always open to learning

Getting Started

git clone https://github.com/your-username/aurora.git
cd aurora

# You'll need Zig 0.13.0+
# Try building:
zig build -Dobfuscation_key="any_32_character_key_here_12345"

# Run basic tests:
zig build test -Dobfuscation_key="any_32_character_key_here_12345"

Remember: This is an amateur project, so don't expect production-quality code!

📜 License

This project is licensed under the Creative Commons Attribution 4.0 International License - see the LICENSE file for details.

Attribution Required: If you use this code, you must credit "Aurora Encryption Project by Cristian" in your work.

📚 Learning Resources

🙏 Acknowledgments

  • Zig community - for the awesome language and helpful documentation
  • AI assistants - for helping with much of this code and learning
  • Cryptography researchers - for the real security work that actually matters
  • Open source community - for making learning possible

Aurora - An amateur's experimental journey into encryption concepts 🧪

Remember: This is a learning project, not real security software!

About

a simple encription system created for learn zig, based on symbiotic swarm agents

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors