{"id":44018304,"url":"https://github.com/ankit-chaubey/ciph","last_synced_at":"2026-02-07T16:03:37.253Z","repository":{"id":335592258,"uuid":"1146318722","full_name":"ankit-chaubey/ciph","owner":"ankit-chaubey","description":"Fast, streaming file encryption for large media files and cloud uploads using modern cryptography.","archived":false,"fork":false,"pushed_at":"2026-01-31T03:21:50.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-31T18:36:48.918Z","etag":null,"topics":["aes","chacha20","cloud-security","cryptography","encryption-decryption","file-encryption"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/ciph/","language":"C","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/ankit-chaubey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-30T23:02:55.000Z","updated_at":"2026-01-31T03:21:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ankit-chaubey/ciph","commit_stats":null,"previous_names":["ankit-chaubey/ciph"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ankit-chaubey/ciph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankit-chaubey%2Fciph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankit-chaubey%2Fciph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankit-chaubey%2Fciph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankit-chaubey%2Fciph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankit-chaubey","download_url":"https://codeload.github.com/ankit-chaubey/ciph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankit-chaubey%2Fciph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29199519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T14:35:27.868Z","status":"ssl_error","status_checked_at":"2026-02-07T14:25:51.081Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aes","chacha20","cloud-security","cryptography","encryption-decryption","file-encryption"],"created_at":"2026-02-07T16:03:36.582Z","updated_at":"2026-02-07T16:03:37.248Z","avatar_url":"https://github.com/ankit-chaubey.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ciph\n\n[![PyPI](https://img.shields.io/pypi/v/ciph.svg)](https://pypi.org/project/ciph/)\n[![Downloads](https://img.shields.io/pypi/dm/ciph.svg)](https://pypi.org/project/ciph/)\n[![Python](https://img.shields.io/pypi/pyversions/ciph.svg)](https://pypi.org/project/ciph/)\n[![CI](https://github.com/ankit-chaubey/ciph/actions/workflows/ciph-test.yml/badge.svg)](https://github.com/ankit-chaubey/ciph/actions/workflows/ciph-test.yml)\n[![License](https://img.shields.io/github/license/ankit-chaubey/ciph)](https://github.com/ankit-chaubey/ciph/blob/main/LICENSE)\n[![Release](https://img.shields.io/github/v/tag/ankit-chaubey/ciph?label=release)](https://github.com/ankit-chaubey/ciph/releases)\n[![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20Termux-blue)](#)\n[![Crypto](https://img.shields.io/badge/crypto-AES--256--GCM%20%7C%20ChaCha20--Poly1305-blue)](#)\n\n**ciph** is a fast, streaming file‑encryption tool built for **large media files** and **cloud uploads**. It uses modern, industry‑standard cryptography and is designed to safely encrypt files **larger than your system RAM**.\n\n\u003e Encrypt locally. Upload anywhere. Decrypt only when you trust the environment.\n\n---\n\n## ❓ Why ciph?\n\nMost encryption tools load the entire file into memory before encrypting it. **ciph streams data in fixed-size chunks**, which means you can encrypt a **50 GB 4K video on a machine with only 2 GB of RAM**—smoothly and safely.\n\n## ✨ Features\n\n* 🔐 **Strong encryption** — AES‑256‑GCM or ChaCha20‑Poly1305\n* 🔑 **Password protection** — Argon2id (memory‑hard key derivation)\n* 🚀 **High performance** — streaming C core (1 MB chunks)\n* 🧠 **Constant memory usage** — works with 10 GB+ files\n* ⚙️ **Hardware‑aware** — AES‑NI when available, ChaCha fallback\n* 🧪 **Integrity protected** — AEAD authentication on every chunk\n* ☁️ **Cloud / Telegram safe** — encrypt before upload\n* 🏷️ **Filename preserved** — original filename \u0026 extension are stored and restored on decryption\n\n---\n\n## 🔐 Cryptographic Design\n\n`ciph` uses a **hybrid (envelope) encryption model**, similar to what is used in modern secure storage systems:\n\n1. A random **data key** encrypts the file in streaming mode.\n2. Your password is hardened using **Argon2id**.\n3. The data key is encrypted using the derived password key.\n4. Every chunk is authenticated to detect tampering.\n\nNo custom crypto. No weak primitives.\n\n5. The **original filename (without path)** is stored as encrypted metadata and automatically restored on decryption.\n\n---\n\n## 🔒 Security Strength\n\n| Component                  | Algorithm                                | Strength     |\n| -------------------------- | ---------------------------------------- | ------------ |\n| File encryption            | AES‑256‑GCM                              | 256‑bit      |\n| File encryption (fallback) | ChaCha20‑Poly1305                        | 256‑bit      |\n| Password KDF               | Argon2id                                 | Memory‑hard  |\n| Integrity                  | AEAD                                     | Tamper‑proof |\n| Nonces                     | Key-derived per chunk (unique, no reuse) | No reuse     |\n\n### What this means\n\n* Brute‑force attacks are **computationally infeasible**\n* File corruption or tampering is **always detected**\n* Encrypted files are safe on **any cloud platform**\n* Losing the password means **data is unrecoverable**\n\n---\n\n## 🚀 Quick Start (Build from Source)\n\n```bash\ngit clone https://github.com/ankit-chaubey/ciph\ncd ciph\nmake\npip install .\n```\n\n## 📦 Installation\n\n### Requirements\n\n* Linux / Termux\n* Python ≥ 3.8\n* libsodium\n\n### Install from PyPI\n\n```bash\npip install ciph\n```\n\n---\n\n## 🚀 Usage\n\n### Encrypt a file\n\n```bash\nciph encrypt video.mp4\n```\n\nOutput:\n\n```\nvideo.mp4.ciph\n```\n\n### Decrypt a file\n\n```bash\nciph decrypt video.mp4.ciph\n```\n\nOutput:\n\n```\nvideo.mp4\n```\n\n\u003e The original filename and extension are automatically restored, even if the encrypted file was renamed.\n\n### Example workflow (Cloud / Telegram)\n\n```bash\nciph encrypt movie.mkv\n# upload movie.mkv.ciph anywhere\n# share the password securely\n\nciph decrypt movie.mkv.ciph\n```\n\n---\n\n## 📝 File Format\n\n| Offset | Size | Description                            |\n| ------ | ---- | -------------------------------------- |\n| 0      | 4    | Magic bytes (`CIPH`)                   |\n| 4      | 1    | Format version                         |\n| 5      | 1    | Cipher mode (1 = AES, 2 = ChaCha)      |\n| 6      | 16   | Argon2 salt                            |\n| 22     | 12   | Key nonce                              |\n| 34     | 1    | Filename length (N)                    |\n| 35     | N    | Original filename (UTF‑8)              |\n| 35+N   | 2    | Encrypted data‑key length              |\n| …      | …    | Encrypted data key + encrypted payload |\n\n## 📊 Performance\n\n* Processes data in **1 MB chunks**\n* Cryptography handled in **C (libsodium)**\n* Python used only for CLI orchestration\n* Typical throughput: **hundreds of MB/s** (CPU‑bound)\n\nEncryption is usually faster than your internet upload speed.\n\n---\n\n## ⚠️ Limitations (v0.1.0)\n\n* Linux / Termux only\n* No resume support yet\n* Progress bar shows start → finish (stream handled in C)\n* Password‑based encryption only (public‑key mode planned)\n* Filename metadata is visible (content remains fully encrypted)\n\n---\n\n## 🧑‍💻 Author \u0026 Project\n\n**ciph** is **designed, developed, and maintained** by\n\n[**Ankit Chaubey (@ankit‑chaubey)**](https://github.com/ankit-chaubey)\n\nGitHub Repository:\n👉 **[https://github.com/ankit-chaubey/ciph](https://github.com/ankit-chaubey/ciph)**\n\nThe project focuses on building **secure, efficient, and practical cryptographic tools** for real‑world usage, especially for media files and cloud storage.\n\n---\n\n## 📜 License\n\nApache License 2.0\n\nCopyright © 2026 Ankit Chaubey\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\nYou may obtain a copy of the License at:\n\n[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and limitations under the License.\n\n---\n\n## 🔮 Roadmap\n\nPlanned future improvements:\n\n* Parallel chunk encryption\n* Resume / partial decryption\n* Public‑key encryption mode\n* Real‑time progress callbacks\n* Prebuilt wheels (manylinux)\n\n---\n\n## ⚠️ Disclaimer\n\nThis tool uses strong cryptography.\n\nIf you forget your password, **your data cannot be recovered**.\n\nUse responsibly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankit-chaubey%2Fciph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankit-chaubey%2Fciph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankit-chaubey%2Fciph/lists"}