{ "info": { "author": "Ryan Gibson", "author_email": "ryanalexandergibson@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only" ], "description": "# Steganography\n\n# Table of Contents\n * [Installation](#Installation)\n * [Byte Sequence Manipulation](#ByteSequenceManipulation)\n * [WavSteg](#WavSteg)\n * [LSBSteg](#LSBSteg)\n * [StegDetect](#StegDetect)\n\n\n## Installation\nThis project is on [PyPI](https://pypi.org/project/stego-lsb/) and can be\ninstalled with\n\n pip install stego-lsb\n\nAlternatively, you can install it from this repository directly:\n\n git clone https://github.com/ragibson/Steganography\n cd Steganography\n python3 setup.py install\n\n\n## Byte Sequence Manipulation\nbit_manipulation provides the ability to (quickly) interleave the bytes of a\npayload directly in the least significant bits of a carrier byte sequence.\n\nSpecifically, it contains four primary functions:\n\n # Interleave the bytes of payload into the num_lsb LSBs of carrier.\n lsb_interleave_bytes(carrier, payload, num_lsb, truncate=False)\n\n # Deinterleave num_bits bits from the num_lsb LSBs of carrier.\n lsb_deinterleave_bytes(carrier, num_bits, num_lsb)\n\n # Runs lsb_interleave_bytes with a List[uint8] carrier.\n lsb_interleave_list(carrier, payload, num_lsb)\n\n # Runs lsb_deinterleave_bytes with a List[uint8] carrier.\n lsb_deinterleave_list(carrier, num_bits, num_lsb)\n\nRunning `bit_manipulation.py`, calling its `test()` function directly, or\nrunning `stegolsb test` should produce output similar to\n\n Testing 1.0 MB payload -> 10.0 MB carrier...\n Progress: [################################]\n ----------------------------------------\n | # LSBs | Encode Rate | Decode rate |\n | 1 | 40.1 MB/s | 56.3 MB/s |\n | 2 | 56.6 MB/s | 52.7 MB/s |\n | 3 | 82.5 MB/s | 77.4 MB/s |\n | 4 | 112.4 MB/s | 105.9 MB/s |\n | 5 | 135.9 MB/s | 129.8 MB/s |\n | 6 | 159.9 MB/s | 152.4 MB/s |\n | 7 | 181.7 MB/s | 174.6 MB/s |\n | 8 | 372.8 MB/s | 902.8 MB/s |\n ----------------------------------------\n\n\n## WavSteg\nWavSteg uses least significant bit steganography to hide a file in the samples\nof a .wav file.\n\nFor each sample in the audio file, we overwrite the least significant bits with\nthe data from our file.\n\n### How to use\nWavSteg requires Python 3\n\nRun WavSteg with the following command line arguments:\n\n Command Line Arguments:\n -h, --hide To hide data in a sound file\n -r, --recover To recover data from a sound file\n -i, --input TEXT Path to a .wav file\n -s, --secret TEXT Path to a file to hide in the sound file\n -o, --output TEXT Path to an output file\n -n, --lsb-count INTEGER How many LSBs to use [default: 2]\n -b, --bytes INTEGER How many bytes to recover from the sound file\n --help Show this message and exit.\n\nExample:\n\n $ stegolsb wavsteg -h -i sound.wav -s file.txt -o sound_steg.wav -n 1\n # OR\n $ stegolsb wavsteg -r -i sound_steg.wav -o output.txt -n 1 -b 1000\n\n### Hiding Data\nHiding data uses the arguments -h, -i, -s, -o, and -n.\n\nThe following command would hide the contents of file.txt into sound.wav and\nsave the result as sound_steg.wav. The command also outputs how many bytes have\nbeen used out of a theoretical maximum.\n\nExample:\n\n $ stegolsb wavsteg -h -i sound.wav -s file.txt -o sound_steg.wav -n 2\n Using 2 LSBs, we can hide 6551441 bytes\n Files read in 0.01s\n 5589889 bytes hidden in 0.24s\n Output wav written in 0.03s\n\nIf you attempt to hide too much data, WavSteg will print the minimum number of\nLSBs required to hide your data.\n\n### Recovering Data\nRecovering data uses the arguments -r, -i, -o, -n, and -b\n\nThe following command would recover the hidden data from sound_steg.wav and\nsave it as output.txt. This requires the size in bytes of the hidden data to\nbe accurate or the result may be too short or contain extraneous data.\n\nExample:\n\n $ stegolsb wavsteg -r -i sound_steg.wav -o output.txt -n 2 -b 5589889\n Files read in 0.02s\n Recovered 5589889 bytes in 0.18s\n Written output file in 0.00s\n\n\n## LSBSteg\nLSBSteg uses least significant bit steganography to hide a file in the color\ninformation of an RGB image (.bmp or .png).\n\nFor each color channel (R,G,B) in each pixel of the image, we overwrite the\nleast significant bits of the color value with the data from our file.\nIn order to make recovering this data easier, we also hide the file size\nof our input file in the first few color channels of the image.\n\n### How to use\nYou need Python 3 and Pillow, a fork of the Python Imaging Library (PIL).\n\nRun LSBSteg with the following command line arguments:\n\n Command Line Arguments:\n -h, --hide To hide data in an image file\n -r, --recover To recover data from an image file\n -a, --analyze Print how much data can be hidden within an image [default: False]\n -i, --input TEXT Path to an bitmap (.bmp or .png) image\n -s, --secret TEXT Path to a file to hide in the image\n -o, --output TEXT Path to an output file\n -n, --lsb-count INTEGER How many LSBs to use [default: 2]\n -c, --compression INTEGER RANGE\n 1 (best speed) to 9 (smallest file size) [default: 1]\n --help Show this message and exit.\n\nExample:\n\n $ stegolsb steglsb -a -i input_image.png -s input_file.zip -n 2\n # OR\n $ stegolsb steglsb -h -i input_image.png -s input_file.zip -o steg.png -n 2 -c 1\n # OR\n $ stegolsb steglsb -r -i steg.png -o output_file.zip -n 2\n\n### Analyzing\nBefore hiding data in an image, it can useful to see how much data can be\nhidden. The following command will achieve this, producing output similar to\n\n $ stegolsb steglsb -a -i input_image.png -s input_file.zip -n 2\n Image resolution: (2000, 1100)\n Using 2 LSBs, we can hide: 1650000 B\n Size of input file: 1566763 B\n File size tag: 3 B\n\n### Hiding Data\nThe following command will hide data in the input image and write the result to\nthe steganographed image, producing output similar to\n\n $ stegolsb steglsb -h -i input_image.png -s input_file.zip -o steg.png -n 2 -c 1\n Files read in 0.26s\n 1566763 bytes hidden in 0.31s\n Image overwritten in 0.27s\n\n### Recovering Data\nThe following command will recover data from the steganographed image and write\nthe result to the output file, producing output similar to\n\n $ stegolsb steglsb -r -i steg.png -o output_file.zip -n 2\n Files read in 0.30s\n 1566763 bytes recovered in 0.28s\n Output file written in 0.00s\n\n\n## StegDetect\nStegDetect provides one method for detecting simple steganography in images.\n\n### How to Use\nYou need Python 3 and Pillow, a fork of the Python Imaging Library (PIL).\n\nRun StegDetect with the following command line arguments:\n\n Command Line Arguments:\n -i, --input TEXT Path to an image\n -n, --lsb-count INTEGER How many LSBs to display [default: 2]\n --help Show this message and exit.\n\n### Showing the Least Significant Bits of an Image\nWe sum the least significant n bits of the RGB color channels for each pixel\nand normalize the result to the range 0-255. This value is then applied to each\ncolor channel for the pixel. Where n is the number of least significant bits to\nshow, the following command will save the resulting image, appending \"_nLSBs\"\nto the file name, and will produce output similar to the following:\n\n $ stegolsb stegdetect -i input_image.png -n 2\n Runtime: 0.63s", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ragibson/Steganography", "keywords": "stego lsb", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "stego-lsb", "package_url": "https://pypi.org/project/stego-lsb/", "platform": "", "project_url": "https://pypi.org/project/stego-lsb/", "project_urls": { "Homepage": "https://github.com/ragibson/Steganography" }, "release_url": "https://pypi.org/project/stego-lsb/1.2.1/", "requires_dist": null, "requires_python": ">=3.6", "summary": "stego lsb", "version": "1.2.1" }, "last_serial": 5497417, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "54701643f48680a725d61beea37860a0", "sha256": "945cdf10c0f8eda40600b14444db23313af5a665433b38651d34a957d23d4e81" }, "downloads": -1, "filename": "stego_lsb-1.1.tar.gz", "has_sig": false, "md5_digest": "54701643f48680a725d61beea37860a0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 11990, "upload_time": "2019-05-26T14:21:36", "url": "https://files.pythonhosted.org/packages/68/3d/7239ff5a6e993ea037f61b87ca00d64b02524f2641997ae71333f482c563/stego_lsb-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "bb2df01d41d79d14fc2ad89d93c512ee", "sha256": "b81b1ac2d9b5c3c88ffeee17e425ba23bb40fd0b126bc6dca3b17521701a8cb7" }, "downloads": -1, "filename": "stego_lsb-1.2-py3.6.egg", "has_sig": false, "md5_digest": "bb2df01d41d79d14fc2ad89d93c512ee", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": ">=3.6", "size": 22802, "upload_time": "2019-07-07T15:24:05", "url": "https://files.pythonhosted.org/packages/76/3a/15bd92161af07d37a5b94e03b995e53b8eccb62f23fc8b5f96b2f47696bb/stego_lsb-1.2-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "528f8538a2adec361922bcb968242067", "sha256": "e09a15dc6da3e2716c70e2fc8ec8ae9762472621f6c7b10231436c1b6e122912" }, "downloads": -1, "filename": "stego_lsb-1.2.tar.gz", "has_sig": false, "md5_digest": "528f8538a2adec361922bcb968242067", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12183, "upload_time": "2019-07-06T15:44:11", "url": "https://files.pythonhosted.org/packages/cc/56/0afa65d31f1f7b0849728dddc1829403afda80aa71943d38c5413cf6f397/stego_lsb-1.2.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "395f42cfb6572371b010ee43ee7d7ca7", "sha256": "b3580c01f25a74407150c457214310cb509ed5f19c69392c2bae13c8933be72a" }, "downloads": -1, "filename": "stego_lsb-1.2.1.tar.gz", "has_sig": false, "md5_digest": "395f42cfb6572371b010ee43ee7d7ca7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12293, "upload_time": "2019-07-07T15:24:04", "url": "https://files.pythonhosted.org/packages/e2/85/453f51da4c8ba5db9050e50aa64f6231a48f865a10841b0f11029324b920/stego_lsb-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "395f42cfb6572371b010ee43ee7d7ca7", "sha256": "b3580c01f25a74407150c457214310cb509ed5f19c69392c2bae13c8933be72a" }, "downloads": -1, "filename": "stego_lsb-1.2.1.tar.gz", "has_sig": false, "md5_digest": "395f42cfb6572371b010ee43ee7d7ca7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12293, "upload_time": "2019-07-07T15:24:04", "url": "https://files.pythonhosted.org/packages/e2/85/453f51da4c8ba5db9050e50aa64f6231a48f865a10841b0f11029324b920/stego_lsb-1.2.1.tar.gz" } ] }