OpenSSL/DTLS Support in Nim

2023-01-10 Thread Metaltron
@federico3 Ah, that's a shame, but understandable. Thanks for the links! The TFTP protocol provides a basic retransmission scheme. I believe the authors chose UDP because it was the simplest available, though it's not a requirement. I could switch to TCP, but I'm enjoying figuring this all out

OpenSSL/DTLS Support in Nim

2023-01-10 Thread mratsim
That's not enough, the client and server need to negotiate the secret key to be able to use encryption (or better AEAD, authenticated encryption). In libsodium that's in the key exchange session: Note that creating protocols like this is the dangerous p

OpenSSL/DTLS Support in Nim

2023-01-10 Thread federico3
You can implement encryption using but doing file transfer over UDP would require implementing retransmission and ideally also congestion control.

OpenSSL/DTLS Support in Nim

2023-01-09 Thread mratsim
There is no DTLS support in Nim. This is something that we will likely slowly work toward at Status (Nim biggest backer ) as it's needed for WebRTC. > Is there any way to request this feature in future? Networks aren't my forte, > so it's all a bit above me,

OpenSSL/DTLS Support in Nim

2023-01-09 Thread federico3
`std/openssl` is meant to provide only a minimal subset of OpenSSL functions to provide TLS.

OpenSSL/DTLS Support in Nim

2023-01-09 Thread Metaltron
As a fun project to learn Nim (enjoying it so far!), I've decided to make a simple [TFTP](https://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol) client/server program. One thing I wanted to try, was adding encryption to the UDP traffic (maybe with a new TFTP option). It looks like this c