{"id":25135440,"url":"https://github.com/clats97/clatsecret","last_synced_at":"2025-04-03T02:26:38.822Z","repository":{"id":275655263,"uuid":"926765871","full_name":"Clats97/ClatSecret","owner":"Clats97","description":"A user-friendly, simple Python GUI tool using AES-256-bit in CBC mode to securely encrypt and decrypt text. You can generate, load, and copy encryption keys for safe communication.","archived":false,"fork":false,"pushed_at":"2025-02-03T20:43:12.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T21:31:59.212Z","etag":null,"topics":["aes","aes-256","aes-cbc","aes-cbc-256","aes-cbc-encryption","aes-cbc-pkcs7","aes-encryption","encryption","encryption-algorithms","encryption-decryption","security","trending","trending-repositories"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Clats97.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":"2025-02-03T20:24:33.000Z","updated_at":"2025-02-03T21:13:40.000Z","dependencies_parsed_at":"2025-02-03T21:42:52.201Z","dependency_job_id":null,"html_url":"https://github.com/Clats97/ClatSecret","commit_stats":null,"previous_names":["clats97/clatsecret"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatSecret","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatSecret/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatSecret/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatSecret/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Clats97","download_url":"https://codeload.github.com/Clats97/ClatSecret/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246923974,"owners_count":20855648,"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","aes-256","aes-cbc","aes-cbc-256","aes-cbc-encryption","aes-cbc-pkcs7","aes-encryption","encryption","encryption-algorithms","encryption-decryption","security","trending","trending-repositories"],"created_at":"2025-02-08T16:32:51.945Z","updated_at":"2025-04-03T02:26:38.813Z","avatar_url":"https://github.com/Clats97.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ClatSecret\n\n**Overview**\n\nClatSecret Encryptext Tool v1.00 is a Python-based graphical user interface (GUI) application designed for secure text encryption and decryption using the AES-256 encryption algorithm in CBC (Cipher Block Chaining) mode. Built with Python’s tkinter library for the interface and PyCryptodome for cryptographic operations, the tool is ideal for users who require a simple yet effective means to protect textual data.\n\n\n![clatsecret](https://github.com/user-attachments/assets/09e9833c-c372-45ed-8c76-53a04fbc2eb6)\n\n________________________________________\n\n**Features**\n\t**Key Management**\n- Load Existing Key: Enter a 64-character hexadecimal string (representing a 32-byte key) and load it for encryption or decryption.\n-\tGenerate New Key: Create a new random AES-256 key, which is displayed in the GUI.\n-\tCopy Key: Copy the generated key to your clipboard for easy use elsewhere.\n\n\t**Encryption:**\n-\tPlaintext Input: Enter any text you wish to encrypt.\n-\tRandom IV Generation: Each encryption session automatically generates a unique initialization vector (IV) to ensure security.\n-\tAES-256 Encryption in CBC Mode: Uses AES with proper PKCS7 padding for secure encryption.\n-\tBase64 Encoding: The IV and ciphertext are combined and encoded in Base64, making it easy to store or transfer.\n-\tCopy Ciphertext: Copy the resulting Base64 ciphertext to the clipboard with a single click.\n\n \t**Decryption:**\n-\tPaste Functionality: Easily paste both the AES-256 key and the Base64-encoded ciphertext from your clipboard.\n-\tText Decryption: Decodes the Base64 string, separates the IV and ciphertext, and then decrypts the ciphertext to recover the original plaintext.\n-\tError Handling: Provides clear error messages for invalid inputs, such as incorrect key formats or ciphertext errors.\n\n \t**User Interface Enhancements:**\n-\tASCII Branding: Displays original and additional ASCII art branding at the top of the window.\n-\tInformative Labels and Frames: The interface is divided into clearly defined sections for key management, encryption, and decryption.\n-\tClipboard Integration: Simplifies copying and pasting keys and ciphertext to streamline the user experience.\n________________________________________\n**Prerequisites**\nBefore running the tool, ensure you have the following installed:\n•\tPython 3.x: You can download it from python.org.\n•\tPyCryptodome: Install via pip: \npip install pycryptodome\n•\ttkinter: This is included with most standard Python installations. (If not, refer to your operating system’s documentation for installation instructions.)\n\n________________________________________\n\n**Installation and Setup**\n1.\tDownload or Clone the Repository:\n2.  Install Required Dependencies:\npip install pycryptodome\n3.\tRun the Application:\n\n________________________________________\n**How It Works**\n\n**Key Management**\n•\t**Loading a Key:**\nEnter a 64-character hexadecimal string into the “Load Key” field and click Load Key. The script converts the hex string to bytes and validates that it is exactly 32 bytes long.\n•\t**Generating a Key:**\nClick Generate Key to create a new random 256-bit key. The key is displayed (in uppercase hex) and stored for use during encryption.\n•\t**Copying a Key:**\nIf you want to reuse the generated key elsewhere, click Copy Key to copy it to your clipboard.\n\n**Encryption Process**\n\n1.\t**Plaintext Input:**\nIn the Encryption section, type the text you want to encrypt into the provided field.\n\n2.\t**Encryption Execution:**\nWhen you click Encrypt:\n-\tA random 16-byte IV (Initialization Vector) is generated.\n-\tThe plaintext is padded (using PKCS7 padding) and encrypted using AES in CBC mode.\n-\tThe IV is concatenated with the ciphertext.\n-\tThe combined data is then Base64 encoded and displayed in the ciphertext field.\n\n3.\t**Copying the Ciphertext:**\nClick Copy Ciphertext to copy the encrypted, Base64-encoded text to your clipboard.\n\n**Decryption Process**\n\n4.\t**Input the AES Key and Ciphertext:**\nIn the Decryption section:\n-\tPaste or enter the AES key (hex format) into the key field.\n-\tPaste or enter the Base64 encoded ciphertext into the ciphertext field.\n-\t\n5.\t**Decryption Execution:**\n**Click Decrypt to:**\nDecode the Base64 ciphertext.\n-\tExtract the first 16 bytes as the IV and the remainder as the actual ciphertext.\n-\tDecrypt the ciphertext using the provided key and IV.\n-\tUnpad the resulting plaintext and display it.\n-\t\n6.\t**Error Handling:**\nIf there are issues with the key format or ciphertext, or if decryption fails, appropriate error messages are shown.\n\n________________________________________\n\n**Code Structure**\n\n•\tAesEncryptionGUI Class:\n\nThe class encapsulates all GUI elements and functionalities:\n- Constructor (__init__): Sets up the main window, ASCII branding, and organizes the interface into frames for key management, encryption, and decryption.\n-\tKey Management Methods: \n\tload_key()\n\tgenerate_key()\n\tcopy_generated_key()\n-\tEncryption Methods: \n\tencrypt_text()\n\tcopy_ciphertext()\n-\tDecryption Methods: \n\tpaste_key()\n\tpaste_ciphertext()\n  decrypt_text()\n-\tUtility Method: \n\texit_program()\n•\tMain Function:\nInitializes the Tkinter root window and starts the event loop.\n\n________________________________________\n\n**Troubleshooting and Tips**\n•\tKey Format Errors:\nEnsure that any AES key entered is exactly 64 hexadecimal characters (32 bytes).\n•\tClipboard Issues:\nIf you encounter errors while copying or pasting, verify your system’s clipboard is accessible and that you have appropriate permissions.\n•\tEncryption/Decryption Mismatch:\nAlways use the same key for both encryption and decryption. Double-check that the correct Base64 ciphertext is being used.\n•\tDependency Verification:\nConfirm that all necessary libraries (tkinter and pycryptodome) are properly installed.\n\nCopyright 2025 Joshua M Clatney (Clats97) All Rights Reserved\n\n**DISCLAIMER: This project comes with no warranty, express or implied. The author is not responsible for abuse, misuse, or vulnerabilities. Please use responsibly and ethically in accordance with relevant laws, regulations, legislation and best practices.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclats97%2Fclatsecret","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclats97%2Fclatsecret","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclats97%2Fclatsecret/lists"}