Registry / crypto / k256
library0.13.4rscratesunverified

Pure Rust secp256k1 elliptic curve library supporting ECDSA, Schnorr signatures, ECDH, and general curve operations.

# Cargo.toml [dependencies] k256 = "0.13.4"
INSTALL
IMPORT
SIG · K256
K
k256
cryptorustv0.13.4
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 k256::ecdsa::{SigningKey, VerifyingKey, Signature};

Generates a random secp256k1 key pair and signs/verifies a message.

use k256::ecdsa::{SigningKey, VerifyingKey, Signature}; use k256::elliptic_curve::rand_core::OsRng; let signing_key = SigningKey::random(&mut OsRng); let verifying_key = VerifyingKey::from(&signing_key); let message = b"hello world"; let signature: Signature = signing_key.sign(message); assert!(verifying_key.verify(message, &signature).is_ok());
Debug
Known issues
gotchaRequires the `ecdsa` feature for ECDSA functionality; default features may not include it.
fix
Add `features = ["ecdsa"]` to your Cargo.toml dependency.
affects: >=0.10.0
Upgrade
Version history
0.13.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
k256 — cargo add k256 · libregistry