[package]
name = "ockam_vault"
version = "0.78.0"
authors = ["Ockam Developers"]
categories = [
  "cryptography",
  "asynchronous",
  "authentication",
  "no-std",
  "algorithms",
]
edition = "2021"
homepage = "https://github.com/build-trust/ockam"
keywords = ["ockam", "crypto", "cryptography", "authentication", "no-std"]
license = "Apache-2.0"
publish = true
readme = "README.md"
repository = "https://github.com/build-trust/ockam/tree/develop/implementations/rust/ockam/ockam_vault"
rust-version = "1.56.0"
description = """A software-only Ockam Vault implementation.
"""

[lib]
crate-type = ["rlib"]
path = "src/lib.rs"

[features]
default = ["std", "storage"]

# Feature (enabled by default): "std" enables functionality expected to
# be available on a standard platform.
std = [
  "ockam_macros/std",
  "ockam_node/std",
  "aes-gcm/alloc",
  "aes-gcm/std",
  "rand/std",
  "rand/std_rng",
  "tracing/std",
  "x25519-dalek/std",
  "x25519-dalek/u64_backend",
  "alloc",
  "p256/std",
]

# Feature: "no_std" enables functionality required for platforms
# without the standard library, requires nightly.
no_std = [
  "ockam_node/no_std",
  "rand_pcg",
  "x25519-dalek/u32_backend",
  "aes-gcm/heapless",
  "aes-gcm/force-soft",
  "aes-gcm/stream",
  "serde/derive",
]

# Feature: "alloc" enables support for heap allocation (implied by `feature = "std"`)
alloc = [
  "ockam_node/alloc",
  "aes-gcm/alloc",
  "p256/ecdsa",
  "p256/pem",
]

storage = ["ockam_node/storage", "std", "serde", "serde_cbor"]

# Feature: this gives access to test suites for testing the implementation of the Vault traits
vault_tests = []

[dependencies]
aes-gcm = { version = "0.9", default-features = false, features = ["aes"] }
arrayref = "0.3"
cfg-if = "1.0.0"
curve25519-dalek = { version = "3.1", default-features = false }
ed25519-dalek = { version = "1.0", default-features = false }
hex = { version = "0.4", default-features = false }
hkdf = { version = "0.12", default-features = false }
minicbor = { version = "0.19.0", features = ["derive"] }
ockam_core = { path = "../ockam_core", version = "^0.82.0", default_features = false }
ockam_macros = { path = "../ockam_macros", version = "^0.30.0", default-features = false }
ockam_node = { path = "../ockam_node", version = "^0.85.0", default_features = false }
# ECDSA providers:
p256 = { version = "0.13.2", default_features = false }
rand = { version = "0.8", default-features = false }
rand_pcg = { version = "0.3.1", default-features = false, optional = true }
serde = { version = "1", default-features = false, features = ["derive"], optional = true }
serde_cbor = { version = "0.11.2", optional = true }
sha2 = { version = "0.10", default-features = false }
thiserror = { version = "1.0.38", optional = true }
tracing = { version = "0.1", default-features = false, features = ["attributes"] }
x25519-dalek = { version = "1.0", default_features = false }
zeroize = { version = "1.4.2", features = ["zeroize_derive"] }

[dev-dependencies]
data-encoding = { version = "2.4.0", features = ["alloc"] }
serde_bare = { version = "0.5.0" }
serde_json = { version = "1" }
tokio = { version = "1.28", features = ["full"] }
trybuild = { version = "1.0", features = ["diff"] }
