{"id":25931062,"url":"https://github.com/markkreel/filelock","last_synced_at":"2025-03-03T23:57:20.276Z","repository":{"id":279260525,"uuid":"938231021","full_name":"Markkreel/FileLock","owner":"Markkreel","description":"FileLock is a Python CLI tool that encrypts files with AES-256 and verifies integrity using SHA-256, offering a simple, secure way to protect sensitive data. ","archived":false,"fork":false,"pushed_at":"2025-02-24T17:21:49.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T17:32:42.941Z","etag":null,"topics":["aes-256","cli","cli-utility","decryption","encryption","hash","pbkdf2","pep8","portfolio","pycryptodome","python","salt","sha256"],"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/Markkreel.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-24T16:17:49.000Z","updated_at":"2025-02-24T17:25:18.000Z","dependencies_parsed_at":"2025-02-24T17:32:46.228Z","dependency_job_id":"53e21a0c-0dc1-40ca-9a1b-081baf344fe0","html_url":"https://github.com/Markkreel/FileLock","commit_stats":null,"previous_names":["markkreel/filelock"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Markkreel%2FFileLock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Markkreel%2FFileLock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Markkreel%2FFileLock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Markkreel%2FFileLock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Markkreel","download_url":"https://codeload.github.com/Markkreel/FileLock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241758971,"owners_count":20015247,"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-256","cli","cli-utility","decryption","encryption","hash","pbkdf2","pep8","portfolio","pycryptodome","python","salt","sha256"],"created_at":"2025-03-03T23:57:19.874Z","updated_at":"2025-03-03T23:57:20.268Z","avatar_url":"https://github.com/Markkreel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FileLock\n\nFileLock is a command-line tool for securely encrypting and decrypting files using AES-256 encryption and SHA-256 integrity verification. Built with Python, it’s a lightweight, open-source utility designed to protect sensitive data with a password.\n\n![1740416788661](image/README/1740416788661.png)\n\n## Purpose\n\nIn a world where data security is critical, FileLock provides a lightweight, open-source solution to encrypt files with a password of your choice. Whether it’s a personal document or a configuration file, FileLock ensures your data stays confidential using industry-standard cryptography.\n\n## Features\n\n- Encryption: Encrypt files with AES-256 in CBC mode, using a password-derived key via PBKDF2.\n- Decryption: Restore encrypted files to their original state with the correct password.\n- Integrity Verification: Uses SHA-256 hashing to detect tampering or corruption.\n- CLI Interface: Easy-to-use command-line interface with clear arguments and error handling.\n- Cross-Platform: Works on Windows, Linux, and macOS with minimal setup.\n\n## Installation\n\n**FileLock** requires Python 3.9+ and one external library. Here’s how to set it up:\n\nClone the repository:\n\n```bash\ngit clone https://github.com/yourusername/filelock.git\ncd filelock\n```\n\nInstall dependencies:\n\n```bash\npip install pycryptodome\n```\n\nRun the tool:\n\n- On **Unix-like systems (Linux/macOS)**: `./filelock.py`\n- On **Windows** or others: `python filelock.py`\n\n## Usage\n\nFileLock currently supports encrypting files. Here’s how to use it:\n\n### Encrypt a File\n\nEncrypt a file with a password:\n\n```bash\npython filelock.py encrypt \u003cfile\u003e --password \"\u003cyour_password\u003e\"\n```\n\nThe encrypted file **(**`\u003cfile\u003e.flk`) contains the salt, initialization vector (IV), and encrypted data.\n\n### Decrypt a File\n\nDecrypt an encrypted file with the original password:\n\n```bash\npython filelock.py decrypt \u003cfile\u003e --password \"\u003cyour_password\u003e\"\n```\n\n### Error Handling\n\n- File not found\n- Wrong password\n- Tampered file\n\n## Help\n\n```bash\npython filelock.py --help\n```\n\n## Design Decisions\n\n- AES-256 CBC: Industry-standard encryption with CBC mode for block-level security, paired with a random IV to ensure uniqueness.\n- PBKDF2 Key Derivation: Turns your password into a secure 32-byte key with 100,000 iterations and a 16-byte salt, resisting brute-force attacks.\n- SHA-256 Integrity: Hashes the original file during encryption and verifies it on decryption, catching tampering or corruption.\n- File Format: Encrypted output (`\u003cfile\u003e.flk`) bundles salt (16 bytes), IV (16 bytes), hash (32 bytes), and encrypted data into one portable file.\n- PEP 8 Compliance: Code follows Python’s style guide for readability and professionalism.\n\n## Contrubuting\n\nThis is a personal project for my portfolio, but feel free to fork it and experiment! Suggestions are welcome—open an issue if you spot something to improve.\n\n## Acknowledgements\n\nBuilt as a showcase for skills in cybersecurity, system design, and Python development.\n\n**Last Updated:** 27-02-2025 ⸺ **Last Reviewed:** 27-02-2025\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkkreel%2Ffilelock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkkreel%2Ffilelock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkkreel%2Ffilelock/lists"}