pub type StorageOnly = KeyingScheme<Argon2UserPass, CryptoBoxStorage>;
Expand description

Asymmetric-key based encryption scheme to create archives with a write-only storage segment.

A fully write-only archive in Infinitree requires server-side support. However, we can get half-way there by storing any user-managed data through libsodium’s crypto_box scheme.

To write data using cryptobox, acquire a writer handle through Infinitree::storage_writer. The index itself is still symmetric for all operations that are defined on Infinitree.

Due to the fact that on changing the encryption scheme all existing ChunkPointers would be invalidated, and would need re-encryption, converting to and from CryptoBoxStorage is not supported.

Panics

Opening a tree with an invalid key currently panics.

Implementations

Create a crypto backend that only allows encryption through Infinitree::storage_writer.

Panics

The resulting encryption backend will panic if decryption operation is done through Infinitree::storage_reader.

Create a crypto backend that allows encryption and decryption for writers and readers acquired through Infinitree::storage_writer and Infinitree::storage_reader, respectively.