spacedrive/crates/crypto
Brendan Allan 3cabc9c3a9
Basic actor manager (#1888)
* basic declared actor manager

* put actors in separate file

* clippy

* hopefully clean up some clippy warnings

---------

Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
2023-12-13 17:49:22 +00:00
..
assets [ENG-307] Key manager features (#467) 2022-12-02 10:18:21 +00:00
benches disable benchmarks as they need async support 2023-01-24 14:25:42 +00:00
examples [ENG-429] Crypto organization/refactor (#607) 2023-03-15 16:09:36 +00:00
src Basic actor manager (#1888) 2023-12-13 17:49:22 +00:00
Cargo.toml [ENG-381] Update context menufs actions to support multiple source (#927) 2023-06-14 23:00:28 +00:00
README.md [ENG-1165] Add a security policy and notices to the appropriate READMEs (#1409) 2023-09-30 08:31:38 +00:00

Crypto

This crate contains Spacedrive's cryptographic modules.

This includes things such as:

  • The key manager
  • Encryption and decryption
  • Encrypted file header formats (with extremely fast serialization and deserialization)
  • Key hashing and derivation
  • Keyring interfaces to access native OS keystores

It has support for the following cryptographic functions:

  • Argon2id
  • Balloon hashing
  • BLAKE3 key derivation
  • XChaCha20-Poly1305
  • AES-256-GCM

It aims to be (relatively) lightweight, easy to maintain and platform-agnostic where possible. It does contain some platform-specific code, although it's only built if the target matches.

Features

A list of all features can be found below (NOTE: none of these features are enabled by default)

  • serde - provides integration with the serde and serde_json crates. this also enables header metadata
  • rspc - provides integration with the rspc crate
  • keymanager - provides an interface for handling the encryption, decryption, storage and derivation of passwords/keys. this enables the os-keyrings feature
  • os-keyrings - provides a unified interface for interacting with OS-keyrings (currently only supports MacOS/iOS and Gnome/KDE (via gnome-keyring and kwallet respectively))

Security Notice

This crate has NOT received any security audit - however, a couple of our upstream libraries (provided by RustCrypto) have.

You may find them below:

  • AES-GCM and XChaCha20-Poly1305 audit by NCC group (link)

Breaking changes are very likely! Use at your own risk - no stability or security is guaranteed.

Security Policy

Please refer to the security policy for details and information on how to responsibly report a security vulnerability or issue.