1 unstable release

0.0.1 Oct 17, 2024

#22 in #datagram

Download history 131/week @ 2024-10-12 27/week @ 2024-10-19 1/week @ 2024-10-26 12/week @ 2024-11-02 1/week @ 2024-11-09

77 downloads per month

MIT license

26KB
555 lines

Datagram Connections 🚀

Crates.io Documentation

The datagram-connections crate implements a challenge-and-response protocol for securely acquiring connections over datagrams. It includes both a client and host part, making it easy to establish and maintain connections with integrity and security.

Features ✨

  • Challenge Protocol: Secure your connections with a challenge-response handshake.
  • Client and Host Implementation: Both sides of the connection are supported out of the box.
  • Efficient Datagram Handling: Encode and decode datagrams with ease.
  • Secure Random Number Generation 🎲: Leverage cryptographic random values for secure nonce generation.

How it Works ⚙️

Client Connection Flow 💻

  1. Challenge Phase: The client initiates a challenge by sending a nonce.
  2. Connecting Phase: After receiving the server's challenge response, the client sends a connect request.
  3. Connected Phase: Once the server validates the request, the client is considered connected and can send/receive packets.

Host Response Flow 🏠

  1. Challenge Response: The host sends a challenge response with its own nonce.
  2. Connection Validation: The host validates incoming connection requests using the nonce and establishes the connection.

Get started

[dependencies]
datagram-connections = "0.0.2"

Dependencies

~140–340KB