Crate defuse_crypto

Source
Expand description

Internal cryptographic primitives used across the Intents ecosystem.

This crate defines lightweight traits such as Payload and SignedPayload that allow Intents to treat messages from different signing standards uniformly. Implementations of these traits live in companion crates like tip191, erc191, or bip322 and are primarily intended for internal use.

Modules§

serde

Structs§

Ed25519
Ed25519PublicKey
Ed25519Signature
P256
P256CompressedPublicKey
Compressed public key, i.e. x coordinate with leading SEC1 tag byte
P256Signature
P256UncompressedPublicKey
Concatenated x || y coordinates with no leading SEC1 tag byte
Secp256k1
Secp256k1PublicKey
Secp256k1Signature

Enums§

CurveType
ParseCurveError
PublicKey
Signature

Traits§

Curve
Payload
Data that can be deterministically hashed for signing or verification.
SignedPayload
Extension of Payload for types that include a signature.
TypedCurve

Functions§

compress_public_key
Converts from untagged uncompressed form (i.e. concatenated x || y coordinates with no leading SEC1 tag byte) into compressed form (i.e. x coordinate with leading SEC1 tag byte)

Type Aliases§

CryptoHash
Raw type for 32 bytes of the hash.