2022-10-07 14:31:40 +00:00
|
|
|
[package]
|
|
|
|
name = "sd-crypto"
|
|
|
|
version = "0.0.0"
|
2022-12-08 12:08:35 +00:00
|
|
|
authors = ["Jake Robinson <jake@spacedrive.com>"]
|
2022-10-07 14:31:40 +00:00
|
|
|
readme = "README.md"
|
|
|
|
description = "A library to handle cryptographic functions within Spacedrive"
|
2023-02-07 12:03:12 +00:00
|
|
|
rust-version = "1.67.0"
|
2023-06-14 23:00:28 +00:00
|
|
|
license = { workspace = true }
|
|
|
|
repository = { workspace = true }
|
|
|
|
edition = { workspace = true }
|
2022-10-07 14:31:40 +00:00
|
|
|
|
2023-02-14 05:27:11 +00:00
|
|
|
[features]
|
2023-04-25 07:14:52 +00:00
|
|
|
rspc = ["dep:rspc", "dep:specta"]
|
|
|
|
specta = ["dep:specta"]
|
2023-02-14 05:27:11 +00:00
|
|
|
serde = ["dep:serde", "dep:serde_json", "dep:serde-big-array", "uuid/serde"]
|
2023-03-15 16:09:36 +00:00
|
|
|
keymanager = ["dep:dashmap", "os-keyrings"]
|
|
|
|
os-keyrings = ["dep:secret-service", "dep:security-framework"]
|
2023-02-14 05:27:11 +00:00
|
|
|
|
2022-10-07 14:31:40 +00:00
|
|
|
[dependencies]
|
|
|
|
# rng
|
2023-12-19 09:28:57 +00:00
|
|
|
rand = { workspace = true }
|
|
|
|
rand_chacha = { workspace = true }
|
2022-10-07 14:31:40 +00:00
|
|
|
|
2022-12-30 20:09:44 +00:00
|
|
|
# hashing
|
2023-03-15 16:09:36 +00:00
|
|
|
argon2 = "0.5.0"
|
|
|
|
balloon-hash = "0.4.0"
|
2023-12-19 09:28:57 +00:00
|
|
|
blake3 = { workspace = true, features = ["traits-preview"] }
|
2022-10-07 14:31:40 +00:00
|
|
|
|
|
|
|
# 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
|
2023-12-19 09:28:57 +00:00
|
|
|
thiserror = { workspace = true }
|
2022-10-13 22:25:42 +00:00
|
|
|
|
|
|
|
# metadata de/serialization
|
2023-12-19 09:28:57 +00:00
|
|
|
serde = { workspace = true, features = ["derive"], optional = true }
|
|
|
|
serde_json = { workspace = true, optional = true }
|
2023-03-15 16:09:36 +00:00
|
|
|
serde-big-array = { version = "0.5.1", optional = true }
|
2022-10-23 10:47:41 +00:00
|
|
|
|
2023-02-01 00:11:03 +00:00
|
|
|
# for storedkey organisation and handling
|
2023-12-19 09:28:57 +00:00
|
|
|
uuid = { workspace = true, features = ["v4"] }
|
2022-10-23 10:47:41 +00:00
|
|
|
|
2023-03-15 16:09:36 +00:00
|
|
|
# better concurrency for the keymanager
|
|
|
|
dashmap = { version = "5.4.0", optional = true }
|
2022-11-05 11:18:01 +00:00
|
|
|
|
2023-02-01 00:11:03 +00:00
|
|
|
# optional, for support with rspc
|
2023-04-25 07:14:52 +00:00
|
|
|
rspc = { workspace = true, features = [], optional = true }
|
|
|
|
specta = { workspace = true, features = ["uuid"], optional = true }
|
2022-12-02 10:18:21 +00:00
|
|
|
|
2023-02-01 00:11:03 +00:00
|
|
|
# for asynchronous crypto
|
2023-02-07 12:03:12 +00:00
|
|
|
tokio = { workspace = true, features = ["io-util", "rt-multi-thread", "sync"] }
|
2023-01-25 14:03:00 +00:00
|
|
|
|
2023-12-19 09:28:57 +00:00
|
|
|
hex = { workspace = true }
|
2023-02-07 12:03:12 +00:00
|
|
|
|
2023-03-15 16:09:36 +00:00
|
|
|
# linux OS keyring - using `v2.0.2` as newer versions broke a lot due to async/lifetimes
|
2023-02-01 00:11:03 +00:00
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
2023-03-15 16:09:36 +00:00
|
|
|
secret-service = { version = "2.0.2", optional = true }
|
2023-02-01 00:11:03 +00:00
|
|
|
|
2023-02-07 12:03:12 +00:00
|
|
|
# macos/ios OS keyring
|
2023-02-01 00:11:03 +00:00
|
|
|
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
|
2023-03-15 16:09:36 +00:00
|
|
|
security-framework = { version = "2.8.1", optional = true }
|
2023-02-01 00:11:03 +00:00
|
|
|
|
2023-01-25 14:03:00 +00:00
|
|
|
[dev-dependencies]
|
2023-01-25 22:03:10 +00:00
|
|
|
tokio = { workspace = true, features = [
|
2023-05-20 01:52:55 +00:00
|
|
|
"fs",
|
|
|
|
"macros",
|
2023-01-25 14:03:00 +00:00
|
|
|
] } # features needed for examples
|