spacedrive/crates/crypto
jake c7dbc784cd
[ENG-361] Crypto crate docs and tests (#572)
* add hashing tests

* add encryption/decryption tests

* remove `reason`

* add file header tests (preview media deserialization is broken)

* fix keyslot reading bug

* add sd-crypto testing to ci

* add tests/constants for all hashing algorthms and param levels

* add blake3-kdf tests

* use `const` arrays for storing expected output

* test for `5MiB` `encrypt_streams` and `decrypt_streams`

* add invalid/mismatched nonce tests

* update `primitives` docs

* remove erroneous `,`

* grammar tweaks

* add errors to `#[should_panic]`

* cleanup `stream` tests

* cleanup hashing tests a little

* function docs
2023-02-16 11:42:30 +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-355] Keychain integration (and some typesafety) (#558) 2023-02-07 12:03:12 +00:00
src [ENG-361] Crypto crate docs and tests (#572) 2023-02-16 11:42:30 +00:00
Cargo.toml [ENG-361] Crypto crate docs and tests (#572) 2023-02-16 11:42:30 +00:00
README.md [ENG 239] Onboarding Flow & Location Settings (#529) 2023-02-10 14:08:13 -08: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 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.