gmcrypto-core 0.7.0

Constant-time-designed pure-Rust SM2/SM3 primitives (no_std + alloc) with an in-CI dudect timing-leak regression harness
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 = "2024"
rust-version = "1.85"
name = "gmcrypto-core"
version = "0.7.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Constant-time-designed pure-Rust SM2/SM3 primitives (no_std + alloc) with an in-CI dudect timing-leak regression harness"
readme = "README.md"
keywords = [
    "sm2",
    "sm3",
    "gm-crypto",
    "no-std",
    "constant-time",
]
categories = [
    "cryptography",
    "no-std",
]
license = "Apache-2.0"
repository = "https://github.com/frankxue831/gm-crypto-rs"
resolver = "2"

[package.metadata.docs.rs]
all-features = true

[features]
cipher-traits = ["dep:cipher"]
crypto-bigint-scalar = []
default = []
digest-traits = ["dep:digest"]
sm4-bitsliced = []
sm4-bitsliced-simd = [
    "sm4-bitsliced",
    "dep:gmcrypto-simd",
]

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

[[test]]
name = "interop_gmssl"
path = "tests/interop_gmssl.rs"

[[test]]
name = "rustcrypto_traits"
path = "tests/rustcrypto_traits.rs"
required-features = [
    "digest-traits",
    "cipher-traits",
]

[[test]]
name = "sm4_batch_api"
path = "tests/sm4_batch_api.rs"

[[test]]
name = "sm4_ctr_kat"
path = "tests/sm4_ctr_kat.rs"

[[test]]
name = "v0_3_pkcs8_kat"
path = "tests/v0_3_pkcs8_kat.rs"

[[bench]]
name = "timing_leaks"
path = "benches/timing_leaks.rs"
harness = false
required-features = ["crypto-bigint-scalar"]

[dependencies.cipher]
version = "0.4"
optional = true
default-features = false

[dependencies.crypto-bigint]
version = "0.7.3"
features = [
    "subtle",
    "zeroize",
]
default-features = false

[dependencies.digest]
version = "0.10"
features = ["mac"]
optional = true
default-features = false

[dependencies.gmcrypto-simd]
version = "0.7"
optional = true
default-features = false

[dependencies.rand_core]
version = "0.10.1"
default-features = false

[dependencies.spin]
version = "0.10"
features = ["once"]
default-features = false

[dependencies.subtle]
version = "2.6.1"
default-features = false

[dependencies.zeroize]
version = "1.8.2"
features = ["derive"]
default-features = false

[dev-dependencies.dudect-bencher]
version = "0.7.0"

[dev-dependencies.getrandom]
version = "0.4.2"
features = ["sys_rng"]
default-features = false

[dev-dependencies.hex-literal]
version = "1.1.0"

[lints.clippy]
module_name_repetitions = "allow"
must_use_candidate = "allow"

[lints.clippy.cargo]
level = "warn"
priority = -1

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.rust]
missing_docs = "warn"
unsafe_code = "forbid"