Skip to content
omnonePublic

About

A Python implementation featuring a hybrid security approach: files are first protected via AES 256-bit encryption, followed by steganographic embedding within image files for covert data storage.

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Repository files navigation

pyRanoid 🔒

Tests Python License

pyRanoid is a Python tool for secure file concealment. It uses LSB steganography to hide files inside images. The file data is encrypted with AES-256-CBC. The program supports two methods for generating the AES key: either using a hardcoded user password or generating a random one. In the latter case, the random password is securely encrypted using RSA keys before use. This combination of RSA, AES, and steganography ensures your sensitive data is both encrypted and hidden from plain sight.

Features

Security

  • AES-256-CBC Encryption: Military-grade encryption using the Advanced Encryption Standard with 256-bit keys
  • PBKDF2 Key Derivation: Secure password-based key derivation with 100,000 iterations using HMAC-SHA256
  • Random Salt & IV: Each encryption uses unique randomly generated salt and initialization vectors
  • Cryptographic Integrity: Built on the industry-standard cryptography library

Steganography

  • LSB Technique: Hides encrypted data in the least significant bits of image pixels
  • Lossless Format: Works with PNG images to preserve data integrity
  • Dimension Preservation: Maintains original image dimensions and visual quality
  • Capacity Calculation: Automatically checks if the carrier image can hold the encrypted data

User Interface

  • Dual Interface: Choose between a modern GTK3 GUI or an interactive CLI
  • GUI Features:
    • Drag-and-drop file selection
    • Real-time password strength indicator
    • Progress tracking for encryption/decryption operations
    • Visual feedback and error handling
  • CLI Features:
    • Rich terminal formatting with colors and spinners
    • Interactive password input with verification
    • Command-line arguments for automation
    • Detailed error messages

Requirements

  • Python 3.11 or higher
  • Dependencies (automatically managed via uv)
  • GTK3 libraries (for GUI mode)

Installation & Usage

# Install dependencies
make install

# Run GUI
make run-gui

# Run CLI
make run-cli

For more commands, run make help

Development

Setting Up Development Environment

  1. Clone the repository

    git clone https://github.com/omnone/pyRanoid.git
    cd pyRanoid
  2. Install dependencies

    pyRanoid uses uv for fast, reliable dependency management:

    make install

    This will:

    • Install all project dependencies
    • Install development dependencies (pytest, pytest-mock, pytest-cov, ruff)
    • Install the package in editable mode

Project Structure

pyRanoid/
├── src/
│   ├── pyRanoid/          # Main package
│   │   ├── __init__.py
│   │   ├── cli.py         # CLI interface
│   │   ├── gui.py         # GTK3 GUI interface
│   │   └── utils.py       # Core encryption/steganography logic
│   └── tests/
│       ├── unit/          # Unit tests
│       └── integration/   # Integration tests
├── pyproject.toml         # Project configuration and dependencies
├── Makefile              # Development commands
└── README.md

Running Tests

pyRanoid has comprehensive test coverage with both unit and integration tests:

# Run all tests
make test

# Run only unit tests
make test-unit

# Run only integration tests
make test-integration

# Run tests with coverage report
make test-cov

# Generate HTML coverage report
make test-cov-html

The HTML coverage report will be generated in htmlcov/index.html.

Code Quality

Linting:

make lint

Formatting:

make format

The project uses Ruff for both linting and formatting, ensuring consistent code style.

Building Distribution Packages

To build wheel and source distribution packages:

make build

Packages will be created in the dist/ directory.

Development Workflow

  1. Create a feature branch

    git checkout -b feature/your-feature-name
  2. Make your changes

    • Write code following the existing style
    • Add tests for new functionality
    • Update documentation as needed
  3. Run tests and linting

    make test
    make lint
    make format
  4. Test both interfaces

    make run-cli    # Test CLI interface
    make run-gui    # Test GUI interface
  5. Commit and push

    git add .
    git commit -m "Description of changes"
    git push origin feature/your-feature-name

Debugging

For development and debugging, you can run the application directly:

# CLI mode
uv run python main.py

# GUI mode
uv run python -m pyRanoid.gui

Dependencies

  • Runtime dependencies: Pillow, cryptography, pygobject, numpy, rich
  • Development dependencies: pytest, pytest-mock, pytest-cov, ruff

All dependencies are managed in pyproject.toml and locked in uv.lock.

Contributing

Contributions to pyRanoid are welcome! If you encounter any issues or have ideas for enhancements, please feel free to submit a pull request or create an issue in the project's repository.

Please ensure:

  • All tests pass (make test)
  • Code is properly formatted (make format)
  • Linting passes (make lint)
  • New features include appropriate tests

⭐ Support

If you find pyRanoid useful, please consider giving it a star on GitHub!

About

A Python implementation featuring a hybrid security approach: files are first protected via AES 256-bit encryption, followed by steganographic embedding within image files for covert data storage.

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages