This appears to be reasonably trivial if using the ssl module for TCP communication, but how would encrypted communication be done via UDP?
Can the ssl module still be used? if so, what steps would need to be performed for the client and server to be in a position where data can be sent to-and-fro as normal?
DTLS is a TLS (aka SSL) derivative designed for use over datagram transports, like UDP.
OpenSSL supports DTLS starting in 0.9.8, using DTLSv1_METHOD instead of SSLv23_METHOD or TLSv1_METHOD or similar.
You could use pyCrypto or ezPyCrypto to manually encrypt/decrypt the packets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With