7 releases
new 0.6.1 | May 21, 2024 |
---|---|
0.6.0 | May 16, 2024 |
0.5.0 | Mar 5, 2024 |
0.4.3 | Jan 22, 2024 |
#2143 in Cryptography
114 downloads per month
Used in 2 crates
84KB
1K
SLoC
nuts: A secure storage toolset.
Introduction
The nuts library implements a secure storage library, where data are stored in a container. The container is divided into encrypted blocks. So a nuts container looks like a block device. All the things (e.g. keys) you need to open it are stored in the container itself. The library has a rich API, so it can be easily integrated into you application.
The container does not manage the encrypted data itself. It is transferred to a backend that is solely responsible for the persistent storage of the blocks. In this way, the data can easily be stored on different media or in different formats. The keys remain in the container and do not have to be stored in the backend.
nuts-container
The nuts-container implements the container itself.
Backend implementations
nuts-directory
The nuts-directory crate implements a nuts backend where the blocks of the container are stored in a file hierarchy. Each block is identified by an id, which is basically a 16 byte random number.
Applications
nuts-archive
The nuts-archive is an application based on the nuts container. Inspired by the
tar
tool you can store files, directories and symlinks in a nuts container.
Tools
The nuts-tool projects implements a commandline utility to maintain nuts container and its application.
Try it out
The easiest way to try out the nuts
tool is in a Docker container:
docker pull dorobin/nuts
Then open a shell in a container:
docker run -it dorobin/nuts bash
root@92cdafaf933b:/# # you are inside the container
root@92cdafaf933b:/# # the nuts tool is installed as /usr/local/bin/nuts
root@92cdafaf933b:/# ls /usr/local/bin/nuts
/usr/local/bin/nuts
lib.rs
:
A sample nuts_backend::Backend
implementation which stores the data in
memory.
This implementation is mainly used for demonstration, testing and documentation.
It stores the content of the data blocks in a hash indexed by
the Id
of this backend, where the
id is a simple u32
value.
Dependencies
~325–790KB
~18K SLoC