{"id":25823285,"url":"https://github.com/adriank31/xor_encryption","last_synced_at":"2026-06-11T00:31:50.069Z","repository":{"id":275520650,"uuid":"926321737","full_name":"adriank31/XOR_Encryption","owner":"adriank31","description":"A simple XOR-based encryption program written in C that allows users to obfuscate (encrypt) and de-obfuscate (decrypt) messages using a password as a key","archived":false,"fork":false,"pushed_at":"2025-02-03T03:47:44.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T17:46:47.723Z","etag":null,"topics":["decryption","encryption","xor-cipher","xor-encryption"],"latest_commit_sha":null,"homepage":"","language":"C","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/adriank31.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}},"created_at":"2025-02-03T03:11:49.000Z","updated_at":"2025-02-16T23:42:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9491b49-0609-43dd-85a6-8f41bb00d6fc","html_url":"https://github.com/adriank31/XOR_Encryption","commit_stats":null,"previous_names":["adriank31/xor_encryption"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adriank31/XOR_Encryption","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriank31%2FXOR_Encryption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriank31%2FXOR_Encryption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriank31%2FXOR_Encryption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriank31%2FXOR_Encryption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adriank31","download_url":"https://codeload.github.com/adriank31/XOR_Encryption/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriank31%2FXOR_Encryption/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34177445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["decryption","encryption","xor-cipher","xor-encryption"],"created_at":"2025-02-28T11:50:53.761Z","updated_at":"2026-06-11T00:31:50.060Z","avatar_url":"https://github.com/adriank31.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"badges\"\u003e \u003ca href=\"https://www.linkedin.com/in/adrian-korwel-83226a300/\"\u003e \u003cimg src=\"https://img.shields.io/badge/LinkedIn-blue?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\" alt=\"LinkedIn Badge\"/\u003e \u003c/a\u003e \u003c/div\u003e\n\n\n# Overview\nThis is a simple XOR-based encryption program written in C that allows users to obfuscate (encrypt) and de-obfuscate (decrypt) messages using a password as a key. \n\u003cbr\u003e\nThe program demonstrates a rolling XOR cipher, where each character of the input message is XOR'd with a corresponding character of the user-provided password.\n\n# Features\nAccepts a password from the user (maximum 50 characters) as the encryption key.\n\u003cbr\u003e\nAccepts a message from the user (maximum 500 characters) to be encrypted.\n\u003cbr\u003e\nApplies XOR encryption to the message using the password.\n\u003cbr\u003e\nDisplays the message in HEX format before and after encryption for debugging purposes.\n\u003cbr\u003e\nDecrypts the message by applying the XOR function again, proving that XOR is reversible.\n\u003cbr\u003e\nEnsures safe input handling and prevents empty inputs.\n\n# How It Works\n\nThe user enters a password (up to 50 characters) that acts as the encryption key.\n\u003cbr\u003e\nThe user inputs a message (up to 500 characters) to be encrypted.\n\u003cbr\u003e\nThe program converts the original message into a HEX representation for debugging.\n\u003cbr\u003e\nThe program applies the XOR encryption (mangling) process and displays the obfuscated message.\n\u003cbr\u003e\nThe obfuscated message is converted to HEX output for debugging.\n\u003cbr\u003e\nThe program decrypts the message by applying XOR again, restoring the original message.\n\u003cbr\u003e\nThe decrypted message is displayed in HEX to confirm that encryption and decryption worked correctly.\n\n# Compilation and Execution\n\u003cbr\u003e\nCompile the Program and use GCC or any C compiler to compile the program:\n\u003cbr\u003e\n\u003cimg width=\"582\" alt=\"executionion\" src=\"https://github.com/user-attachments/assets/3f7d4c21-c675-45ff-b943-10e4f21c0670\" /\u003e\n\n\n\n\n\n# Run the Program\n\u003cimg width=\"579\" alt=\"executionion1\" src=\"https://github.com/user-attachments/assets/4d70324e-b37f-4138-9742-2567f51f0818\" /\u003e\n\n\n\u003cbr\u003e\n\n# Example Usage\n\u003cbr\u003e\nEnter your password (Limit is 50 characters): mysecretkey\n\u003cbr\u003e\nEnter your message: Hello, XOR Encryption!\n\n\u003cbr\u003e\n\u003cbr\u003e\nOriginal: Hello, XOR Encryption!\n\u003cbr\u003e\nOriginal Message in HEX output: 48 65 6C 6C 6F 2C 20 58 4F 52 20 45 6E 63 72 79 70 74 69 6F 6E 21\n\n\u003cbr\u003e\n\u003cbr\u003e\nMangling (Obfuscated): %∟▼      ♀^E,$7Y(↨►↨→☻◄↔♦♂X\n\u003cbr\u003e\nManging Obfuscated Message in HEX output: 1A 4F 23 56 0F 32 79 14 6D 51 2A 64 39 50 1E 48 5F 3C 26 12 7F\n\n\u003cbr\u003e\n\u003cbr\u003e\nDemangling (Original): Hello, XOR Encryption!\n\u003cbr\u003e\nDecrypted Message in HEX output: 48 65 6C 6C 6F 2C 20 58 4F 52 20 45 6E 63 72 79 70 74 69 6F 6E 21\n\n# Security Considerations\nThis program does not use cryptographic best practices. XOR encryption is not secure for sensitive data as it is vulnerable to frequency analysis and known-plaintext attacks.\n\u003cbr\u003e\nThe program does not use a cryptographic hash or key derivation function (KDF).\n\u003cbr\u003e\nIf the password is weak, brute-force attacks can easily reveal the original message.\n\u003cbr\u003e\nFor stronger encryption, consider using AES-256 or HMAC-SHA256 instead of XOR.\n\n# Possible Improvements\n\nUse a cryptographic hash (SHA-256) of the password to derive a strong key.\n\u003cbr\u003e\nIntroduce a salt to prevent predictable encryption.\n\u003cbr\u003e\nImplement AES-256 encryption instead of XOR.\n\u003cbr\u003e\nAdd Base64 encoding for readable encrypted messages.\n\n# License\n\nThis project is licensed under the MIT License. Feel free to use and modify the code for educational purposes.\n\n# Author\n\nCreated by Adrian Korwel. Feel free to contribute to this project by submitting pull requests!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadriank31%2Fxor_encryption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadriank31%2Fxor_encryption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadriank31%2Fxor_encryption/lists"}