<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — 18 seconds to Key Exchange...?]]></title>
		<link>https://www.wolfssl.com/forums/topic1747-18-seconds-to-key-exchange.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1747.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in 18 seconds to Key Exchange...?.]]></description>
		<lastBuildDate>Mon, 17 May 2021 18:46:24 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: 18 seconds to Key Exchange...?]]></title>
			<link>https://www.wolfssl.com/forums/post6036.html#p6036</link>
			<description><![CDATA[<p>Hi Scott,</p><p>See here for a list of SP math build options:<br /><a href="https://github.com/wolfSSL/wolfssl/blob/master/wolfcrypt/src/sp_int.c#L42">https://github.com/wolfSSL/wolfssl/blob … _int.c#L42</a></p><p>For the assembly an you try using `WOLFSSL_SP_ARM32_ASM`</p><p>Try disabling DH (NO_DH) and only use RSA and ECC. For SP related build options try just these:</p><div class="codebox"><pre><code>#define WOLFSSL_SP_MATH
#define WOLFSSL_HAVE_SP_RSA
#define WOLFSSL_HAVE_SP_ECC
#define WOLFSSL_SP_4096
#define WOLFSSL_SP_ARM32_ASM
#define NO_DH
#define HAVE_ECC</code></pre></div><p>Thanks,<br />David Garske, wolfSSL</p>]]></description>
			<author><![CDATA[null@example.com (dgarske)]]></author>
			<pubDate>Mon, 17 May 2021 18:46:24 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6036.html#p6036</guid>
		</item>
		<item>
			<title><![CDATA[Re: 18 seconds to Key Exchange...?]]></title>
			<link>https://www.wolfssl.com/forums/post6035.html#p6035</link>
			<description><![CDATA[<p>David,<br />Thanks but no change.</p><p>Actually it made it worse.&nbsp; See comments associated with my definitions:</p><div class="codebox"><pre><code>//  Speed up tests
#define WOLFSSL_SP_DH
#define WOLFSSL_HAVE_SP_ECC
#define WOLFSSL_SP_4096                &lt;--  Enabled this, but (with the ones below turned off)  still 18 seconds.
//#define WOLFSSL_HAVE_SP_RSA          &lt;--  I enabled these, and it SLOWED to over 20 seconds.  The browser times out and actually NEVER connected
//#define WOLFSSL_HAVE_SP_DH           &lt;--
// #define WOLFSSL_SP_ARM_THUMB_ASM    &lt;--   the TI compiler doesn&#039;t like the inline assembler.


//  New settings, trying to get client to connect
#define    WOLFSSL_AES_256
#define RSA_LOW_MEM
#define WOLFSSL_SHA384
#define WOLFSSL_SHA512</code></pre></div><p>Code size is not really an issue.</p><p>Any other ideas?</p>]]></description>
			<author><![CDATA[null@example.com (Scotty2541)]]></author>
			<pubDate>Mon, 17 May 2021 18:40:50 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6035.html#p6035</guid>
		</item>
		<item>
			<title><![CDATA[Re: 18 seconds to Key Exchange...?]]></title>
			<link>https://www.wolfssl.com/forums/post6034.html#p6034</link>
			<description><![CDATA[<p>Hi Scott,</p><p>Make sure you set `WOLFSSL_SP_4096` to enable 4096-bit support for SP math. Also set `WOLFSSL_HAVE_SP_RSA` and `WOLFSSL_HAVE_SP_DH` to speedup RSA/DH with SP math.</p><p>For this A8 you can also enable SP assembly speedups for RSA/DH and ECC using `WOLFSSL_SP_ARM_THUMB_ASM`. If the code size grows too large you can use `WOLFSSL_SP_SMALL`. You might also consider disabling DH and use just ECDHE for the key share using `NO_DH`.</p><p>Thanks,<br />David Garske, wolfSSL</p>]]></description>
			<author><![CDATA[null@example.com (dgarske)]]></author>
			<pubDate>Mon, 17 May 2021 18:10:27 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6034.html#p6034</guid>
		</item>
		<item>
			<title><![CDATA[18 seconds to Key Exchange...?]]></title>
			<link>https://www.wolfssl.com/forums/post6033.html#p6033</link>
			<description><![CDATA[<p>Hello,<br />I am using version 4.7 in a TI SYSBIOS RTOS environment, running on an A8 am335x MCU.</p><p>A TCP/IP socket server is running in the device. I am connecting to it with a chrome browser.</p><p>The server in the ARM device has self signed certificates.&nbsp; So naturally the browser gives a prompt and warning.</p><p>When using a 2048 bit cert key, the page appears within 1/2 second.</p><p>When using a 4096 bit key, it takes 18 seconds.&nbsp; (Actually it take more because apparently, the browser is failing and reconnecting...&nbsp; so it is really 38 seconds).</p><p>It is even sucking all the MCU time from the TI RTOS tasks, as nothing else runs while it is doing whatever this math is.</p><p>I have tried many of these settings in this thread, <a href="https://www.wolfssl.com/forums/post5516.html#p5516">https://www.wolfssl.com/forums/post5516.html#p5516</a><br />however nothing budges. </p><p>Currently, the settings I have defined are:</p><div class="codebox"><pre><code>#define USE_FAST_MATH
#define ALT_ECC_SIZE

#define OPENSSL_EXTRA        /*   */

//  From the &quot;settings.h&quot;
    #define FP_MAX_BITS 8192        /*  Increase for 4096 bit key */
    #define USE_CERT_BUFFERS_2048
    #define USE_CERT_BUFFERS_4096
    #define HAVE_ECC
    #define HAVE_ALPN
    #define USE_WOLF_STRTOK /* use with HAVE_ALPN */
    #define HAVE_TLS_EXTENSIONS
    #define HAVE_AESGCM

//  Speed up tests
#define WOLFSSL_SP_DH
#define WOLFSSL_HAVE_SP_ECC


//  New settings, trying to get client to connect
#define    WOLFSSL_AES_256
#define RSA_LOW_MEM
#define WOLFSSL_SHA384
#define WOLFSSL_SHA512

#define NO_PSK
#define HAVE_AESGCM
#define ECC_USER_CURVES
#define ECC_SHAMIR
#define WOLFSSL_RIPEMD
#define HAVE_EXTENDED_MASTER</code></pre></div><br /><p>I also have wireshark traces for both certificates (2048 = okay, 4096 = SLOW). They are zipped and attached.<br />(IP ...93 is the server, IP ...111 is my browser laptop connecting to it)</p><p>Any advice appreciated.</p><p>-Scott</p>]]></description>
			<author><![CDATA[null@example.com (Scotty2541)]]></author>
			<pubDate>Mon, 17 May 2021 17:50:38 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6033.html#p6033</guid>
		</item>
	</channel>
</rss>
