<?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 — Wolfcrypt minimum RAM footprint for RSA2048 or ECC384]]></title>
		<link>https://www.wolfssl.com/forums/topic1824-wolfcrypt-minimum-ram-footprint-for-rsa2048-or-ecc384.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1824.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Wolfcrypt minimum RAM footprint for RSA2048 or ECC384.]]></description>
		<lastBuildDate>Wed, 10 Nov 2021 17:03:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Wolfcrypt minimum RAM footprint for RSA2048 or ECC384]]></title>
			<link>https://www.wolfssl.com/forums/post6358.html#p6358</link>
			<description><![CDATA[<p>Hi swapnil,</p><p>To be clear the default sizes of the static memory buckets are not tuned for your use-case. So you will want to supply custom buckets appropriately sized to optimize use.</p><p>Example:<br />#define WOLFMEM_BUCKETS=64,256,384,432,512,1632,2976,3456,16128<br />#define WOLFMEM_DIST=16,8,6,4,6,3,2,1,1&quot;</p><p>You might also try: #define ALT_ECC_SIZE or if use ECC only adjust your #define FP_MAX_BITS (256*2).</p><p>For debugging the sizes try using `WOLFSSL_DEBUG_MEMORY`.</p><p>Thanks,<br />David Garske, wolfSSL</p>]]></description>
			<author><![CDATA[null@example.com (dgarske)]]></author>
			<pubDate>Wed, 10 Nov 2021 17:03:07 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6358.html#p6358</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wolfcrypt minimum RAM footprint for RSA2048 or ECC384]]></title>
			<link>https://www.wolfssl.com/forums/post6356.html#p6356</link>
			<description><![CDATA[<p>Also, here is an example of a very minimal configuration for ECC. Perhaps it will be useful:<br /><a href="https://github.com/wolfSSL/wolfssl/blob/master/examples/configs/user_settings_min_ecc.h">https://github.com/wolfSSL/wolfssl/blob … _min_ecc.h</a></p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Tue, 09 Nov 2021 21:39:28 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6356.html#p6356</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wolfcrypt minimum RAM footprint for RSA2048 or ECC384]]></title>
			<link>https://www.wolfssl.com/forums/post6354.html#p6354</link>
			<description><![CDATA[<p>That does not sound outrageous.</p><p>Here is a guide you may find useful:<br /><a href="https://www.wolfssl.com/docs/wolfssl-manual/static-buffer-allocation/">https://www.wolfssl.com/docs/wolfssl-ma … llocation/</a><br />In particular, the tuning section at the end.</p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Tue, 09 Nov 2021 21:04:04 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6354.html#p6354</guid>
		</item>
		<item>
			<title><![CDATA[Wolfcrypt minimum RAM footprint for RSA2048 or ECC384]]></title>
			<link>https://www.wolfssl.com/forums/post6352.html#p6352</link>
			<description><![CDATA[<p>In the <a href="https://www.wolfssl.com/files/flyers/wolfssl_resource_use.pdf">https://www.wolfssl.com/files/flyers/wo … ce_use.pdf</a> I could see the peak usage of RAM for different settings. <br />Is there any such memoy reference available if I use <strong>Static Memory</strong> only for PKCS7 type RSA2048 signature verification?</p><p>My application only does signature verification and root of trust certificate (DER format) verification of the firmware.<br /><strong>Static Config:</strong> Static configuration defines in user_settings.h:&nbsp; <br /></p><div class="codebox"><pre><code>#define WOLFSSL_STATIC_MEMORY
    #define WOLFSSL_STATIC_MEMORY
    #define WOLFSSL_NO_MALLOC
    #define WOLFSSL_STATIC_MEMORY_SMALL

    #define USE_FAST_MATH
    #define TFM_TIMING_RESISTANT

    #define WOLFCRYPT_ONLY
    #define WOLFSSL_GENERAL_ALIGNMENT 4
    #define SINGLE_THREADED
    #define SIZEOF_LONG_LONG 8

    #ifdef __RSA__
        #define WC_RSA_NO_PADDING
        #define WC_RSA_PSS
        /* WC_RSA_BLINDING: Enables blinding mode, to prevent timing attacks. */
        #define WC_RSA_BLINDING
        #define RSA_LOW_MEM
        #define FP_MAX_BITS     4096
        #define WOLFSSL_RSA_VERIFY_INLINE
        #define WC_NO_RSA_OAEP
    #endif

    #ifdef __ECC__
        #define HAVE_ECC
        #define ECC_SHAMIR
        #define TFM_ECC256
        /* ECC_TIMING_RESISTANT: ECC specific timing resistance. */
        #define ECC_TIMING_RESISTANT
        #define NO_ECC_CHECK_KEY
        #define NO_RSA
        #define HAVE_X963_KDF
    #endif


    #ifdef __SHA512__
        #define WOLFSSL_SHA512
    #endif

    #ifdef __SHA384__
        #define WOLFSSL_SHA384
    #endif

    /* PKCS7 specific */
    #define NO_PKCS7_STREAM
    #define HAVE_PKCS7

    #define HAVE_AES_KEYWRAP
    #define WOLFSSL_AES_DIRECT
    
    /* Signature specific */
    #define ASN_BER_TO_DER

    /* Remove Features */
    #define WOLFSSL_NO_SOCK
    #define NO_WRITEV
    #define NO_FILESYSTEM
    #define NO_MAIN_DRIVER
    #define NO_MD4

    #define NO_RABBIT
    #define NO_HC128
    #define NO_PWDBASED
    #define NO_PSK
    #define NO_OLD_TLS
    #define NO_DES3
    #define NO_MD5
    #define NO_RC4
    #define NO_DH
    #define NO_CMAC
    #define NO_CODING
    #define WOLFSSL_NO_PEM
    #define NO_ASN_TIME
    #define NO_RC4
    #define NO_DSA
    #define NO_SIG_WRAPPER
    #define NO_SESSION_CACHE
    #define NO_OLD_RNGNAME
    #define NO_WOLFSSL_DIR
    #define WOLFSSL_IGNORE_FILE_WARN
    #define NO_ERROR_STRINGS

    #define BENCH_EMBEDDED
    #define NO_CRYPT_TEST
    #define NO_CRYPT_BENCHMARK
    
    #ifdef USE_FAST_MATH
    #   define WC_NO_HARDEN
    #endif</code></pre></div><p>ALL OTHER DEFINE OPTIONS default</p><p>WOLFCRYPT_ONLY, WOLFSSL_STATIC_MEMORY, WOLFSSL_NO_MALLOC, USE_FAST_MATH</p><p>With my current static onfiguration on a <strong>cortex m4 device </strong>I have to provide at least 17000 bytes of static buffer for wc_PKCS7_VerifySignedData for a RSA2048 signature verification. The final RAM usage (static + stack) is about 65Kbytes. <br />Does this RAM usage looks normal in Static configuration? Are there any Static reference projects?</p>]]></description>
			<author><![CDATA[null@example.com (swapnil.mishraj)]]></author>
			<pubDate>Tue, 09 Nov 2021 18:46:06 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post6352.html#p6352</guid>
		</item>
	</channel>
</rss>
