{"id":17749877,"url":"https://github.com/slippyex/pix-veil","last_synced_at":"2026-01-24T14:06:39.819Z","repository":{"id":259504345,"uuid":"878047689","full_name":"slippyex/pix-veil","owner":"slippyex","description":"Pix-Veil is a powerful cli-tool for steganography in PNG images. It processes an arbitrary input file, compresses, encrypts and splits it in chunks which will be injected into a given set of input pngs","archived":false,"fork":false,"pushed_at":"2024-11-13T17:19:43.000Z","size":7927,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T20:46:05.990Z","etag":null,"topics":["deno","steganography","steganography-algorithms","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slippyex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-24T17:26:45.000Z","updated_at":"2024-11-30T08:34:12.000Z","dependencies_parsed_at":"2025-05-08T20:48:39.808Z","dependency_job_id":null,"html_url":"https://github.com/slippyex/pix-veil","commit_stats":null,"previous_names":["slippyex/pix-veil"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/slippyex/pix-veil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slippyex%2Fpix-veil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slippyex%2Fpix-veil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slippyex%2Fpix-veil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slippyex%2Fpix-veil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slippyex","download_url":"https://codeload.github.com/slippyex/pix-veil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slippyex%2Fpix-veil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28729411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","steganography","steganography-algorithms","typescript"],"created_at":"2024-10-26T11:25:18.680Z","updated_at":"2026-01-24T14:06:39.794Z","avatar_url":"https://github.com/slippyex.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📷 Pix-Veil\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Version](https://img.shields.io/badge/version-1.5.0-green.svg)](#)\n\n**Pix-Veil** is a tiny, yet powerful, command-line tool for steganography in PNG images. \nIt allows you to hide files within PNG images securely using advanced Least Significant Bit (LSB) embedding, \ncoupled with encryption and compression for enhanced security and efficiency.\n\n---\n\n## 🌟 Features\n\n- **Advanced LSB Embedding**: Hide data within the least significant bits of PNG images using customizable parameters.\n- **Strong Encryption**: Secure your data with AES-256-CBC encryption.\n- **Compression**: Reduce data size with Brotli compression before embedding.\n- **Data Chunking and Distribution**: Split data into chunks and distribute them across multiple images.\n- **Encrypted Distribution Map**: Keep track of data chunks with an encrypted distribution map embedded within an image.\n- **Image Capacity Analysis**: Analyze images for optimal data embedding based on tonal capacity.\n- **Debugging Tools**: Enable verbose logging and debug visuals for development and troubleshooting.\n- **Cross-Platform**: Compatible with Windows, macOS, and Linux.\n\n---\n\n## 📋 Table of Contents\n\n- [Installation](#-installation)\n- [Usage](#-usage)\n    - [Encoding](#encoding)\n    - [Decoding](#decoding)\n- [Techniques Explained](#-techniques-explained)\n    - [Least Significant Bit (LSB) Steganography](#least-significant-bit-lsb-steganography)\n        - [LSB Embedding Process](#lsb-embedding-process)\n        - [Flowchart of LSB Embedding](#flowchart-of-lsb-embedding)\n        - [LSB Manipulation Illustration](#lsb-manipulation-illustration)\n    - [Data Encryption](#data-encryption)\n    - [Data Compression](#data-compression)\n    - [Data Chunking and Distribution](#data-chunking-and-distribution)\n        - [Distribution Map](#distribution-map)\n        - [Flowchart of Data Chunking and Distribution](#flowchart-of-data-chunking-and-distribution)\n        - [Diagram of Distribution Map Embedding](#diagram-of-distribution-map-embedding)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n---\n\n## 🚀 Installation\n\n~~~bash\n# Clone the repository\ngit clone https://github.com/slippyex/pix-veil.git\n\n# Navigate to the project directory\ncd pix-veil\n\n# Install dependencies\ndeno install --allow-scripts=npm:sharp@0.33.5\n\n\n~~~\n\n---\n\n## 🛠️ Usage\n\nPix-Veil provides a command-line interface with two primary commands: `encode` and `decode`.\n\n### Encoding\n\nTo hide a file within PNG images:\n\n~~~bash\ndeno task pix-veil:encode \\\n  -i path/to/secret.file \\\n  -p path/to/png/folder \\\n  -o path/to/output/folder \\\n  --verbose\n~~~\n\n**Options:**\n\n- `-i, --input \u003cfile\u003e`: Input file to hide.\n- `-p, --png-folder \u003cfolder\u003e`: Folder containing PNG images to use.\n- `-o, --output \u003cfolder\u003e`: Output folder to store the modified images.\n- `-l, --log`: If set, instead of a progress bar, the process provides a log output.\n- `-v, --verbose`: Enable verbose logging.\n- `--max-chunks-per-png \u003cnumber\u003e  Maximum number of chunks per PNG (Default: 16)`\n- `--max-chunk-size \u003cnumber\u003e      Maximum size of each chunk in bytes (Default: 4096)`\n- `--min-chunk-size \u003cnumber\u003e      Minimum size of each chunk in bytes (minimum 16, Default: 16)`\n- `--no-verify                    Skip verification step during encoding`\n- `--debug-visual`: Enable debug visual blocks in images.\n\n### Decoding\n\nTo extract the hidden file from PNG images:\n\n~~~bash\ndeno task pix-veil:decode \\\n  -i path/to/encoded/png/folder \\\n  -o path/to/output/folder \\\n  --verbose\n~~~\n\n**Options:**\n\n- `-i, --input \u003cfolder\u003e`: Input folder containing the modified PNG images.\n- `-o, --output \u003cfolder\u003e`: Output folder to save the extracted file.\n- `-l, --log`: If set, instead of a progress bar, the process provides a log output.\n- `-v, --verbose`: Enable verbose logging.\n\n---\n\n## 🔍 Techniques Explained\n\n### Least Significant Bit (LSB) Steganography\n\nLSB steganography involves modifying the least significant bits of image pixel values to embed hidden data without significantly altering the image appearance.\n\n#### LSB Embedding Process\n\n- **Data Preparation**: The secret data is compressed and encrypted.\n- **Data Splitting**: The encrypted data is split into chunks.\n- **Image Analysis**: PNG images are analyzed for embedding capacity based on tonal values.\n- **Data Embedding**: Data chunks are embedded into the images using LSB manipulation.\n\n#### Flowchart of LSB Embedding\n\n~~~mermaid\nflowchart TD\n    A[Start Encoding Process] --\u003e B[Read Input File]\n    B --\u003e C[Compress Data]\n    C --\u003e D[Encrypt Data with Password]\n    D --\u003e E[Split Encrypted Data into Chunks]\n    E --\u003e F[Read PNG Images from Folder]\n    F --\u003e G[Analyze Image Capacities]\n    G --\u003e H{Is Capacity Sufficient?}\n    H -- No --\u003e I[Error: Insufficient Capacity]\n    H -- Yes --\u003e J[Distribute Chunks Across Images]\n    J --\u003e K[Generate Distribution Map]\n    K --\u003e L[Encrypt and Compress Distribution Map]\n    L --\u003e M[Embed Chunks into Images using LSB]\n    M --\u003e N[Embed Distribution Map into Carrier Image]\n    N --\u003e O[Save Modified Images to Output Folder]\n    O --\u003e P[End Encoding Process]\n~~~\n\n### LSB Manipulation Illustration\n\n*Example: Embedding Byte 0xDE into RGB Channels Using 2 Bits Per Channel*\n\nWe want to hide `0xDE` (which is `11011110` in binary) into the least significant bits (LSBs) of an RGB pixel, using 2 bits per channel.\n\n#### Byte to hide:\n- **0xDE** = `11011110`\n\nNow, split this byte into three 2-bit parts:\n1. **Red channel**: `11`\n2. **Green channel**: `01`\n3. **Blue channel**: `10`\n\n#### Initial RGB Pixel Values:\n\nLet’s assume the initial RGB values of a pixel are as follows (in decimal and binary):\n\n- **Red**: 200 (binary: `11001000`)\n- **Green**: 150 (binary: `10010110`)\n- **Blue**: 100 (binary: `01100100`)\n\n#### Modifying the 2 LSBs of Each Channel:\n\nWe will embed the 2 bits for each channel into the two least significant bits of the original pixel values.\n\n1. **Red channel**: Embed `11` into the last two bits of Red (original: `11001000`):\n    - Original Red: `11001000` (200)\n    - Modified Red: `11001111` (207)\n\n2. **Green channel**: Embed `01` into the last two bits of Green (original: `10010110`):\n    - Original Green: `10010110` (150)\n    - Modified Green: `10010101` (149)\n\n3. **Blue channel**: Embed `10` into the last two bits of Blue (original: `01100100`):\n    - Original Blue: `01100100` (100)\n    - Modified Blue: `01100110` (102)\n\n#### Final RGB Values After Embedding:\n\n- **Red**: `207` (binary: `11001111`)\n- **Green**: `149` (binary: `10010101`)\n- **Blue**: `102` (binary: `01100110`)\n\nThese RGB values now contain the byte `0xDE` within their least significant bits.\n\n~~~mermaid\ngraph TD\n    subgraph Original Pixel\n        R1[Red: 110010*00* - 200]\n        G1[Green: 100101*10* - 150]\n        B1[Blue: 011001*00* -100]\n    end\n\n    subgraph Modified Pixel After Embedding 0xDE\n        R2[Red: 110011**11** - 207]\n        G2[Green: 100101**01** - 149]\n        B2[Blue: 011001**10** - 102]\n    end\n\n    Byte[0xDE 11011110]\n    Byte --\u003e R2\n    Byte --\u003e G2\n    Byte --\u003e B2\n~~~\n\n**Explanation**:\n\n- **Original Pixel Channels**: The original binary values of the pixel channels.\n- **Bits to Embed**: The 2-bit groups from the byte `0xDE`.\n- **Embedding**: Each 2-bit group is embedded into the least significant bits (LSBs) of the channels, following the channel sequence `RGB`.\n- **Modified Pixel Channels**: The new binary values of the channels after embedding.\n\n**Details**:\n\n- **R1**:\n    - Original: `1001 1010`\n    - Embed `11` into LSBs:\n        - Replace last 2 bits with `11`: `1001 10**11**`\n- **G1**:\n    - Original: `0110 1011`\n    - Embed `01` into LSBs:\n        - Replace last 2 bits with `01`: `0110 10**01**`\n- **B1**:\n    - Original: `1110 0101`\n    - Embed `11` into LSBs:\n        - Replace last 2 bits with `11`: `1110 01**11**`\n- **R2**:\n    - Original: `1010 1100`\n    - Embed `10` into LSBs:\n        - Replace last 2 bits with `10`: `1010 11**10**`\n\n---\n\n### Data Encryption\n\n- **Algorithm**: AES-256-CBC.\n- **Purpose**: Ensures that even if the embedded data is extracted, it cannot be read without the correct password.\n- **Process**:\n    - Generate a 256-bit key from the password using SHA-256.\n    - Encrypt the compressed data with the generated key.\n    - Prepend a random Initialization Vector (IV) to the encrypted data.\n\n---\n\n### Data Compression\n\n- **Algorithm**: Brotli Compression.\n- **Purpose**: Reduces the size of the data to minimize the impact on the carrier images.\n- **Benefits**:\n    - Fewer data to embed leads to less modification of the images.\n    - Improves security by obfuscating the data patterns.\n\n---\n\n### Data Chunking and Distribution\n\n- **Chunking**: The encrypted data is split into multiple chunks of variable sizes.\n- **Distribution**: Chunks are randomly distributed across different images and positions.\n- **Benefits**:\n    - Increases security by scattering data.\n    - Balances the load across multiple images to minimize distortion.\n\n#### Distribution Map\n\n- **Purpose**: Keeps track of where each data chunk is embedded.\n- **Security**:\n    - The distribution map is compressed and encrypted.\n    - Embedded within one of the images using LSB.\n- **Components**:\n    - Chunk IDs.\n    - Corresponding image filenames.\n    - Start and end positions.\n    - Bits per channel and channel sequence used.\n\n#### Flowchart of Data Chunking and Distribution\n\n~~~mermaid\nflowchart TD\n    A[Start Data Chunking] --\u003e B[Encrypted Data]\n    B --\u003e C[Determine Chunk Sizes]\n    C --\u003e D[Split Data into Chunks]\n    D --\u003e E[Analyze Image Capacities]\n    E --\u003e F{Enough Capacity for Chunks?}\n    F -- No --\u003e G[Error: Insufficient Capacity]\n    F -- Yes --\u003e H[Assign Chunks to Images]\n    H --\u003e I[Record Assignments in Distribution Map]\n    I --\u003e J[Encrypt and Compress Distribution Map]\n    J --\u003e K[End Data Chunking]\n~~~\n\n#### Diagram of Distribution Map Embedding\n\n~~~mermaid\nsequenceDiagram\n    participant Encoder\n    participant DistributionMap\n    participant CarrierImage\n\n    Encoder-\u003e\u003eDistributionMap: Create Map of Chunk Locations\n    Encoder-\u003e\u003eDistributionMap: Encrypt and Compress Map\n    Encoder-\u003e\u003eCarrierImage: Embed Distribution Map using LSB\n    CarrierImage-\u003e\u003eEncoder: Distribution Map Embedded\n    Encoder-\u003e\u003eUser: Save Carrier Image with Embedded Map\n~~~\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature/YourFeature`).\n3. Commit your changes (`git commit -m 'Add your feature'`).\n4. Push to the branch (`git push origin feature/YourFeature`).\n5. Open a Pull Request.\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\nMade with ❤️ by [slippyex](https://github.com/slippyex)\n\n---\n\n## 📝 Additional Notes\n\n- **Dependencies**:\n    - Deno v2\n    - Sharp library for image processing\n    - Commander for CLI interface\n    - Inquirer for password prompt\n    - Figlet for a fancy ASCII art logo\n- **Security Considerations**:\n    - Ensure that the password used is strong and kept confidential.\n    - Be aware of the legal implications of steganography in your jurisdiction.\n\n---\n\n# Acknowledgments\n\n- Icons made by [Freepik](https://www.freepik.com) from [www.flaticon.com](https://www.flaticon.com).\n- Inspired by various steganography techniques and tools.\n\n---\n\n[![ForTheBadge built-with-love](http://ForTheBadge.com/images/badges/built-with-love.svg)](#)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslippyex%2Fpix-veil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslippyex%2Fpix-veil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslippyex%2Fpix-veil/lists"}