spacedrive/crates/crypto/Cargo.toml
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

82 lines
1.8 KiB
TOML

[package]
name = "sd-crypto"
version = "0.0.0"
authors = ["Jake Robinson <jake@spacedrive.com>"]
readme = "README.md"
description = "A library to handle cryptographic functions within Spacedrive"
edition = "2021"
rust-version = "1.67.0"
[features]
rspc = ["dep:rspc"]
serde = ["dep:serde", "dep:serde_json", "dep:serde-big-array", "uuid/serde"]
[dependencies]
# rng
rand = "0.8.5"
rand_chacha = "0.3.1"
# hashing
argon2 = "0.4.1"
balloon-hash = "0.3.0"
blake3 = { version = "1.3.3", features = ["traits-preview"] }
# aeads
aes-gcm = "0.10.1"
chacha20poly1305 = "0.10.1"
aead = { version = "0.5.1", features = ["stream"] }
# cryptographic hygiene
zeroize = "1.5.7"
# error handling
thiserror = "1.0.37"
# metadata de/serialization
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
serde-big-array = { version = "0.4.1", optional = true }
# for storedkey organisation and handling
uuid = { version = "1.1.2", features = ["v4"] }
# better/faster keymanager
dashmap = "5.4.0"
# optional, for support with rspc
rspc = { workspace = true, features = ["uuid"], optional = true }
# for asynchronous crypto
tokio = { workspace = true, features = ["io-util", "rt-multi-thread", "sync"] }
hex = "0.4.3"
# linux OS keyring
[target.'cfg(target_os = "linux")'.dependencies]
secret-service = "2.0.2"
# macos/ios OS keyring
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
security-framework = "2.8.1"
[dev-dependencies]
tokio = { workspace = true, features = [
"fs",
"macros",
] } # features needed for examples
# [[bench]]
# name = "aes-256-gcm"
# path = "benches/aes-256-gcm.rs"
# harness = false
# [[bench]]
# name = "xchacha20-poly1305"
# path = "benches/xchacha20-poly1305.rs"
# harness = false
# [[bench]]
# name = "argon2id"
# path = "benches/argon2id.rs"
# harness = false