Crate relay_auth

source ·
Expand description

Authentication and crypto for Relay.

This library contains the PublicKey and SecretKey types, which can be used to validate and sign traffic between Relays in authenticated endpoints. Additionally, Relays identify via a RelayId, which is included in the request signature and headers.

Relay uses Ed25519 at the moment. This is considered an implementation detail and is subject to change at any time. Do not rely on a specific signing mechanism.

Generating Credentials

Use the generate_relay_id and generate_key_pair function to generate credentials:

let relay_id = relay_auth::generate_relay_id();
let (private_key, public_key) = relay_auth::generate_key_pair();





Type Aliases

  • Alias for Relay IDs (UUIDs).