{"id":26644960,"url":"https://github.com/mahmudnibir/hiddenmessage","last_synced_at":"2025-07-21T03:33:12.101Z","repository":{"id":284194517,"uuid":"953696060","full_name":"mahmudnibir/HiddenMessage","owner":"mahmudnibir","description":"⚕️ HiddenMessage is a Python script that uses LSB steganography to hide and extract secret text in images. It encrypts the message with AES before embedding, ensuring both privacy and invisibility.","archived":false,"fork":false,"pushed_at":"2025-04-04T15:56:23.000Z","size":352,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T10:47:22.220Z","etag":null,"topics":["data-hiding","digital-forensics","encoding","encryption","encryption-decryption","image-processing","lsb","message-hiding","password","pil","python","security","steganography"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mahmudnibir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-03-23T23:22:11.000Z","updated_at":"2025-04-04T15:56:26.000Z","dependencies_parsed_at":"2025-04-11T00:41:53.470Z","dependency_job_id":"a750ce84-e4b1-4476-9e59-b8c6200eb9fd","html_url":"https://github.com/mahmudnibir/HiddenMessage","commit_stats":null,"previous_names":["mahmudnibir/hiddenmessage"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mahmudnibir/HiddenMessage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmudnibir%2FHiddenMessage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmudnibir%2FHiddenMessage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmudnibir%2FHiddenMessage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmudnibir%2FHiddenMessage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahmudnibir","download_url":"https://codeload.github.com/mahmudnibir/HiddenMessage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmudnibir%2FHiddenMessage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266235438,"owners_count":23897180,"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":["data-hiding","digital-forensics","encoding","encryption","encryption-decryption","image-processing","lsb","message-hiding","password","pil","python","security","steganography"],"created_at":"2025-03-24T21:21:05.349Z","updated_at":"2025-07-21T03:33:12.064Z","avatar_url":"https://github.com/mahmudnibir.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Steganography (LSB Technique with AES Encryption)\n\n## 📄 Description\n\nThis project allows you to hide text within an image using the Least Significant Bit (LSB) method. It also integrates AES encryption to secure the text before embedding it inside the image. Here's the process:\n\n1. **Encryption**: The text is encrypted using AES with a password.\n2. **Conversion**: The encrypted text is then converted into binary form.\n3. **Embedding**: The binary data is embedded in the least significant bits of the RGB channels of the image.\n4. **Extraction**: The encrypted text is extracted from the image using the LSB method and decrypted with the password.\n\n## 🛠️ Dependencies\n\n- `cryptography`: AES encryption library. Install it using:\n  ```bash\n  pip install cryptography\n  ```\n- `Pillow`: Python Imaging Library (PIL) for working with images. Install it using:\n  ```bash\n  pip install pillow\n  ```\n\n## 🔑 Key Functions\n\n1. **generate_key(password)**: Generates a key from the provided password.\n2. **encrypt_text(text, password)**: Encrypts the given text using AES encryption.\n3. **decrypt_text(encrypted_text, password)**: Decrypts the encrypted text using the AES key generated from the password.\n4. **text_to_bin(text)**: Converts the input text into its binary representation.\n5. **bin_to_text(binary_data)**: Converts a binary string back to readable text.\n6. **hide_text_in_image(image_path, text, output_image_path, password)**: Hides the encrypted text within the image.\n7. **extract_text_from_image(image_path, password)**: Extracts and decrypts the hidden text from the image.\n\n## 🔒 Encryption and Steganography Workflow\n\n1. **Encrypt the text**: The input text is encrypted using the AES algorithm with a password.\n2. **Convert to binary**: The encrypted text is then converted into a binary form for LSB embedding.\n3. **Embed the binary data in an image**: The binary data is embedded into the image's least significant bits of the RGB color channels.\n4. **Extract the binary data**: The encrypted binary data is extracted using the same password.\n5. **Decrypt the binary data**: Finally, the encrypted text is decrypted back to its original form.\n\n## 🖼️ Example Usage\n\n```python\nimage_path = \"photo.jpg\"\ntext = \"just some initial text to hide in the image.\"\noutput_image_path = \"hidden_image.png\"\npassword = \"konopasswordlagena\"\n\n# Hide the text\nhide_text_in_image(image_path, text, output_image_path, password)\n\n# Extract the text\nextracted_text = extract_text_from_image(output_image_path, password)\nprint(\"Extracted Text:\", extracted_text)\n```\n\n## 📝 Output\n\n- The `hide_text_in_image()` function embeds the encrypted text into the image and saves it as `output_image_path`.\n- The `extract_text_from_image()` function retrieves and decrypts the hidden text from the image, provided the correct password.\n\n---\n\n## 📜 License\n\nThis project is open-source under the MIT License. Feel free to modify and distribute it as needed.\n\n---\n\n### 👤 Author: Nibir  \nGitHub: [NibirMahmud](https://www.github.com/mahmudnibir)  \nDate: 2025-03-24\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmudnibir%2Fhiddenmessage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahmudnibir%2Fhiddenmessage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmudnibir%2Fhiddenmessage/lists"}