GameNetworkingSockets icon indicating copy to clipboard operation
GameNetworkingSockets copied to clipboard

Add ChaCha20-Poly1305 crypto cipher support and introduce runtime availability checks for crypto ciphers

Open ManManson opened this issue 8 months ago • 0 comments

This changeset implements the following three major things:

  1. Introduces the support for ChaCha20-Poly1305 crypto cipher for all supported crypto backend libraries (OpenSSL and Libsodium). Libsodium uses the IETF variant of the algorithm, which should be compatible with other conforming implementations (e.g., it should be no problem if one client runs OpenSSL, while another runs libsodium).
  2. Add runtime availability checks for both AES-GCM and ChaCha20-Poly1305 ciphers (IsAvailable() method for the corresponding CipherContext classes).
  3. Libsodium use is not restricted to x86/x86_64 anymore, as ChaCha20-Poly1305 should always be available.

This PR is based on the prior work from @past-due, that was done in the scope of https://github.com/ValveSoftware/GameNetworkingSockets/pull/197

Fixes: https://github.com/ValveSoftware/GameNetworkingSockets/issues/196

ManManson avatar Apr 27 '25 16:04 ManManson