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.
- 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
cryptographylibrary
- 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
- 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
- Python 3.11 or higher
- Dependencies (automatically managed via uv)
- GTK3 libraries (for GUI mode)
# Install dependencies
make install
# Run GUI
make run-gui
# Run CLI
make run-cliFor more commands, run make help
-
Clone the repository
git clone https://github.com/omnone/pyRanoid.git cd pyRanoid -
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
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
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-htmlThe HTML coverage report will be generated in htmlcov/index.html.
Linting:
make lintFormatting:
make formatThe project uses Ruff for both linting and formatting, ensuring consistent code style.
To build wheel and source distribution packages:
make buildPackages will be created in the dist/ directory.
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Write code following the existing style
- Add tests for new functionality
- Update documentation as needed
-
Run tests and linting
make test make lint make format -
Test both interfaces
make run-cli # Test CLI interface make run-gui # Test GUI interface
-
Commit and push
git add . git commit -m "Description of changes" git push origin feature/your-feature-name
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- 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.
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
If you find pyRanoid useful, please consider giving it a star on GitHub!
