{"id":23059285,"url":"https://github.com/nishnash54/twostepencryption","last_synced_at":"2025-08-15T07:30:53.712Z","repository":{"id":40961633,"uuid":"220437554","full_name":"nishnash54/TwoStepEncryption","owner":"nishnash54","description":"Applying Steganography followed by Visual Cryptography Encode and Decode data","archived":false,"fork":false,"pushed_at":"2022-11-22T09:47:34.000Z","size":3249,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-02-28T11:43:08.881Z","etag":null,"topics":["cryptography","python3","steganography","visual-cryptography"],"latest_commit_sha":null,"homepage":null,"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/nishnash54.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}},"created_at":"2019-11-08T09:55:06.000Z","updated_at":"2023-02-09T22:03:51.000Z","dependencies_parsed_at":"2022-09-21T08:03:01.790Z","dependency_job_id":null,"html_url":"https://github.com/nishnash54/TwoStepEncryption","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishnash54%2FTwoStepEncryption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishnash54%2FTwoStepEncryption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishnash54%2FTwoStepEncryption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishnash54%2FTwoStepEncryption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nishnash54","download_url":"https://codeload.github.com/nishnash54/TwoStepEncryption/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229898542,"owners_count":18141325,"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":["cryptography","python3","steganography","visual-cryptography"],"created_at":"2024-12-16T02:25:40.845Z","updated_at":"2024-12-16T02:25:41.337Z","avatar_url":"https://github.com/nishnash54.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Two Step Encryption\n### Introduction\nApplying Steganography followed by Visual Cryptography. Implementation based on the research paper titled **\"Combine use of Steganography and Visual  Cryptography for Secured Data hiding in Computer Forensics\"**\n\nSteganography is the method of hiding secret data inside any form of digital media. The main idea behind steganography is to hide the existence of a data in any medium like audio, video, image etc.\n\nVisual cryptography is a cryptographic technique which allows visual information (pictures, text, etc.) to be encrypted in such a way that the decrypted information appears as a visual image.\n\n### Architecture\n![image](https://i.imgur.com/nh0J1Sn.png)\n\n### Project\n##### Structure\n```\n.\n├── images\n├── main.py\n├── README.md\n├── Reference_paper.pdf\n├── requirements.txt\n└── src\n    ├── lsb_stegno.py\n    └── n_share.py\n```\n\n##### File description\n| File          | Description                                    |\n|---------------|-----------------------------------------------------------|\n| lsb_stegno.py | Methods to Encode and Decode data using LSB Steganography |\n| n_share.py    | Methods to Split and Compress LSB Encoded images          |\n\n### Algorithms\n##### Steganography\n###### Encoding data in image\n```python\n# Putting modified pixels in the new image\nnewimg.putpixel((x, y), pixel)\nif (x == w - 1):\n    x = 0\n    y += 1\nelse:\n    x += 1\n```\n\n###### Decoding data from image\n```python\n# string of binary data\nbinstr = ''\n\nfor i in pixels[:8]:\n    if (i % 2 == 0):\n        binstr += '0'\n    else:\n        binstr += '1'\n\ndata += chr(int(binstr, 2))\nif (pixels[-1] % 2 != 0):\n    return data\n```\n##### Visual Cryptography\n###### Generating shares\n```python\n# Split image based on random factor\nn = int(np.random.randint(data[i, j, k] + 1))\nimg1[i, j, k] = n\nimg2[i, j, k] = data[i, j, k] - n\n```\n\n###### Compressing shares\n```python\nimg[i, j, k] = img1[i, j, k] + img2[i, j, k]\n```\n\n##### Usage\n###### Setup\nInstall dependencies\n```\npip install -r requirements.txt\n```\nRun using python\n```\nstreamlit run main.py\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishnash54%2Ftwostepencryption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnishnash54%2Ftwostepencryption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishnash54%2Ftwostepencryption/lists"}