<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>


<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.com/nmav">Nikos Mavrogiannopoulos</a>
commented:
</p>
<div style="">
<p dir="auto">Ok, I think that's the problem:</p>
<blockquote dir="auto">
<p><code>(TLS1.3)-(DHE-FFDHE8192)-(RSA-PSS-RSAE-SHA384)-(AES-256-GCM)</code></p>
</blockquote>
<p dir="auto">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.</p>
<p dir="auto">What can be a solution?</p>
<p dir="auto">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:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">(TLS1.3)-(DHE-FFDHE3072)-(RSA-PSS-RSAE-SHA256)-(AES-128-GCM)</span>
<span id="LC2" class="line" lang="plaintext"> - 19.04 transactions/sec</span>
<span id="LC3" class="line" lang="plaintext"> - avg. handshake time: 52.52 ms</span>
<span id="LC4" class="line" lang="plaintext"> - standard deviation: 2.10 ms</span>
<span id="LC5" class="line" lang="plaintext"></span>
<span id="LC6" class="line" lang="plaintext">(TLS1.3)-(ECDHE-X25519)-(RSA-PSS-RSAE-SHA256)-(AES-128-GCM)</span>
<span id="LC7" class="line" lang="plaintext"> - 199.52 transactions/sec</span>
<span id="LC8" class="line" lang="plaintext"> - avg. handshake time: 5.01 ms</span>
<span id="LC9" class="line" lang="plaintext"> - standard deviation: 0.85 ms</span></code></pre>
<p dir="auto">X25519 is 10 times more efficient than FFDHE3072. The different with 8192, will be on great scale.</p>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/issues/902#note_269592415">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/sent_notifications/4c5405c86e2747ebf77fd9cf4754d114/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/issues/902#note_269592415"}}</script>


</p>
</div>
</body>
</html>