{"id":13455109,"url":"https://github.com/aegistudio/enigma","last_synced_at":"2025-09-12T00:38:48.057Z","repository":{"id":64202166,"uuid":"568831626","full_name":"aegistudio/enigma","owner":"aegistudio","description":"🔢🔒Enigma: a simple cross-platform encrypted filesystem","archived":false,"fork":false,"pushed_at":"2023-01-23T15:44:26.000Z","size":87,"stargazers_count":228,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-20T04:48:43.701Z","etag":null,"topics":["encryption-tool","filesystem","golang","secure-storage"],"latest_commit_sha":null,"homepage":"","language":"Go","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/aegistudio.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}},"created_at":"2022-11-21T13:59:39.000Z","updated_at":"2025-05-13T13:04:16.000Z","dependencies_parsed_at":"2023-02-13T00:31:06.757Z","dependency_job_id":null,"html_url":"https://github.com/aegistudio/enigma","commit_stats":null,"previous_names":["aegistudio/hologram"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/aegistudio/enigma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegistudio%2Fenigma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegistudio%2Fenigma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegistudio%2Fenigma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegistudio%2Fenigma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aegistudio","download_url":"https://codeload.github.com/aegistudio/enigma/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aegistudio%2Fenigma/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274732454,"owners_count":25339345,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"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":["encryption-tool","filesystem","golang","secure-storage"],"created_at":"2024-07-31T08:01:01.371Z","updated_at":"2025-09-12T00:38:48.017Z","avatar_url":"https://github.com/aegistudio.png","language":"Go","readme":"# Enigma: a simple encrypted filesystem\n\n***(WARN: This project has not been validated or verified for\nsecurity. In fact, current implementation is prone to chosen\nciphertext attack. It is strongly not recommended to use this\nin production.)***\n\n![build](https://github.com/aegistudio/enigma/actions/workflows/build.yml/badge.svg)\n![release](https://img.shields.io/github/release/aegistudio/enigma)\n![update](https://img.shields.io/github/release-date/aegistudio/enigma.svg?color=blue\u0026label=update)\n\nEnigma is a simple encrypted filesystem that adds a thin layer of\nencryption over native filesystem and keeps your most sensitive\nsecrets.\n\n[Quickstart for Windows (with WinFSP)](doc/quickstart.md#quickstart-for-windows-with-winfsp)\n\n[Quickstart for Linux (with FUSE)](doc/quickstart.md#quickstart-for-linux-with-fuse)\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/aegistudio/enigma-assets/blob/693f0bd237cc73108e45dacb40eaf142a0255a75/winfsp.gif\" width=\"71%\" height=\"71%\"/\u003e\n\u003cbr/\u003e\u003ci\u003eUse Enigma as a Windows local drive through WinFSP\u003c/i\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/aegistudio/enigma-assets/blob/03198af9acc329642c3a084e05838e4cd4c7ea35/fuse.gif\" width=\"71%\" height=\"71%\"/\u003e\n\u003cbr/\u003e\u003ci\u003eUse Enigma as a mount point through FUSE on Linux\u003c/i\u003e\n\u003c/p\u003e\n\n## Roadmap\n\n* Operation Mode\n  * [x] Direct mapping mode\n  * [ ] POSIX-compatible mode\n* Key Specification\n  * [x] File (prone to invasion) [^1]\n  * [ ] Vault (with [github.com/hashicorp/vault](https://github.com/hashicorp/vault))\n  * [ ] HTTP request (remote decryption)\n* Integration\n  * [x] WinFSP (**Windows** only, with [github.com/aegistudio/go-winfsp](https://github.com/aegistudio/go-winfsp))\n  * [x] FUSE (**Linux** and **Mac** only, with [github.com/hanwen/go-fuse](https://github.com/hanwen/go-fuse))\n  * [x] HTTP (trivially by Golang's `http` library)\n  * [x] FTP (with [github.com/fclairamb/ftpserverlib](https://github.com/fclairamb/ftpserverlib))\n  * [ ] NFSv3\n\n## Methods of Encryption\n\nBoth the file names and data will be encrypted by an [AES-256](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard)\nkey in [CTR mode](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#CTR),\nwhich takes trillions of years for the attackers to crack, owing to\nthe miracles of cryptology.\n\nEncrypting in CTR mode enables the filesystem to random access the\nstored content, without bloating the file size. Many CPUs support\nhardware accelerating computation of AES-256 block. This is crucial\nfor implementing a fast, efficient and low overhead file system.\n\nThe nonce, which is required by CTR mode to encrypt file names and\ndata, is generated regarding the path relative to root in filesystem.\nWalking down the path to the final component of file name, we compute\nthe SHA256 hash of its parent's hash concatenating current visited\ncomponent. The hash of `/` is the SHA256 digest of the key.\n\nSince all information to calculate the nonce is contained inside the\nfile or directory's path we are going to visit naturally, we don't\nneed to spend any extra space to store the nonce.\n\nUnder the same directory, encrypting file names with the same nonce\ndirectly is prone to [chosen-plaintext attack](https://en.wikipedia.org/wiki/Chosen-plaintext_attack).\nTo mitigate, we generate a short extra nonce for each file name,\nwhich is computed from the cryptological digest. Then the nonce for\nthe file name is computed from the digest of the directory it is in,\nplus the short extra nonce and the file's length. After being\nencrypted, the file name is encoded in Base64 as it is usually in\ninvalid ASCII or Unicode.\n\nFor resisting [birthday attack](https://en.wikipedia.org/wiki/Birthday_attack),\nthe default extra nonce size is 3 bytes, which yields a birthday\nbound of about `Q(H) = 46819.7` files and low possibility bound of\nabout `n(H;0.25%) = 2813.6` files [^2], and is considered providing\nenough security under most circumstances.\n\nThe AES-256 key for encrypting the file system, is randomly generated\nthrough a cryptologically secure random process, then encrypted and\nauthenticated by a root key supports [AEAD](https://en.wikipedia.org/wiki/Authenticated_encryption).\nThis extra indirection enables us to check whether proper key is\nspecified, and enables online decryption to protect the root key,\nwithout sacrificing the performance.\n\n## License\n\nThe project is licensed under [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0).\nAnyone is free to modify and redistribute the code, however they\nmust swear the oath of keeping users' data and secrets sacred and\ndepicts what they have modified for users' judgement.\n\n[^1]: Storing your key as regular files on the disk directly can be\na security issue if your physical machine has been invaded. It's not\nso risky if the key is transfered over TTY, pipe, socket, etc.\n[^2]: Assume native file system supports file name of maximum 128\nbytes, there're `(128-1) * 6 / 8 - 1 = 94.25` cases of file names'\nlength. The number of outputs for file names' nonces is\n`H = 94.25 * (2^24) = 1581252608.0`.\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faegistudio%2Fenigma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faegistudio%2Fenigma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faegistudio%2Fenigma/lists"}