{"id":19428190,"url":"https://github.com/computationalcore/cryptosteganography","last_synced_at":"2025-04-12T22:27:05.852Z","repository":{"id":29115852,"uuid":"107892865","full_name":"computationalcore/cryptosteganography","owner":"computationalcore","description":"A python steganography module to store messages or files protected with AES-256 encryption inside an image.","archived":false,"fork":false,"pushed_at":"2025-03-06T03:48:32.000Z","size":212,"stargazers_count":121,"open_issues_count":1,"forks_count":24,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T01:06:07.628Z","etag":null,"topics":["aes-steganography","crypto","cryptography","data-protection","encryption","file-protector","files-protected","hide-data","hide-messages","physicists","puzzle","python","python-steganography","python3","steganography","steganography-algorithms","steganography-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/computationalcore.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2017-10-22T18:43:54.000Z","updated_at":"2025-01-30T04:02:12.000Z","dependencies_parsed_at":"2025-01-15T09:26:17.911Z","dependency_job_id":"c038aecc-0573-46fd-a4f9-a2dfa4353e97","html_url":"https://github.com/computationalcore/cryptosteganography","commit_stats":{"total_commits":35,"total_committers":3,"mean_commits":"11.666666666666666","dds":"0.19999999999999996","last_synced_commit":"51b401f4d68de8625bcb5dd0d414336b3bdbc9e9"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computationalcore%2Fcryptosteganography","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computationalcore%2Fcryptosteganography/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computationalcore%2Fcryptosteganography/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/computationalcore%2Fcryptosteganography/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/computationalcore","download_url":"https://codeload.github.com/computationalcore/cryptosteganography/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247107764,"owners_count":20884790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aes-steganography","crypto","cryptography","data-protection","encryption","file-protector","files-protected","hide-data","hide-messages","physicists","puzzle","python","python-steganography","python3","steganography","steganography-algorithms","steganography-library"],"created_at":"2024-11-10T14:14:21.622Z","updated_at":"2025-04-04T02:05:01.401Z","avatar_url":"https://github.com/computationalcore.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cryptosteganography\n===================\n\n.. image:: https://github.com/computationalcore/cryptosteganography/actions/workflows/build.yml/badge.svg?branch=main\n   :target: https://github.com/computationalcore/cryptosteganography/actions/workflows/build.yml\n\n.. image:: https://codecov.io/github/computationalcore/cryptosteganography/coverage.svg?branch=main\n   :target: https://codecov.io/gh/computationalcore/cryptosteganography\n\n.. image:: https://api.codeclimate.com/v1/badges/1f8d04f4badc720d0eda/maintainability\n   :target: https://codeclimate.com/github/computationalcore/cryptosteganography/maintainability\n\n.. image:: https://img.shields.io/pypi/v/cryptosteganography.svg\n   :target: https://pypi.python.org/pypi/cryptosteganography\n   :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/status/cryptosteganography.svg\n   :target: https://pypi.python.org/pypi/cryptosteganography\n   :alt: Development Status\n\n.. image:: https://img.shields.io/pypi/pyversions/cryptosteganography.svg\n   :target: https://pypi.python.org/pypi/cryptosteganography\n   :alt: Python Versions\n\nA Python steganography module to store messages or files protected with AES-256 encryption inside an image.\n\nSteganography is the art of concealing information within different types of media objects such as images or audio files, in such a way that no one, apart from the sender and intended recipient, suspects the existence of the message.\n\nBy default, steganography is a type of security through obscurity. \n\nAdditionally, this module also enhances the security of the steganography through data encryption. The data concealed is encrypted using AES-256 encryption, a popular algorithm used in symmetric key cryptography.\n\nPrerequisites\n-------------\n\n`Python 3+ \u003chttps://www.python.org/downloads\u003e`_\n`pip3 \u003chttps://pip.pypa.io/en/stable\u003e`_ (Most Linux systems come with Python 3 installed by default).\n\nDependencies Installation (Ubuntu)\n----------------------------------\n\n.. code:: bash\n\n   $ sudo apt-get install python3-pip\n\nDependencies Installation (MacOS)\n---------------------------------\n\nTo install Python3, I recommend using the Homebrew package manager. The script will explain what changes it will make and prompt you before the installation begins.\n\n.. code:: bash\n\n   $ ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n\nEdit your `~/.profile` to include (if it is not already there):\n\n.. code:: bash\n\n    export PATH=/usr/local/bin:/usr/local/sbin:$PATH\n\nTo install Python 3:\n\n.. code:: bash\n\n   $ brew install python3\n\nInstallation\n------------\n\nTo install the package, just run:\n\n.. code:: bash\n\n   $ pip3 install cryptosteganography\n\nUsage\n-----\n\nUse as a library in a Python program\n''''''''''''''''''''''''''''''''''''\n\n**Store a message string inside an image**\n\n.. code:: python\n\n   from cryptosteganography import CryptoSteganography\n\n   crypto_steganography = CryptoSteganography('My secret password key')\n   # Save the encrypted file inside the image\n   crypto_steganography.hide('input_image_name.jpg', 'output_image_file.png', 'My secret message')\n\n   secret = crypto_steganography.retrieve('output_image_file.png')\n   print(secret)  # My secret message\n\n**Store a binary file inside an image**\n\nNote: This only works if the concealed file size is smaller than the input image.\n\n.. code:: python\n\n   from cryptosteganography import CryptoSteganography\n\n   message = None\n   with open('sample.mp3', \"rb\") as f:\n       message = f.read()\n\n   crypto_steganography = CryptoSteganography('My secret password key')\n   # Save the encrypted file inside the image\n   crypto_steganography.hide('input_image_name.jpg', 'output_image_file.png', message)\n\n   # Retrieve the file (the previous crypto_steganography instance could be used but I instantiate a brand new object\n   # with the same password key just to demonstrate that it can be used to decrypt)\n   crypto_steganography = CryptoSteganography('My secret password key')\n\n   decrypted_bin = crypto_steganography.retrieve('output_image_file.png')\n   # Save the data to a new file\n   with open('decrypted_sample.mp3', 'wb') as f:\n       f.write(secret_bin)\n\nUse as a Python program\n'''''''''''''''''''''''\n\n**Check help at the command line prompt to learn how to use it.**\n\n.. code:: bash\n\n   $ cryptosteganography -h\n\n    usage: cryptosteganography [-h] {save,retrieve} ...\n           A python steganography script that save/retrieve a text/file (AES 256 encrypted) inside an image.\n\n    positional arguments:\n      {save,retrieve}        sub-command help\n        save                save help\n        retrieve            retrieve help\n\n    optional arguments:\n      -h, --help            show this help message and exit\n\n**Save sub command help**\n\n.. code:: bash\n\n   $ cryptosteganography save -h\n\n    usage: cryptosteganography save [-h] -i INPUT_IMAGE_FILE (-m MESSAGE | -f MESSAGE_FILE) -o OUTPUT_IMAGE_FILE\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -i INPUT_IMAGE_FILE, --input INPUT_IMAGE_FILE\n                            Input image file.\n      -m MESSAGE, --message MESSAGE\n                            Your secret message to hide (non-binary).\n      -f MESSAGE_FILE, --file MESSAGE_FILE\n                            Your secret to hide (Text or any binary file).\n      -o OUTPUT_IMAGE_FILE, --output OUTPUT_IMAGE_FILE\n                            Output image containing the secret.\n\n**Retrieve sub command help**\n\n.. code:: bash\n\n   $ cryptosteganography retrieve -h\n\n    usage: cryptosteganography retrieve [-h] -i INPUT_IMAGE_FILE [-o RETRIEVED_FILE]\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -i INPUT_IMAGE_FILE, --input INPUT_IMAGE_FILE\n                            Input image file.\n      -o RETRIEVED_FILE, --output RETRIEVED_FILE\n                            Output for the binary secret file (Text or any binary file).\n\n**Save message example**\n\n.. code:: bash\n\n   $ cryptosteganography save -i 4824157.png -m \"My secret message...\" -o output.png\n   Enter the key password:\n   Output image output.png saved with success\n\n**Retrieve message example**\n\n.. code:: bash\n\n   $ cryptosteganography retrieve -i output.png\n   Enter the key password:\n   My secret message...\n\n**Save file example**\n\n.. code:: bash\n\n   $ cryptosteganography save -i input_image_name.jpg -f duck_logo.pem -o output_file.png\n   Enter the key password:\n   Output image output_file.png saved with success\n\n**Retrieve file example**\n\n.. code:: bash\n\n   $ cryptosteganography retrieve -i output.png -o decrypted_file\n   Enter the key password:\n   decrypted_file saved with success\n\nLicense\n-------\n\nThis project is licensed under the MIT License - see the `LICENSE \u003chttps://github.com/computationalcore/cryptosteganography/blob/main/LICENSE\u003e`_ file for details.\n\nAuthors\n-------\n\nVin Busquet `GitHub \u003chttps://github.com/computationalcore\u003e`_\n\nLimitations\n-----------\n\n- Only works with Python 3.\n- It does not work if the concealed file is greater than the original input file.\n- Output image is limited to PNG format only.\n- I did not test with all concealed file types. Feel free to `report \u003chttps://github.com/computationalcore/cryptosteganography/issues\u003e`_ any bug you find.\n\nContributing\n------------\n\nFor details, check out `CONTRIBUTING.md \u003chttps://github.com/computationalcore/cryptosteganography/blob/main/CONTRIBUTING.md\u003e`_.\n\nChangelog\n---------\n\nFor details, check out `CHANGELOG.md \u003chttps://github.com/computationalcore/cryptosteganography/blob/main/CHANGELOG.md\u003e`_.\n\nAcknowledgments\n---------------\n\n- `PyCryptodome \u003chttps://github.com/Legrandin/pycryptodome\u003e`_\n- `Stéganô \u003chttps://github.com/cedricbonhomme/Stegano\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomputationalcore%2Fcryptosteganography","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomputationalcore%2Fcryptosteganography","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomputationalcore%2Fcryptosteganography/lists"}