Skip to main content

Crate auths_crypto

Crate auths_crypto 

Source
Expand description

Cryptographic primitives for Auths.

Layer 0: a curve-agnostic provider abstraction (sign / verify / keygen / AEAD / KDF), key parsing, and did:key encoding, isolated from concrete backends to keep everything above dependency-light. The default curve is P-256 (the iOS Secure Enclave only supports P-256); Ed25519 is a fully-supported peer. Keys, seeds, and signatures carry their curve tag in-band — never dispatch on byte length. See README.md for the full curve policy and build profiles.

Re-exports§

pub use did_key::DecodedDidKey;
pub use did_key::DidKeyError;
pub use did_key::did_key_decode;
pub use did_key::did_key_to_p256;
pub use did_key::ed25519_pubkey_to_did_keri;
pub use error::AuthsErrorInfo;
pub use hash256::Hash256;
pub use key_material::build_ed25519_pkcs8_v2;
pub use key_material::parse_ed25519_key_material;
pub use key_material::parse_ed25519_seed;
pub use key_ops::ParsedKey;
pub use key_ops::TypedSeed;
pub use key_ops::TypedSignerKey;
pub use key_ops::normalize_verkey;
pub use key_ops::parse_key_material;
pub use key_ops::public_key as typed_public_key;
pub use key_ops::sign as typed_sign;
pub use pkcs8::Pkcs8Der;
pub use provider::default_provider;
pub use provider::CryptoError;
pub use provider::CryptoProvider;
pub use provider::CurveType;
pub use provider::ED25519_PUBLIC_KEY_LEN;
pub use provider::ED25519_SIGNATURE_LEN;
pub use provider::P256_PUBLIC_KEY_LEN;
pub use provider::P256_SIGNATURE_LEN;
pub use provider::SecureSeed;
pub use provider::SeedDecodeError;
pub use provider::decode_seed_hex;
pub use ring_provider::RingCryptoProvider;
pub use secret::Secret;
pub use ssh::SshKeyError;
pub use ssh::openssh_pub_to_raw;

Modules§

did_key
DID:key encoding and decoding for Ed25519 and P-256 public keys.
error
Shared error trait for structured error codes across all Auths crates.
hash256
Typed newtype for 32-byte hash digests.
key_material
Curve-agnostic key material parsing from various serialization formats.
key_ops
Curve-agnostic key operations.
pkcs8
Type-safe wrapper for PKCS#8 DER-encoded private key material.
provider
Curve-agnostic cryptographic abstraction supporting Ed25519 and ECDSA P-256.
ring_provider
secret
The Secret marker trait — type-level annotation for secret-bearing types.
ssh
OpenSSH public key parsing for Ed25519 and P-256 keys.