{"id":24903752,"url":"https://github.com/stanleystanmarsh/picture-cipher","last_synced_at":"2025-03-27T20:18:21.784Z","repository":{"id":263677332,"uuid":"891142976","full_name":"StanleyStanMarsh/picture-cipher","owner":"StanleyStanMarsh","description":"The program for insertion encoded text into bmp picture","archived":false,"fork":false,"pushed_at":"2024-11-27T22:46:43.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T22:31:44.021Z","etag":null,"topics":["bmp","cipher-algorithms","haskell"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StanleyStanMarsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2024-11-19T19:59:46.000Z","updated_at":"2025-01-24T00:42:13.000Z","dependencies_parsed_at":"2024-11-19T21:23:47.449Z","dependency_job_id":"2c49a24e-58bd-47d3-b41b-2a35bb56b2a0","html_url":"https://github.com/StanleyStanMarsh/picture-cipher","commit_stats":null,"previous_names":["stanleystanmarsh/picture-cipher"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanleyStanMarsh%2Fpicture-cipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanleyStanMarsh%2Fpicture-cipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanleyStanMarsh%2Fpicture-cipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StanleyStanMarsh%2Fpicture-cipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StanleyStanMarsh","download_url":"https://codeload.github.com/StanleyStanMarsh/picture-cipher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245916742,"owners_count":20693400,"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":["bmp","cipher-algorithms","haskell"],"created_at":"2025-02-01T22:30:54.599Z","updated_at":"2025-03-27T20:18:21.771Z","avatar_url":"https://github.com/StanleyStanMarsh.png","language":"Haskell","readme":"# picture-cipher (EN)\n\nThis project is an implementation of the `Lib.hs` library, which includes functions for encrypting text using the Caesar Cipher method and subsequently hiding the encrypted text within a 24-bit .bmp image.\n\n## Key Features\n\n- **Text Encryption**: The user inputs a shift value for the Caesar Cipher method, after which the text from a specified .txt file is encrypted.\n- **Steganography**: The encrypted text is embedded into a .bmp image. The encryption key is saved in the image file's name.\n- **Decryption**: The image with the embedded text can be decoded back into a text file using the key extracted from the file name.\n\n## Installation and Execution\n\nTo run the project, you will need a Haskell compiler (e.g., GHC) and the `stack` build tool.\n\n### Compilation and Execution\n\n1. Open a terminal and navigate to the project directory.\n2. Compile the program using the command:\n```bash\n   stack build\n```\n3. Run the application:\n```bash\n   stack exec picture-cipher-exe\n```\n\n### Using the Program\n\nAfter launching, the program will prompt you to choose a mode of operation:\n- Encrypt and embed text into an image.\n- Decrypt text from an image.\n\nUser will be prompted to enter the necessary parameters (shift value for encryption, path to the source text file, path to the image, etc.).\n\nDepending on the number of encoded (last) bits in each byte of the image, the following results are obtained (Fig. 1-8).\n\n![1](https://github.com/user-attachments/assets/d01dcd0a-6eca-4465-8889-15ff67a41758 \"Fig. 1\")\n![2](https://github.com/user-attachments/assets/a98a0c43-7d9e-41c1-94cb-97b0f820e71c \"Fig. 2\")\n![3](https://github.com/user-attachments/assets/ab429391-0dda-405c-bff0-bfbae3682078 \"Fig. 3\")\n![4](https://github.com/user-attachments/assets/5575c24b-9ff3-40bb-9409-23c82c646ce1 \"Fig. 4\")\n![5](https://github.com/user-attachments/assets/c387dfe5-41e8-4685-bca0-e68dd3699e57 \"Fig. 5\")\n![6](https://github.com/user-attachments/assets/d560b02a-fa57-4848-a98a-5b73bb3923c2 \"Fig. 6\")\n![7](https://github.com/user-attachments/assets/78b0c954-2454-4905-bc7c-9fb8af5aa67e \"Fig. 7\")\n![8](https://github.com/user-attachments/assets/27bb0da1-7c50-4e65-ad1f-f56a257a7710 \"Fig. 8\")\n\n## Project Structure\n\n- `Lib.hs`: A library of pure functions for text encryption/decryption and steganography.\n- `Main.hs`: The main module that manages user interaction and calls the corresponding functions from `Lib.hs`.\n- `sample.txt`: An example input text file.\n- `sample.bmp`: An example image for embedding text.\n\n## License\n\nThis project is distributed under the MIT License. You are free to use, modify, and distribute the code according to the terms of this license.\n\n# picture-cipher (RU)\n\nЭтот проект представляет собой реализацию библиотеки Lib.hs, которая включает функции для шифрования текста методом Шифра Цезаря и последующего сокрытия зашифрованного текста внутри изображения формата .bmp (24-разрядный).\n\n## Основные возможности\n\n- Шифрование текста: Пользователь вводит смещение для метода Шифра Цезаря, после чего текст из указанного файла .txt шифруется.\n- Стеганография: Зашифрованный текст внедряется в изображение .bmp. Ключ к шифру сохраняется в имени файла изображения.\n- Расшифровка: Изображение с внедренным текстом может быть декодировано обратно в текстовый файл при помощи ключа, извлеченного из имени файла.\n\n## Установка и запуск\n\nДля запуска проекта вам потребуется Haskell-компилятор (например, GHC) и программа сборки stack.\n\n### Компиляция и выполнение\n\n1. Откройте терминал и перейдите в директорию проекта.\n2. Скомпилируйте программу командой:\n```bash\n   stack build\n```\n3. Запустите полученное исполняемое приложение:\n```bash\n   stack exec picture-cipher-exe\n```\n\n### Использование программы\n\nПосле запуска программа предложит вам выбрать режим работы:\n- Шифрование и внедрение текста в изображение.\n- Расшифровка текста из изображения.\n\nПользователю будет предложено ввести необходимые параметры (смещение для шифрования, путь к исходному текстовому файлу, путь к изображению и т.п.).\n\nВ зависимости от количества кодируемых (последних) битов в каждом байте изображения получаются следующие результаты (Рис. 1-8).\n\n![1](https://github.com/user-attachments/assets/d01dcd0a-6eca-4465-8889-15ff67a41758 \"Рис. 1\")\n![2](https://github.com/user-attachments/assets/a98a0c43-7d9e-41c1-94cb-97b0f820e71c \"Рис. 2\")\n![3](https://github.com/user-attachments/assets/ab429391-0dda-405c-bff0-bfbae3682078 \"Рис. 3\")\n![4](https://github.com/user-attachments/assets/5575c24b-9ff3-40bb-9409-23c82c646ce1 \"Рис. 4\")\n![5](https://github.com/user-attachments/assets/c387dfe5-41e8-4685-bca0-e68dd3699e57 \"Рис. 5\")\n![6](https://github.com/user-attachments/assets/d560b02a-fa57-4848-a98a-5b73bb3923c2 \"Рис. 6\")\n![7](https://github.com/user-attachments/assets/78b0c954-2454-4905-bc7c-9fb8af5aa67e \"Рис. 7\")\n![8](https://github.com/user-attachments/assets/27bb0da1-7c50-4e65-ad1f-f56a257a7710 \"Рис. 8\")\n\n## Структура проекта\n\n- Lib.hs: Библиотека чистых функций для шифрования/дешифрования текста и работы со стеганографией.\n- Main.hs: Основной модуль, который управляет взаимодействием с пользователем и вызывает соответствующие функции из Lib.hs.\n- sample.txt: Пример входного текстового файла.\n- sample.bmp: Пример изображения для внедрения текста.\n\n## Лицензия\n\nЭтот проект распространяется под лицензией MIT. Вы можете использовать, изменять и распространять код согласно условиям этой лицензии.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstanleystanmarsh%2Fpicture-cipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstanleystanmarsh%2Fpicture-cipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstanleystanmarsh%2Fpicture-cipher/lists"}