[package]
edition = "2024"
rust-version = "1.85"
name = "p256"
version = "0.14.0"
authors = ["RustCrypto Developers"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
Pure Rust implementation of the NIST P-256 (a.k.a. secp256r1, prime256v1)
elliptic curve as defined in SP 800-186, with support for ECDH, ECDSA
signing/verification, and general purpose curve arithmetic
"""
homepage = "https://github.com/RustCrypto/elliptic-curves/tree/master/p256"
documentation = "https://docs.rs/p256"
readme = "README.md"
keywords = [
"crypto",
"ecc",
"nist",
"prime256v1",
"secp256r1",
]
categories = [
"cryptography",
"no-std",
]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/RustCrypto/elliptic-curves"
resolver = "2"
[package.metadata.docs.rs]
all-features = true
[features]
alloc = [
"ecdsa-core?/alloc",
"elliptic-curve/alloc",
"primeorder?/alloc",
]
arithmetic = [
"dep:primefield",
"dep:primeorder",
"elliptic-curve/arithmetic",
]
default = [
"arithmetic",
"ecdsa",
"pem",
"precomputed-tables",
"std",
]
digest = ["ecdsa-core/digest"]
ecdh = [
"arithmetic",
"elliptic-curve/ecdh",
]
ecdsa = [
"arithmetic",
"ecdsa-core/algorithm",
"sha256",
]
getrandom = ["elliptic-curve/getrandom"]
group-digest = [
"hash2curve",
"sha2",
]
hash2curve = [
"arithmetic",
"dep:hash2curve",
"primeorder/hash2curve",
]
oprf = ["group-digest"]
pem = [
"elliptic-curve/pem",
"ecdsa-core/pem",
"pkcs8",
]
pkcs8 = [
"ecdsa-core?/pkcs8",
"elliptic-curve/pkcs8",
]
precomputed-tables = [
"arithmetic",
"primeorder/basepoint-table",
]
serde = [
"ecdsa-core?/serde",
"elliptic-curve/serde",
"primeorder?/serde",
"serdect",
]
sha256 = [
"digest",
"sha2",
]
std = [
"alloc",
"ecdsa-core?/std",
"elliptic-curve/std",
"getrandom",
"primeorder?/std",
]
test-vectors = ["dep:hex-literal"]
[lib]
name = "p256"
path = "src/lib.rs"
[[test]]
name = "affine"
path = "tests/affine.rs"
[[test]]
name = "ecdsa"
path = "tests/ecdsa.rs"
[[test]]
name = "pkcs8"
path = "tests/pkcs8.rs"
[[test]]
name = "projective"
path = "tests/projective.rs"
[[test]]
name = "scalar"
path = "tests/scalar.rs"
[[bench]]
name = "ecdsa"
path = "benches/ecdsa.rs"
harness = false
required-features = ["ecdsa"]
[[bench]]
name = "field"
path = "benches/field.rs"
harness = false
[[bench]]
name = "point"
path = "benches/point.rs"
harness = false
[[bench]]
name = "scalar"
path = "benches/scalar.rs"
harness = false
[dependencies.ecdsa-core]
version = "0.17"
features = ["der"]
optional = true
default-features = false
package = "ecdsa"
[dependencies.elliptic-curve]
version = "0.14.1"
features = ["sec1"]
default-features = false
[dependencies.hash2curve]
version = "0.14"
optional = true
[dependencies.hex-literal]
version = "1"
optional = true
[dependencies.primefield]
version = "0.14"
optional = true
[dependencies.primeorder]
version = "0.14"
optional = true
[dependencies.serdect]
version = "0.4"
optional = true
default-features = false
[dependencies.sha2]
version = "0.11"
optional = true
default-features = false
[dev-dependencies.criterion]
version = "0.7"
[dev-dependencies.ecdsa-core]
version = "0.17"
features = ["dev"]
default-features = false
package = "ecdsa"
[dev-dependencies.hex-literal]
version = "1"
[dev-dependencies.primefield]
version = "0.14"
[dev-dependencies.primeorder]
version = "0.14"
features = ["dev"]
[dev-dependencies.proptest]
version = "1"
[lints.clippy]
borrow_as_ptr = "warn"
cast_lossless = "warn"
cast_possible_truncation = "warn"
cast_possible_wrap = "warn"
cast_precision_loss = "warn"
cast_sign_loss = "warn"
checked_conversions = "warn"
from_iter_instead_of_collect = "warn"
implicit_saturating_sub = "warn"
manual_assert = "warn"
map_unwrap_or = "warn"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
mod_module_files = "warn"
must_use_candidate = "warn"
needless_range_loop = "allow"
ptr_as_ptr = "warn"
redundant_closure_for_method_calls = "warn"
ref_as_ptr = "warn"
return_self_not_must_use = "warn"
semicolon_if_nothing_returned = "warn"
std_instead_of_alloc = "warn"
std_instead_of_core = "warn"
trivially_copy_pass_by_ref = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_safety_comment = "warn"
unwrap_in_result = "warn"
unwrap_used = "warn"
[lints.rust]
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unused_lifetimes = "warn"
unused_qualifications = "warn"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ['cfg(cpubits, values("16", "32", "64"))']