{"id":13439460,"url":"https://github.com/zboxfs/zbox","last_synced_at":"2025-09-29T02:32:23.666Z","repository":{"id":38272156,"uuid":"112287150","full_name":"zboxfs/zbox","owner":"zboxfs","description":"Zero-details, privacy-focused in-app file system.","archived":true,"fork":false,"pushed_at":"2023-10-21T17:37:32.000Z","size":1317,"stargazers_count":1522,"open_issues_count":18,"forks_count":75,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-04-30T08:33:00.991Z","etag":null,"topics":["crypto","encryption","filesystem","fs","libsodium","privacy","rust","storage","zbox"],"latest_commit_sha":null,"homepage":"https://zbox.io/fs/","language":"Rust","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/zboxfs.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-28T04:48:46.000Z","updated_at":"2024-06-21T14:24:13.294Z","dependencies_parsed_at":"2024-06-21T14:24:10.169Z","dependency_job_id":"6aed6b9e-2dda-4bb9-8667-e2cb0fdc65f5","html_url":"https://github.com/zboxfs/zbox","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zboxfs%2Fzbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zboxfs%2Fzbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zboxfs%2Fzbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zboxfs%2Fzbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zboxfs","download_url":"https://codeload.github.com/zboxfs/zbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234583683,"owners_count":18856280,"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":["crypto","encryption","filesystem","fs","libsodium","privacy","rust","storage","zbox"],"created_at":"2024-07-31T03:01:14.092Z","updated_at":"2025-09-29T02:32:18.286Z","avatar_url":"https://github.com/zboxfs.png","language":"Rust","funding_links":[],"categories":["Libraries","Rust","库 Libraries","rust","库"],"sub_categories":["Filesystem","文件系统 Filesystem","文件系统"],"readme":"\u003cimg src=\"https://zboxfs.github.io/zbox/images/logo.svg\" alt=\"ZboxFS Logo\" height=\"96\" /\u003e ZboxFS\n======\n[![GitHub action](https://github.com/zboxfs/zbox/workflows/build/badge.svg)](https://github.com/zboxfs/zbox/actions)\n[![Crates.io](https://img.shields.io/crates/d/zbox.svg)](https://crates.io/crates/zbox)\n[![Crates.io](https://img.shields.io/crates/v/zbox.svg)](https://crates.io/crates/zbox)\n[![GitHub last commit](https://img.shields.io/github/last-commit/zboxfs/zbox.svg)](https://github.com/zboxfs/zbox)\n[![license](https://img.shields.io/github/license/zboxfs/zbox.svg)](https://github.com/zboxfs/zbox)\n[![GitHub stars](https://img.shields.io/github/stars/zboxfs/zbox.svg?style=social\u0026label=Stars)](https://github.com/zboxfs/zbox)\n\nZboxFS is a zero-details, privacy-focused in-app file system. Its goal is\nto help application store files securely, privately and reliably. By\nencapsulating files and directories into an encrypted repository, it provides\na virtual file system and exclusive access to authorised application.\n\nUnlike other system-level file systems, such as [ext4], [XFS] and [Btrfs], which\nprovide shared access to multiple processes, ZboxFS is a file system that runs\nin the same memory space as the application. It provides access to only one\nprocess at a time.\n\nBy abstracting IO access, ZboxFS supports a variety of underlying storage layers,\nincluding memory, OS file system, RDBMS and key-value object store.\n\n## Disclaimer\n\nZboxFS is under active development, we are not responsible for any data loss\nor leak caused by using it. Always back up your files and use at your own risk!\n\nFeatures\n========\n- Everything is encrypted :lock:, including metadata and directory structure,\n  no knowledge can be leaked to underlying storage\n- State-of-the-art cryptography: AES-256-GCM (hardware), XChaCha20-Poly1305,\n  Argon2 password hashing and etc., powered by [libsodium]\n- Support varieties of underlying storages, including memory, OS file system,\n  RDBMS, Key-value object store and more\n- Files and directories are packed into same-sized blocks to eliminate metadata\n  leakage\n- Content-based data chunk deduplication and file-based deduplication\n- Data compression using [LZ4] in fast mode, optional\n- Data integrity is guaranteed by authenticated encryption primitives (AEAD\n  crypto)\n- File contents versioning\n- Copy-on-write (COW :cow:) semantics\n- ACID transactional operations\n- Built with [Rust] :hearts:\n\n## Comparison\n\nMany OS-level file systems support encryption, such as [EncFS], [APFS] and\n[ZFS]. Some disk encryption tools also provide virtual file system, such as\n[TrueCrypt], [LUKS] and [VeraCrypt].\n\nThis diagram shows the difference between ZboxFS and them.\n\n![Comparison](https://zboxfs.github.io/zbox/images/zbox-compare.svg)\n\nBelow is the feature comparison list.\n\n|                             | ZboxFS                   | OS-level File Systems    | Disk Encryption Tools    |\n| --------------------------- | ------------------------ | ------------------------ | ------------------------ |\n| Encrypts file contents      | :heavy_check_mark:       | partial                  | :heavy_check_mark:       |\n| Encrypts file metadata      | :heavy_check_mark:       | partial                  | :heavy_check_mark:       |\n| Encrypts directory          | :heavy_check_mark:       | partial                  | :heavy_check_mark:       |\n| Data integrity              | :heavy_check_mark:       | partial                  | :heavy_multiplication_x: |\n| Shared access for processes | :heavy_multiplication_x: | :heavy_check_mark:       | :heavy_check_mark:       |\n| Deduplication               | :heavy_check_mark:       | :heavy_multiplication_x: | :heavy_multiplication_x: |\n| Compression                 | :heavy_check_mark:       | partial                  | :heavy_multiplication_x: |\n| Content versioning          | :heavy_check_mark:       | :heavy_multiplication_x: | :heavy_multiplication_x: |\n| COW semantics               | :heavy_check_mark:       | partial                  | :heavy_multiplication_x: |\n| ACID Transaction            | :heavy_check_mark:       | :heavy_multiplication_x: | :heavy_multiplication_x: |\n| Varieties of storages           | :heavy_check_mark:       | :heavy_multiplication_x: | :heavy_multiplication_x: |\n| API access                  | :heavy_check_mark:       | through VFS              | through VFS              |\n| Symbolic links              | :heavy_multiplication_x: | :heavy_check_mark:       | depends on inner FS      |\n| Users and permissions       | :heavy_multiplication_x: | :heavy_check_mark:       | :heavy_check_mark:       |\n| FUSE support                | :heavy_multiplication_x: | :heavy_check_mark:       | :heavy_check_mark:       |\n| Linux and macOS support     | :heavy_check_mark:       | :heavy_check_mark:       | :heavy_check_mark:       |\n| Windows support             | :heavy_check_mark:       | partial                  | :heavy_check_mark:       |\n\n## Supported Storage\n\nZboxFS supports a variety of underlying storages. Memory storage is enabled by\ndefault. All the other storages can be enabled individually by specifying its\ncorresponding Cargo feature when building ZboxFS.\n\n| Storage            | URI identifier  | Cargo Feature       |\n| ------------------ | --------------- | ------------------- |\n| Memory             | \"mem://\"        | N/A                 |\n| OS file system     | \"file://\"       | storage-file        |\n| SQLite             | \"sqlite://\"     | storage-sqlite      |\n| Redis              | \"redis://\"      | storage-redis       |\n| Zbox Cloud Storage | \"zbox://\"       | storage-zbox-native |\n\n\\* Visit [zbox.io](https://zbox.io) to learn more about Zbox Cloud Storage.\n\n## Specs\n\n| Algorithm and data structure         | Value                             |\n| ------------------------------------ | --------------------------------- |\n| Authenticated encryption             | AES-256-GCM or XChaCha20-Poly1305 |\n| Password hashing                     | Argon2                            |\n| Key derivation                       | BLAKE2B                           |\n| Content dedup                        | Rabin rolling hash                |\n| File dedup                           | Merkle tree                       |\n| Index structure                      | Log-structured merge-tree         |\n| Compression                          | LZ4 in fast mode                  |\n\n### Limits\n\n| Limit                                     | Value                        |\n| ----------------------------------------- | ---------------------------- |\n| Data block size                           | 8 KiB                        |\n| Maximum encryption frame size             | 128 KiB                      |\n| Super block size                          | 8 KiB                        |\n| Maximum filename length                   | No limit                     |\n| Allowable characters in directory entries | Any UTF-8 character except / |\n| Maximum pathname length                   | No limit                     |\n| Maximum file size                         | 16 EiB                       |\n| Maximum repo size                         | 16 EiB                       |\n| Max number of files                       | No limit                     |\n\n### Metadata\n\n| Metadata                                  | Value                        |\n| ----------------------------------------- | ---------------------------- |\n| Stores file owner                         | No                           |\n| POSIX file permissions                    | No                           |\n| Creation timestamps                       | Yes                          |\n| Last access / read timestamps             | No                           |\n| Last change timestamps                    | Yes                          |\n| Access control lists                      | No                           |\n| Security                                  | Integrated with crypto       |\n| Extended attributes                       | No                           |\n\n### Capabilities\n\n| Capability                                | Value                        |\n| ----------------------------------------- | ---------------------------- |\n| Hard links                                | No                           |\n| Symbolic links                            | No                           |\n| Case-sensitive                            | Yes                          |\n| Case-preserving                           | Yes                          |\n| File Change Log                           | By content versioning        |\n| Filesystem-level encryption               | Yes                          |\n| Data deduplication                        | Yes                          |\n| Data checksums                            | Integrated with crypto       |\n| Offline grow                              | No                           |\n| Online grow                               | Auto                         |\n| Offline shrink                            | No                           |\n| Online shrink                             | Auto                         |\n\n### Allocation and layout policies\n\n| Feature                     | Value                             |\n| --------------------------- | --------------------------------- |\n| Address allocation scheme   | Append-only, linear address space |\n| Sparse files                | No                                |\n| Transparent compression     | Yes                               |\n| Extents                     | No                                |\n| Copy on write               | Yes                               |\n\n### Storage fragmentation\n\n| Fragmentation                | Value                        |\n| ---------------------------- | ---------------------------- |\n| Memory storage               | No                           |\n| File storage                 | fragment unit size \u003c 32 MiB  |\n| RDBMS storage                | No                           |\n| Key-value storage            | No                           |\n| Zbox cloud storage           | fragment unit size \u003c 128 KiB |\n\nHow to use\n==========\nFor reference documentation, please visit [documentation](https://docs.rs/zbox).\n\n## Requirements\n\n- [Rust] stable \u003e= 1.38\n- [libsodium] \u003e= 1.0.17\n\n## Supported Platforms\n\n- 64-bit Debian-based Linux, such as Ubuntu\n- 64-bit macOS\n- 64-bit Windows\n- 64-bit Android, API level \u003e= 21\n\n32-bit and other OS are `NOT` supported yet.\n\n## Usage\n\nAdd the following dependency to your `Cargo.toml`:\n\n```toml\n[dependencies]\nzbox = \"0.9.2\"\n```\n\nIf you don't want to install libsodium by yourself, simply specify\n`libsodium-bundled` feature in dependency, which will automatically download,\nverify and build libsodium.\n\n```toml\n[dependencies]\nzbox = { version = \"0.9.2\", features = [\"libsodium-bundled\"] }\n```\n\n## Example\n\n```rust\nextern crate zbox;\n\nuse std::io::{Read, Write, Seek, SeekFrom};\nuse zbox::{init_env, RepoOpener, OpenOptions};\n\nfn main() {\n    // initialise zbox environment, called first\n    init_env();\n\n    // create and open a repository in current OS directory\n    let mut repo = RepoOpener::new()\n        .create(true)\n        .open(\"file://./my_repo\", \"your password\")\n        .unwrap();\n\n    // create and open a file in repository for writing\n    let mut file = OpenOptions::new()\n        .create(true)\n        .open(\u0026mut repo, \"/my_file.txt\")\n        .unwrap();\n\n    // use std::io::Write trait to write data into it\n    file.write_all(b\"Hello, World!\").unwrap();\n\n    // finish writing to make a permanent content version\n    file.finish().unwrap();\n\n    // read file content using std::io::Read trait\n    let mut content = String::new();\n    file.seek(SeekFrom::Start(0)).unwrap();\n    file.read_to_string(\u0026mut content).unwrap();\n    assert_eq!(content, \"Hello, World!\");\n}\n```\n\n## Build with Docker\n\nZboxFS comes with [Docker] support, which made building ZboxFS easier. Check\neach repo for more details.\n\n- [zboxfs/base]\n  Base image for building ZboxFS on Linux\n\n- [zboxfs/wasm]\n  Docker image for building WebAssembly binding\n\n- [zboxfs/nodejs]\n  Docker image for building Node.js binding\n\n- [zboxfs/android]\n  Docker image for building Android Java binding\n\n## Static linking with libsodium\n\nBy default, ZboxFS uses dynamic linking when it is linked with libsodium. If you\nwant to change this behavior and use static linking, you can enable below two\nenvironment variables.\n\nOn Linux/macOS,\n\n```bash\nexport SODIUM_LIB_DIR=/path/to/your/libsodium/lib\nexport SODIUM_STATIC=true\n```\n\nOn Windows,\n\n```bash\nset SODIUM_LIB_DIR=C:\\path\\to\\your\\libsodium\\lib\nset SODIUM_STATIC=true\n```\n\nAnd then re-build the code.\n\n```bash\ncargo build\n```\n\nPerformance\n============\n\nThe performance test is run on a Macbook Pro 2017 laptop with spec as below.\n\n| Spec                    | Value                       |\n| ----------------------- | --------------------------- |\n| Processor Name:         | Intel Core i7               |\n| Processor Speed:        | 3.5 GHz                     |\n| Number of Processors:   | 1                           |\n| Total Number of Cores:  | 2                           |\n| L2 Cache (per Core):    | 256 KB                      |\n| L3 Cache:               | 4 MB                        |\n| Memory:                 | 16 GB                       |\n| OS Version:             | macOS High Sierra 10.13.6   |\n\nTest result:\n\n|                               | Read            | Write          | TPS          |\n| ----------------------------- | --------------- | -------------- | ------------ |\n| Baseline (memcpy):            | 3658.23 MB/s    | 3658.23 MB/s   | N/A          |\n| Baseline (file):              | 1307.97 MB/s    | 2206.30 MB/s   | N/A          |\n| Memory storage (no compress): | 605.01 MB/s     | 186.20 MB/s    | 1783 tx/s    |\n| Memory storage (compress):    | 505.04 MB/s     | 161.11 MB/s    | 1180 tx/s    |\n| File storage (no compress):   | 445.28 MB/s     | 177.39 MB/s    | 313 tx/s     |\n| File storage (compress):      | 415.85 MB/s     | 158.22 MB/s    | 325 tx/s     |\n\nTo run the performance test on your own computer, please follow the\ninstructions in [CONTRIBUTING.md](CONTRIBUTING.md#run-performance-test).\n\nContribution\n============\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall\nbe licensed as above, without any additional terms of conditions.\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of\nconduct, and the process for submitting pull requests to us.\n\nCommunity\n=========\n\n- [Twitter](https://twitter.com/ZboxFS)\n\nLicense\n=======\n`ZboxFS` is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE)\nfile for details.\n\n[ext4]: https://en.wikipedia.org/wiki/Ext4\n[xfs]: http://xfs.org\n[btrfs]: https://btrfs.wiki.kernel.org\n[Rust]: https://www.rust-lang.org\n[libsodium]: https://libsodium.org\n[LZ4]: http://www.lz4.org\n[EncFS]: https://vgough.github.io/encfs/\n[APFS]: https://en.wikipedia.org/wiki/Apple_File_System\n[ZFS]: https://en.wikipedia.org/wiki/ZFS\n[TrueCrypt]: http://truecrypt.sourceforge.net\n[LUKS]: https://gitlab.com/cryptsetup/cryptsetup/\n[VeraCrypt]: https://veracrypt.codeplex.com\n[Docker]: https://www.docker.com\n[zboxfs/base]: https://github.com/zboxfs/zbox-docker-base\n[zboxfs/wasm]: https://github.com/zboxfs/zbox-docker-wasm\n[zboxfs/nodejs]: https://github.com/zboxfs/zbox-docker-nodejs\n[zboxfs/android]: https://github.com/zboxfs/zbox-android\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzboxfs%2Fzbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzboxfs%2Fzbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzboxfs%2Fzbox/lists"}