Registry / crypto / p256
library0.13.2rscratesunverified

Pure Rust implementation of the NIST P-256 elliptic curve with support for ECDH, ECDSA, and curve arithmetic.

# Cargo.toml [dependencies] p256 = "0.13.2"
INSTALL
IMPORT
SIG · P256
P
p256
cryptorustv0.13.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SigningKey
use p256::ecdsa::SigningKey;

Generate a P-256 ECDSA signing key and sign a message.

use p256::ecdsa::{SigningKey, signature::Signer}; use rand_core::OsRng; fn main() { let signing_key = SigningKey::random(&mut OsRng); let message = b"hello world"; let signature = signing_key.sign(message); println!("Signature: {:?}", signature); }
Debug
Known issues
gotchaRequires the `ecdsa` feature for ECDSA functionality.
fix
Add `features = ["ecdsa"]` to the p256 dependency in Cargo.toml.
affects: >=0.10.0
Upgrade
Version history
0.13.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
p256 — cargo add p256 · libregistry