<?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 — [SOLVED] MP_EXPTMOD_E during SSL handshake]]></title>
		<link>https://www.wolfssl.com/forums/topic725-solved-mpexptmode-during-ssl-handshake.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic725.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in [SOLVED] MP_EXPTMOD_E during SSL handshake.]]></description>
		<lastBuildDate>Wed, 21 Oct 2015 11:41:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] MP_EXPTMOD_E during SSL handshake]]></title>
			<link>https://www.wolfssl.com/forums/post2265.html#p2265</link>
			<description><![CDATA[<p>Is it correct to assume that P-&gt;used times the compiled architecture size equals the key length in bit?&nbsp; </p><p>If thats true, I think that in one test environment RSA is done using a 2048 (32 * 64bit) long key while in the other it&#039;s a 3072 (96*32bit) long key.</p><p>This brought me to the idea to raise FP_MAX_BITS to 8192. I will test this.</p><br /><div class="quotebox"><blockquote><p>&quot;⁠When using RSA keys, always prefer key lengths of at least 3072 bits signed by at least SHA-256, which is sufficiently large for true 128 bits of security.&quot; <a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Hardening_TLS_Configuration.html">https://access.redhat.com/documentation … ation.html</a></p></blockquote></div><p> </p><p>So I think it might be reasonable to think about raising the FP_MAX_BITS in general.</p><p><strong>Update:</strong> Successfully tested.<br /><strong>Related:</strong> <a href="http://www.yassl.com/forums/topic585-solved-configuremake-options-for-largemodulus-dh.html">http://www.yassl.com/forums/topic585-so … us-dh.html</a></p>]]></description>
			<author><![CDATA[null@example.com (jakobsa)]]></author>
			<pubDate>Wed, 21 Oct 2015 11:41:14 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2265.html#p2265</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] MP_EXPTMOD_E during SSL handshake]]></title>
			<link>https://www.wolfssl.com/forums/post2260.html#p2260</link>
			<description><![CDATA[<p>Hi,</p><p>we came across the problem that during the SSL Handshake (using <strong>ECDHE-RSA-AES128-GCM-SHA256</strong>)<br />WolfSSL is returning with <strong>VERIFY_SIGN_ERROR (-330)</strong>. The Error occurs in one test environment while on<br />another everything works as expected. In both environments WOLFSSL is used on the client side. While the servers SSL Stack is unknown.</p><p>We tracked the error down further and found that a call to <strong>mp_exptmod()</strong> results in <strong>MP_EXPTMOD_E</strong></p><p>That happens <strong>during processing server key exchange</strong> (which is printed out right before)</p><p>Digging further down we found the following condition to be the reason for that behavior:</p><p>(TAG 3.6.9) tfm.c:1206 <strong>if (P-&gt;used &gt; (FP_SIZE/2))</strong></p><p>We have logged the parameters from both of the machines:</p><p>In our test environment (Client compiled for and runs on iOS Simulator 64Bit) no1 the parameters are<br /><strong>P-&gt;used:&nbsp; &nbsp; 32<br />FP_SIZE/2: 36 --&gt; sizeof(fp_digit) == 8 (64Bit mode)</strong></p><p>Result: handshake succeeds</p><p>In the second test envioronment (Client compiled for and runs on iOS Device 64Bit) the condition matches with the following values:<br /><strong>P-&gt;used:&nbsp; &nbsp; 96<br />FP_SIZE/2: 68 --&gt; sizeof(fp_digit) == 4 (compiled for 32Bit mode, I think ARM64 is not supported)</strong></p><p>Result: VERIFY_SIGN_ERROR due tue MP_EXPTMOD_E due to FP_VAL returned by fp_exptmod</p><br /><p>We need some suggestion on how to proceed from here. We are unsure if the problem is due to a client or server problem.<br />We use wolfssl 3.6.9 in an iOS environment and have build with the following settings:</p><p>#define SIZEOF_LONG_LONG 8<br />#define OPENSSL_EXTRA<br />#define DEBUG_WOLFSSL<br />#define SESSION_CERTS<br />#define WOLFSSL_STATIC_PSK<br />#define HAVE_AESGCM<br />#define HAVE_ECC<br />#define HAVE_PK_CALLBACKS<br />#define ATOMIC_USER<br />#define USE_FAST_MATH<br />#define TFM_ECC256<br />#define ECC_SHAMIR<br />#define HAVE_CRL<br />#define PERSIST_SESSION_CACHE<br />#define PERSIST_CERT_CACHE<br />#define NO_DSA<br />#define NO_HC128<br />#define NO_RABBIT<br />#define NO_MD4</p><p>Thank you very much!</p>]]></description>
			<author><![CDATA[null@example.com (jakobsa)]]></author>
			<pubDate>Tue, 20 Oct 2015 16:37:03 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2260.html#p2260</guid>
		</item>
	</channel>
</rss>
