<?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 — SHA384 Determinism]]></title>
		<link>https://www.wolfssl.com/forums/topic2323-sha384-determinism.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic2323.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in SHA384 Determinism.]]></description>
		<lastBuildDate>Fri, 06 Jun 2025 19:09:13 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: SHA384 Determinism]]></title>
			<link>https://www.wolfssl.com/forums/post8366.html#p8366</link>
			<description><![CDATA[<p>5.7.4 is outdated, please try upgrading to 5.8.0 and let me know if it helps.</p><p>Here is a full code sample which should work:</p><div class="codebox"><pre><code>int main(void) {
    int i;
    int j;
    byte input[] = {255};
    byte hash[48];
    wc_Sha384 sha384;
    for (j = 0; j &lt; 10; j++) {
        wc_InitSha384(&amp;sha384);
        wc_Sha384Update(&amp;sha384, input, sizeof(input));
        wc_Sha384Final(&amp;sha384, hash);
        printf(&quot;Buffer: \n&quot;);
        for (i = 0; i &lt; 48; i++)
            printf(&quot;%02x &quot;, hash[i]);
        printf(&quot;\n&quot;);
    }
    return 0; 
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kareem_wolfssl)]]></author>
			<pubDate>Fri, 06 Jun 2025 19:09:13 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8366.html#p8366</guid>
		</item>
		<item>
			<title><![CDATA[Re: SHA384 Determinism]]></title>
			<link>https://www.wolfssl.com/forums/post8365.html#p8365</link>
			<description><![CDATA[<p>I call wc_InitSha384 before update and final every time I perform a hash.</p><p>Yes you are correct sizeof(input); is correct</p><p>No hardware acceleration. I&#039;m using wolfssl-5.7.4-gplv3-fips-ready with the fipsv5 user_settings.h</p>]]></description>
			<author><![CDATA[null@example.com (bryce.bartlett)]]></author>
			<pubDate>Thu, 05 Jun 2025 23:30:50 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8365.html#p8365</guid>
		</item>
		<item>
			<title><![CDATA[Re: SHA384 Determinism]]></title>
			<link>https://www.wolfssl.com/forums/post8364.html#p8364</link>
			<description><![CDATA[<p>And just to confirm you are calling wc_InitSha384 after each wc_Sha384Update + wc_Sha384Final, correct?<br />I&#039;m also assuming the sizeof(data) here is actually sizeof(input): wc_Sha384Update(&amp;sha384, input, sizeof(data));</p><p>Are you using any kind of hardware acceleration for SHA384?&nbsp; Can you share your version and build settings?</p>]]></description>
			<author><![CDATA[null@example.com (kareem_wolfssl)]]></author>
			<pubDate>Thu, 05 Jun 2025 22:56:18 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8364.html#p8364</guid>
		</item>
		<item>
			<title><![CDATA[Re: SHA384 Determinism]]></title>
			<link>https://www.wolfssl.com/forums/post8363.html#p8363</link>
			<description><![CDATA[<p>Sorry that was just a typo by me. I am actually using sha384 as the variable used in init.</p>]]></description>
			<author><![CDATA[null@example.com (bryce.bartlett)]]></author>
			<pubDate>Thu, 05 Jun 2025 22:30:25 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8363.html#p8363</guid>
		</item>
		<item>
			<title><![CDATA[Re: SHA384 Determinism]]></title>
			<link>https://www.wolfssl.com/forums/post8362.html#p8362</link>
			<description><![CDATA[<p>Hi Bryce,</p><p>Thanks for the followup.&nbsp; Looks like you are initializing a different variable &quot;sha&quot; here: wc_InitSha384(&amp;sha);<br />sha384 must be initialized before you can use it, please try replacing this line with: wc_InitSha384(&amp;sha384);</p><p>Thanks,<br />Kareem</p>]]></description>
			<author><![CDATA[null@example.com (kareem_wolfssl)]]></author>
			<pubDate>Thu, 05 Jun 2025 22:27:47 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8362.html#p8362</guid>
		</item>
		<item>
			<title><![CDATA[Re: SHA384 Determinism]]></title>
			<link>https://www.wolfssl.com/forums/post8361.html#p8361</link>
			<description><![CDATA[<p>I probably don&#039;t understand how this works but my code is as follows:</p><p>byte input[] = {255};<br />byte hash[48];<br />wc_Sha384 sha384;<br />wc_InitSha384(&amp;sha);<br />wc_Sha384Update(&amp;sha384, input, sizeof(data));<br />wc_Sha384Final(&amp;sha384, hash);</p><p>and then I&#039;m checking the first 3 indices of hash against some hardcoded values.</p>]]></description>
			<author><![CDATA[null@example.com (bryce.bartlett)]]></author>
			<pubDate>Thu, 05 Jun 2025 20:21:34 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8361.html#p8361</guid>
		</item>
		<item>
			<title><![CDATA[Re: SHA384 Determinism]]></title>
			<link>https://www.wolfssl.com/forums/post8360.html#p8360</link>
			<description><![CDATA[<p>Hi Bryce,</p><p>That is strange, I would definitely expect the same input to create the same output from SHA384.&nbsp; Please share your code.</p><p>We don&#039;t have a SHA384 example but we do have a SHA512 example, does your code follow the same general flow?&nbsp; <a href="https://github.com/wolfSSL/wolfssl-examples/blob/master/hash/sha512-hash.c">https://github.com/wolfSSL/wolfssl-exam … 512-hash.c</a></p><p>Thanks,<br />Kareem</p>]]></description>
			<author><![CDATA[null@example.com (kareem_wolfssl)]]></author>
			<pubDate>Thu, 05 Jun 2025 18:04:37 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8360.html#p8360</guid>
		</item>
		<item>
			<title><![CDATA[SHA384 Determinism]]></title>
			<link>https://www.wolfssl.com/forums/post8359.html#p8359</link>
			<description><![CDATA[<p>I&#039;m testing wc_InitSha384, wc_Sha384Update and wc_Sha384Final and I&#039;m finding that my final hashed value is different every time I make a call. I&#039;m hashing a byte array of 255, 255, 255 into a byte array of length 48 and it has different values every time. What gives?</p>]]></description>
			<author><![CDATA[null@example.com (bryce.bartlett)]]></author>
			<pubDate>Thu, 05 Jun 2025 17:25:03 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8359.html#p8359</guid>
		</item>
	</channel>
</rss>
