<?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 — RSA signing and verificaiton]]></title>
		<link>https://www.wolfssl.com/forums/topic809-rsa-signing-and-verificaiton.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic809.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in RSA signing and verificaiton.]]></description>
		<lastBuildDate>Tue, 14 Jun 2016 19:38:03 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: RSA signing and verificaiton]]></title>
			<link>https://www.wolfssl.com/forums/post2535.html#p2535</link>
			<description><![CDATA[<p>Hi,</p><p><strong>RsaSSL_Sign()</strong> does not do a hash operation on the input data before signing.&nbsp; Your application will need to hash the input data before passing it in for signing.</p><p>wolfCrypt&#039;s hash functions are prototyped by the respective header file, ie:</p><div class="codebox"><pre><code>&lt;wolfssl/wolfcrypt/sha.h&gt;
&lt;wolfssl/wolfcrypt/sha256.h&gt;
&lt;wolfssl/wolfcrypt/sha512.h&gt;</code></pre></div><p>The heap usage doesn&#039;t look out of the expected range.&nbsp; By default, wolfSSL and wolfCrypt use the normal big integer library for public key calculations and operations.&nbsp; Alternatively, you can use the &quot;fastmath&quot; library instead.&nbsp; The fastmath library puts more on the stack and less on the heap, whereas the big integer library uses more heap and less stack.&nbsp; If you wanted to use less heap, you could enable the fastmath library by defining:</p><p><strong>USE_FAST_MATH<br />TFM_TIMING_RESISTANT</strong></p><p>Best Regards,<br />Chris</p>]]></description>
			<author><![CDATA[null@example.com (chrisc)]]></author>
			<pubDate>Tue, 14 Jun 2016 19:38:03 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2535.html#p2535</guid>
		</item>
		<item>
			<title><![CDATA[Re: RSA signing and verificaiton]]></title>
			<link>https://www.wolfssl.com/forums/post2534.html#p2534</link>
			<description><![CDATA[<p>thanks Chris for the reply...</p><p>Below are the defines with which the application is compiled in addition to whatever is enabled default in the .c and .h files<br />HAVE_CONFIG_H, SINGLE_THREADED, CYASSL_KEY_GEN</p><p>I will go through the link you have posted...</p><p>Few more details...</p><p>I am trying to get the RSA based signature verification done via the below API calls, available as part of rsa.c:</p><p>SSL_Sign<br />SSL_Verify</p><p>I suppose hashing the message is done as part of this call and doesn&#039;t need to be separately done.</p><p>Heap size allocation is 3KB. I hope this should be sufficient enough for all the dynamic memory allocation involved.</p><p>Anything specific needs to be taken care as I am trying to get this done on a bare metal system.(No OS involved)</p><p>Hard fault happens in random prime number generation part of RSA key generation.</p><p>Update:<br />---------</p><p>I was able to get the key generated by increasing the heap size. 8 KB for a 512 bit key and 12 KB for a 1024 bit key. Is this as expected or am I doing something wrong?</p><p>Another thing that requires clarification is if I sign a byte array does it encrypt it as well or just creates a signature of the byte array and returns me back. The reason why I am asking this is when I verify the output byte array of Sign call I get back my input byte array(the one I was interested in signing).</p><p>Please suggest.</p>]]></description>
			<author><![CDATA[null@example.com (hariharan_510)]]></author>
			<pubDate>Fri, 10 Jun 2016 16:50:06 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2534.html#p2534</guid>
		</item>
		<item>
			<title><![CDATA[Re: RSA signing and verificaiton]]></title>
			<link>https://www.wolfssl.com/forums/post2533.html#p2533</link>
			<description><![CDATA[<p>Hi,</p><p>Can you double check to make sure your application is getting compiled with the same preprocessor defines that wolfSSL was compiled with?&nbsp; Sometimes a mismatch in settings can cause seg fault issues with the math libraries.</p><p>Also, for reference, we have a sign/verify example available in the following location.&nbsp; This includes an example of doing a sign/verify with both ECC and RSA:</p><p><a href="https://github.com/wolfSSL/wolfssl-examples/tree/master/signature">https://github.com/wolfSSL/wolfssl-exam … /signature</a></p><p>Thanks,<br />Chris</p>]]></description>
			<author><![CDATA[null@example.com (chrisc)]]></author>
			<pubDate>Fri, 10 Jun 2016 15:32:36 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2533.html#p2533</guid>
		</item>
		<item>
			<title><![CDATA[RSA signing and verificaiton]]></title>
			<link>https://www.wolfssl.com/forums/post2532.html#p2532</link>
			<description><![CDATA[<p>Hello all.. I am trying to get the RSA cryptography part of the wolfSSL library 3.3.0 work with a Cortex M3 based microcontroller(No operating system involved) with the Keil IDE. All I am trying to do is sign a byte array and verify it back using the private and public key available as&nbsp; part of the MakeRsaKey() function call respectively. </p><p>However I am stuck with this MakeRsaKey function call. For a 512 bit key, the system is crashing with a hard fault whereas for a 1024 bit key, I am getting an out of memory error.</p><p>Any thoughts??</p>]]></description>
			<author><![CDATA[null@example.com (hariharan_510)]]></author>
			<pubDate>Fri, 10 Jun 2016 15:18:59 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2532.html#p2532</guid>
		</item>
	</channel>
</rss>
