[gnutls-devel] GnuTLS | gnutls_handshake is slow on some Android devices (Android 9) (#902)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Fri Jan 10 09:28:07 CET 2020

Nikos Mavrogiannopoulos commented:

Ok, I think that's the problem:
> `(TLS1.3)-(DHE-FFDHE8192)-(RSA-PSS-RSAE-SHA384)-(AES-256-GCM)`

You negotiate Finite Field Diffie-Hellman with 8k parameters. That's an enormous value, and indeed it will be very slow on android or even normal PCs. On gnutls 3.6.8 an additional safety check was introduced for FFDHE which would reduce its speed as you noticed. So the issue I think was identified.

What can be a solution?

Reduce the FFDHE negotiated size or use elliptic curves. FFDHE is not negotiated by default by gnutls so you should be explicitly enabling it. I'd recommend to use +GROUP-X25519 and that will drop the connection time significantly. To give you some idea of the scale:
 - 19.04 transactions/sec
 - avg. handshake time: 52.52 ms
 - standard deviation: 2.10 ms

 - 199.52 transactions/sec
 - avg. handshake time: 5.01 ms
 - standard deviation: 0.85 ms

X25519 is 10 times more efficient than FFDHE3072. The different with 8192, will be on great scale.

Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/issues/902#note_269592415
You're receiving this email because of your account on gitlab.com.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20200110/53d39730/attachment.html>

More information about the Gnutls-devel mailing list