<?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 — Where and when does the wc_AesGcmEncrypt_ex key gets initialized ?]]></title>
		<link>https://www.wolfssl.com/forums/topic1736-where-and-when-does-the-wcaesgcmencryptex-key-gets-initialized.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1736.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Where and when does the wc_AesGcmEncrypt_ex key gets initialized ?.]]></description>
		<lastBuildDate>Wed, 05 May 2021 20:12:43 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Where and when does the wc_AesGcmEncrypt_ex key gets initialized ?]]></title>
			<link>https://www.wolfssl.com/forums/post5987.html#p5987</link>
			<description><![CDATA[<p>EDIT: Thanks, David, for answering!</p><p>Hello Chris,</p><p>I&#039;ve asked Sean to review this post.</p><p>Thanks,<br />Eric @ wolfSSL Support</p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Wed, 05 May 2021 20:12:43 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5987.html#p5987</guid>
		</item>
		<item>
			<title><![CDATA[Re: Where and when does the wc_AesGcmEncrypt_ex key gets initialized ?]]></title>
			<link>https://www.wolfssl.com/forums/post5986.html#p5986</link>
			<description><![CDATA[<p>Hi cxenof03,</p><p>The encryption algorithm is initialized with the call to keys.c:SetKeysSide(). Actually the internal function SetKeys() is making the calls to wc_AesInit() and wc_AesGcmSetKey().</p><p>WritePSKBinders sets the keys for early data on the client. DoPreSharedKeys sets the keys on the server.</p><p>* The PSK establishes a master secret. See SetupPskKey() and DoPreSharedKeys().<br />* DeriveEarlySecret() derives the secret for creating the keys. See &quot;Early Secret&quot; in diagram in TLS 1.3 spec, page 93.<br />* DeriveTls13Keys() calls DeriveEarlySecret() and then derives the key that is placed in the &#039;Key data&#039; that is used in SetKeysSide. See &quot;client_early_secret_traffic_secret&quot; in TLS 1.3 spec, page 93. <br />* SetKeysSide takes the &#039;Key data&#039; and extracts out the key to use.</p><p>Thanks,<br />David Garske, wolfSSL</p>]]></description>
			<author><![CDATA[null@example.com (dgarske)]]></author>
			<pubDate>Wed, 05 May 2021 16:39:50 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5986.html#p5986</guid>
		</item>
		<item>
			<title><![CDATA[Where and when does the wc_AesGcmEncrypt_ex key gets initialized ?]]></title>
			<link>https://www.wolfssl.com/forums/post5982.html#p5982</link>
			<description><![CDATA[<p>Hello everyone,<br />I am working in the client/server example using TLS 1.3<br />I want to change the encryption key of the early_data that are sent during the resumption session.<br />I am running my examples with:<br /></p><div class="codebox"><pre><code>./client -v 4 -r -s -t -0</code></pre></div><p>both client and server.</p><p>Therefore, as the documentation says, <a href="https://tools.ietf.org/html/rfc8446#section-2.3">https://tools.ietf.org/html/rfc8446#section-2.3</a>, &quot;The client uses the PSK to authenticate the server and to encrypt the early data&quot;.<br />I would like to find the exact point where <strong>the client uses the PSK to encrypt the early data</strong>. I observed that this is done in the function <em>EncryptTLS13 </em>in the <em>tls.c</em> file using the function wc_AesGcmEncrypt_ex, but going there I could observe that the aes-&gt;key was already initialized.<br />So where does the PSK encrypt the early data or how is it used in the aes function?<br />Additionally, what is the relation of the <em>aad</em>with the PSK ?</p>]]></description>
			<author><![CDATA[null@example.com (cxenof03)]]></author>
			<pubDate>Tue, 04 May 2021 22:33:27 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5982.html#p5982</guid>
		</item>
	</channel>
</rss>
