Skip to content

Yigtwxx/xor-image-encryption

XOR Image Encryption for Vision Pipelines

Deterministic, seed-based XOR masking for RGB images. Built for fast dataset obfuscation, computer vision preprocessing, and reproducible experiments.

CI License: MIT

Why this project

  • Reproducible masking: the same seed always generates the same key.
  • Lightweight: pure Python + NumPy + Pillow.
  • Reversible: applying XOR with the same key restores the original image.
  • Practical for ML workflows where visual obfuscation is needed before sharing data.

What it is / What it is not

  • What it is: a deterministic XOR masking tool for images.
  • What it is not: a replacement for modern cryptographic standards like AES or ChaCha20.

60-second quickstart

1) Install

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

2) Single-seed encryption + roundtrip

python xor_single.py --input bugsbunny.jpg --seed 42 --outdir outputs

3) Multi-seed cascaded encryption + roundtrip

python xor_multi.py --input bugsbunny.jpg --seeds 11 22 33 --outdir outputs

Demo and sample outputs

Technical docs

Recommended GitHub metadata

Use this in the repo "About" field:

Seed-based XOR image encryption for deterministic dataset masking and computer vision preprocessing.

Recommended topics:

image-encryption, xor, computer-vision, dataset-anonymization, python, numpy, pillow, image-processing, reproducibility, cryptography-education

Roadmap

  • CLI polish
  • Batch dataset encryption
  • Reproducible benchmark suite

See: ROADMAP.md

Call to action

If this project is useful:

  • Star the repository
  • Watch for updates
  • Open a Discussion with your use case or benchmark

About

A simple image encryption and decryption tool using XOR with seed-based key generation. Supports RGB pixel-level encryption, histogram analysis, and multi-seed operations.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages