A sample application demonstrating how to implement DTLS over UDP using BIO Pair for secure, authenticated communication.
Chat-Sample-using-DTLS
This tool is designed to showcase how to upgrade legacy UDP communication to use DTLS for encrypted and authenticated data exchange, solving the challenge of session management in UDP. It is useful for developers and security researchers working on secure network communication protocols who want to understand or implement DTLS with mutual authentication.
Requires OpenSSL version 1.0.2d or higher. The server and client mutually authenticate using a strong cipher suite (tls_dhe_rsa_with_aes_256_gcm_sha384). This sample is intended for educational and demonstration purposes to understand DTLS session management over UDP using BIO Pair.
Run `make` to compile the source files
Compile the server with `gcc -o udpserver -Wall -g serv.o dtlsplex.o peer.o -lssl -lcrypto -ldl -lpthread`
Compile the client with `gcc -o udpcli -Wall -g cli.o dtlsplex.o peer.o -lssl -lcrypto -ldl -lpthread`
./udpserver
Starts the DTLS-enabled UDP server
./udpcli 192.168.1.152 2053
Starts the DTLS-enabled UDP client connecting to server at IP 192.168.1.152 on port 2053