uselesskey-ecdsa
ECDSA P-256/P-384 key fixtures for testing — generates PKCS#8 private keys and SPKI public keys (PEM/DER) for ES256 and ES384 workflows, with deterministic derivation and cache-by-identity.
Part of the uselesskey workspace. Use
the facade crate for the simplest experience, or depend on this crate directly
for minimal compile time.
Usage
use Factory;
use ;
let fx = random;
let keypair = fx.ecdsa;
// Private key
let private_pem = keypair.private_key_pkcs8_pem;
let private_der = keypair.private_key_pkcs8_der;
// Public key
let public_pem = keypair.public_key_spki_pem;
let public_der = keypair.public_key_spki_der;
assert!;
Specs
| Constructor | Curve |
|---|---|
EcdsaSpec::es256() |
P-256 (secp256r1) |
EcdsaSpec::es384() |
P-384 (secp384r1) |
Negative Fixtures
use Factory;
use CorruptPem;
use ;
let fx = random;
let keypair = fx.ecdsa;
let bad_pem = keypair.private_key_pkcs8_pem_corrupt;
let truncated = keypair.private_key_pkcs8_der_truncated;
let mismatch = keypair.mismatched_public_key_spki_der;
Features
| Feature | Description |
|---|---|
jwk |
JWK/JWKS output via uselesskey-jwk |
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
See the uselesskey crate for full
documentation.