hardware-enclave 0.2.4

Hardware-backed key management — macOS Secure Enclave, Windows TPM 2.0, Linux TPM/keyring — plus in-process memory protection
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.75"
name = "hardware-enclave"
version = "0.2.4"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Hardware-backed key management — macOS Secure Enclave, Windows TPM 2.0, Linux TPM/keyring — plus in-process memory protection"
documentation = "https://docs.rs/hardware-enclave"
readme = "README.md"
keywords = [
    "security",
    "tpm",
    "secure-enclave",
    "cryptography",
    "memory-protection",
]
categories = [
    "cryptography",
    "os",
    "hardware-support",
]
license = "MIT"
repository = "https://github.com/godaddy/hardware-enclave"

[features]
default = [
    "signing",
    "encryption",
    "memory",
]
encryption = ["signing"]
keyring-storage = []
linux-tpm = []
memory = ["dep:windows"]
mock = []
signing = [
    "dep:anyhow",
    "dep:base64",
    "dep:ciborium",
    "dep:dirs",
    "dep:elliptic-curve",
    "dep:fs2",
    "dep:fs4",
    "dep:p256",
    "dep:serde",
    "dep:serde_json",
    "dep:shlex",
    "dep:tempfile",
    "dep:toml",
    "dep:windows",
    "dep:winresource",
    "dep:keyring",
    "dep:tss-esapi",
]

[lib]
name = "hardware_enclave"
path = "src/lib.rs"

[[example]]
name = "encryption"
path = "examples/encryption.rs"
required-features = [
    "encryption",
    "mock",
]

[[example]]
name = "integrity"
path = "examples/integrity.rs"
required-features = [
    "signing",
    "encryption",
]

[[example]]
name = "memory_protection"
path = "examples/memory_protection.rs"

[[example]]
name = "signing"
path = "examples/signing.rs"
required-features = [
    "signing",
    "mock",
]

[[test]]
name = "examples_ci"
path = "tests/examples_ci.rs"
required-features = [
    "signing",
    "encryption",
]

[dependencies.aes-gcm]
version = "0.10"
features = ["zeroize"]

[dependencies.anyhow]
version = "1"
optional = true

[dependencies.base64]
version = "0.22"
optional = true

[dependencies.ciborium]
version = "0.2"
optional = true

[dependencies.dirs]
version = "6"
optional = true

[dependencies.elliptic-curve]
version = "0.13"
features = ["sec1"]
optional = true

[dependencies.fs2]
version = "0.4"
optional = true

[dependencies.fs4]
version = "0.9"
optional = true

[dependencies.libc]
version = "0.2"

[dependencies.p256]
version = "0.13"
features = [
    "ecdh",
    "ecdsa",
]
optional = true

[dependencies.rand]
version = "0.9"

[dependencies.serde]
version = "1"
features = ["derive"]
optional = true

[dependencies.serde_json]
version = "1"
optional = true

[dependencies.sha2]
version = "0.10"

[dependencies.shlex]
version = "1"
optional = true

[dependencies.subtle]
version = "2"

[dependencies.tempfile]
version = "3"
optional = true

[dependencies.thiserror]
version = "2"

[dependencies.toml]
version = "0.8"
optional = true

[dependencies.tracing]
version = "0.1"

[dependencies.zeroize]
version = "1"
features = ["zeroize_derive"]

[dev-dependencies.p256]
version = "0.13"
features = [
    "ecdh",
    "ecdsa",
]

[dev-dependencies.tempfile]
version = "3"

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
    "fmt",
    "env-filter",
]
default-features = false

[target.'cfg(all(target_os = "linux", target_env = "gnu"))'.dependencies.keyring]
version = "3"
features = [
    "sync-secret-service",
    "apple-native",
    "windows-native",
]
optional = true

[target.'cfg(all(target_os = "linux", target_env = "gnu"))'.dependencies.tss-esapi]
version = "7"
optional = true

[target.'cfg(target_os = "windows")'.dependencies.windows]
version = "0.58"
features = [
    "Win32_Security",
    "Win32_Security_Credentials",
    "Win32_Security_Cryptography",
    "Win32_Foundation",
    "Win32_System_Threading",
    "Win32_System_SystemServices",
    "Win32_System_Memory",
    "Win32_System_Registry",
    "Win32_System_Com",
    "Win32_Graphics_Gdi",
    "Foundation",
    "Security_Credentials_UI",
    "Win32_UI_WindowsAndMessaging",
    "Win32_System_Console",
    "Win32_System_SystemInformation",
    "Win32_Networking_WindowsWebServices",
]
optional = true

[target.'cfg(target_os = "windows")'.dependencies.winresource]
version = "0.1"
optional = true

[lints.clippy]
dbg_macro = "warn"
default_union_representation = "deny"
empty_drop = "warn"
exit = "deny"
fallible_impl_from = "warn"
implicit_clone = "warn"
inefficient_to_string = "warn"
lossy_float_literal = "deny"
macro_use_imports = "warn"
match_same_arms = "warn"
mem_forget = "deny"
multiple_inherent_impl = "deny"
mut_mut = "deny"
no_effect_underscore_binding = "warn"
panic = "warn"
print_stderr = "warn"
print_stdout = "warn"
ptr_as_ptr = "deny"
same_name_method = "warn"
single_char_lifetime_names = "warn"
trait_duplication_in_bounds = "warn"
type_repetition_in_bounds = "warn"
unimplemented = "warn"
unneeded_field_pattern = "warn"
unseparated_literal_suffix = "warn"
unwrap_in_result = "deny"
unwrap_used = "deny"
used_underscore_binding = "warn"
wildcard_dependencies = "deny"

[lints.rust]
ambiguous_negative_literals = "warn"
closure_returning_async_block = "warn"
explicit_outlives_requirements = "warn"
if_let_rescope = "warn"
impl_trait_overcaptures = "warn"
impl_trait_redundant_captures = "warn"
let_underscore_drop = "warn"
macro_use_extern_crate = "warn"
meta_variable_misuse = "warn"
missing_debug_implementations = "warn"
non_ascii_idents = "warn"
noop_method_call = "warn"
redundant_lifetimes = "warn"
single_use_lifetimes = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unit_bindings = "warn"
unsafe_attr_outside_unsafe = "warn"
unsafe_code = "deny"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
variant_size_differences = "warn"

[lints.rust.future_incompatible]
level = "deny"
priority = -1

[lints.rust.rust_2018_idioms]
level = "warn"
priority = -1

[lints.rust.unused]
level = "warn"
priority = -1