50 releases (20 breaking)

new 0.20.2 Mar 3, 2021
0.19.11 Feb 15, 2021
0.19.5 Nov 23, 2020
0.19.0 Jul 30, 2020
0.0.4 Mar 8, 2015
Download history 130/week @ 2020-11-10 365/week @ 2020-11-17 658/week @ 2020-11-24 644/week @ 2020-12-01 442/week @ 2020-12-08 580/week @ 2020-12-15 296/week @ 2020-12-22 154/week @ 2020-12-29 479/week @ 2021-01-05 512/week @ 2021-01-12 397/week @ 2021-01-19 426/week @ 2021-01-26 231/week @ 2021-02-02 397/week @ 2021-02-09 591/week @ 2021-02-16 271/week @ 2021-02-23

1,697 downloads per month
Used in 12 crates (5 directly)

GPL-3.0 license



Self encrypting files (convergent encryption plus obfuscation)

Crate Documentation
MaidSafe website SAFE Dev Forum SAFE Network Forum


A version of convergent encryption with an additional obfuscation step. This pattern allows secured data that can also be de-duplicated. This library presents an API that can be utilised in any application that provides a POSIX like filesystem interface, dealing very effectively with the content part of any data (in tests the parallelised approach can actually be faster than reading/writing data as a single stream). It is important to realise two important aspects of this library:

  1. This library deals with file content only
  2. This library provides very secure data, but does return a data structure (DataMap) that in turn requires to be secured.

image of self encryption

Video of the process

self_encryption process and use case video


Using self_encryptor

This library splits a file into encrypted chunks and also produces a data map for the same. This data map with encrypted chunks enables the file to be reconstituted. Instructions to use the 'basic_encryptor' example are as follows:

Encrypt a file:
cargo run --example basic_encryptor -- -e <full_path_to_any_file>

You should now have the example binary in ../self_encryption/target/debug/examples/. The data_map for the given file and it's encrypted chunks will be written to the current directory.

Decrypt a file:
cargo run --example basic_encryptor -- -d <full_path_to_data_map> <full_destination_path_including_filename>

This will restore the original file to the given destination path.


Licensed under the General Public License (GPL), version 3 (LICENSE http://www.gnu.org/licenses/gpl-3.0.en.html).

Linking exception

self_encryption is licensed under GPLv3 with linking exception. This means you can link to and use the library from any program, proprietary or open source; paid or gratis. However, if you modify self_encryption, you must distribute the source to your modified version under the terms of the GPLv3.

See the LICENSE file for more details.


Want to contribute? Great 🎉

There are many ways to give back to the project, whether it be writing new code, fixing bugs, or just reporting errors. All forms of contributions are encouraged!

For instructions on how to contribute, see our Guide to contributing.


~232K SLoC