Public/Private Key Generation
The private and the corresponding public key can be generated
Private and public key can be passed to the factories. However, if you choose a factory method with no public/private key parameter, they will be automatically generated.
Enable RSA En/Decryption
Use the ConnectionFactory to create a secure connection.
There is nothing to consider while using RSA. (No code adjustments either) Establishing a UDP connection with a SecureTcpConnection will automatically create a SecureUdpConnection.
- RSA isn’t enabled instantly. The connection does equal a normal TCP/UDP connection till the handshake (exchanging public key) has been done. Thus, avoid sending sensitive data right after the factory call.
- RSA connections are slower; compared to normal connections.
- RSA packets are larger; compared to nromal packets.
Switch current code-base to RSA
Simply replace .CreateClientConnectionContainer with .CreateSecureConnectionContainer and .CreateServerConnectionContainer with .CreateSecureServerConnectionContainer.