ciphern 0.2.1

Enterprise-grade cryptographic library
Documentation
[package]
name = "ciphern"
version = "0.2.1"
edition = "2021"
authors = ["Kirky.X <Kirky-X@outlook.com>"]
description = "Enterprise-grade cryptographic library"
license = "MIT"
repository = "https://github.com/Kirky-X/ciphern"
homepage = "https://github.com/Kirky-X/ciphern"
documentation = "https://docs.rs/ciphern"
keywords = ["cryptography", "encryption", "security", "aes", "sm4"]
categories = ["cryptography", "no-std"]
readme = "README.md"

[dependencies]
ring = "0.17.8"
cpufeatures = { version = "0.2.14", optional = true }
hex = "0.4.3"
sha2 = "0.10.8"
chrono = { version = "0.4.38", features = ["serde"] }
getrandom = "0.2.15"
rand = { version = "0.8.5", features = ["small_rng"] }
toml = "0.9"
serde_json = "1.0.147"
serde = { version = "1.0.228", features = ["derive"] }
ctr = "0.9.2"
cipher = "0.4.4"
sm4 = "0.5.1"
sm3 = "0.5.0-rc.3"
aes-gcm = "0.10.3"
rayon = { version = "1.10.0", optional = true }
zeroize = { version = "1.8.2", features = ["derive", "zeroize_derive"] }
libsm = "0.6.0"
thiserror = "2.0.17"
ghash = "0.5.1"
hmac = "0.12"
subtle = "2.6.0"
argon2 = "0.5.3"
pbkdf2 = { version = "0.12.2", features = ["simple"] }
openssl = "0.10.68"
uuid = { version = "1.11.0", features = ["v4"] }
log = "0.4.29"
prometheus = "0.14.0"
lazy_static = "1.5.0"
once_cell = "1.21.3"
rand_chacha = "0.3.1"
rustfft = "6.1.0"
libc = "0.2.162"

# Optional FFI dependencies
jni = { version = "0.21.1", optional = true }
pyo3 = { version = "0.27.2", features = ["extension-module"], optional = true }
libloading = { version = "0.9.0", optional = true }

# Optional GPU dependencies
cudarc = { version = "0.18.2", optional = true, default-features = false, features = ["dynamic-linking", "cuda-13000", "driver"] }
ocl = { version = "0.19", optional = true, default-features = false }

# Crypto dependencies for GPU kernels
ecdsa = { version = "0.16.9", optional = true, default-features = false, features = ["signing", "verifying", "arithmetic"] }
ed25519-dalek = { version = "2.1.1", optional = true, default-features = false }
pkcs8 = { version = "0.10.2", optional = true }
p256 = { version = "0.13.2", optional = true, features = ["ecdsa"] }
p384 = { version = "0.13.0", optional = true, features = ["ecdsa"] }
p521 = { version = "0.13.0", optional = true, features = ["ecdsa"] }

# Enable cpufeatures for aarch64 targets
[target.aarch64-unknown-linux-gnu.dependencies]
cpufeatures = "0.2.14"

[target.aarch64-apple-darwin.dependencies]
cpufeatures = "0.2.14"

[dev-dependencies]
criterion = { version = "0.8.1", features = ["html_reports"] }
tempfile = "3.24.0"

[features]
default = ["std", "fips", "hash", "encrypt", "kdf", "c_ffi", "i18n", "parallel"]
std = []
fips = []
hash = []
encrypt = []
kdf = ["encrypt"]
parallel = ["rayon"]
c_ffi = []
java_ffi = ["jni", "c_ffi"]
python_ffi = ["pyo3"]
plugin = ["libloading"]
generate_headers = []
post_quantum = []
i18n = []

# GPU Acceleration Features
gpu = ["dep:cudarc", "dep:ecdsa", "dep:ed25519-dalek", "dep:p256", "dep:p384", "dep:p521", "gpu-cuda"]
gpu-cuda = ["gpu", "dep:cudarc", "dep:ecdsa", "dep:ed25519-dalek", "dep:p256", "dep:p384", "dep:p521"]
gpu-opencl = ["gpu", "dep:ocl", "dep:ecdsa", "dep:ed25519-dalek", "dep:p256", "dep:p384", "dep:p521"]

# CPU Acceleration Features
cpu-aesni = ["cpufeatures"]

# SIMD Acceleration Features
simd = []

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = true
panic = "abort"

[profile.dev]
debug = true

[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1


[[bench]]
name = "cipher_bench"
harness = false

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

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

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

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

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

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

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

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

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

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