<?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 — AES GCM :How to get authentication vector and tag for decryption]]></title>
		<link>https://www.wolfssl.com/forums/topic1556-aes-gcm-how-to-get-authentication-vector-and-tag-for-decryption.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1556.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in AES GCM :How to get authentication vector and tag for decryption.]]></description>
		<lastBuildDate>Thu, 23 Jul 2020 19:31:02 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AES GCM :How to get authentication vector and tag for decryption]]></title>
			<link>https://www.wolfssl.com/forums/post5371.html#p5371</link>
			<description><![CDATA[<p>Some useful reading:</p><p><a href="https://whatis.techtarget.com/definition/initialization-vector-IV">https://whatis.techtarget.com/definitio … -vector-IV</a><br /></p><div class="quotebox"><blockquote><p>...The ideal IV is a random number that is made known to the destination computer to facilitate decryption of the data when it is received. The IV can be agreed on in advance, transmitted independently or included as part of the session setup prior to exchange of the message data. The length of the IV (the number of bits or bytes it contains) depends on the method of encryption. The IV length is usually comparable to the length of the encryption key or block of the cipher in use...</p></blockquote></div><p><a href="https://security.stackexchange.com/questions/122274/why-does-iv-not-need-to-be-secret-in-aes-cbc-encryption">https://security.stackexchange.com/ques … encryption</a><br /></p><div class="quotebox"><blockquote><p>... Knowing the IV doesn&#039;t get an attacker anywhere, because the IV is only there to ensure non-equality of ciphertexts. The secret key is what protects the actual data...</p></blockquote></div><p>- KH</p>]]></description>
			<author><![CDATA[null@example.com (Kaleb J. Himes)]]></author>
			<pubDate>Thu, 23 Jul 2020 19:31:02 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5371.html#p5371</guid>
		</item>
		<item>
			<title><![CDATA[Re: AES GCM :How to get authentication vector and tag for decryption]]></title>
			<link>https://www.wolfssl.com/forums/post5269.html#p5269</link>
			<description><![CDATA[<p>Hi</p><br /><p>I am working on Bluetooth application. I required encrypted data transfer between two BLE device. For this purpose, I used DH for key exchange and AES for encryption/decryption.&nbsp; &nbsp;I have doubt in parameter iv in encryption/decryption API.</p><p>Is iv need to send other side for decryption for every time?. otherwise&nbsp; how to get iv in decryption part? If I sent iv with encrypted data, is it secure?</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (sreerajsreez7658)]]></author>
			<pubDate>Sun, 07 Jun 2020 09:54:58 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5269.html#p5269</guid>
		</item>
		<item>
			<title><![CDATA[Re: AES GCM :How to get authentication vector and tag for decryption]]></title>
			<link>https://www.wolfssl.com/forums/post5267.html#p5267</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>can you share details about what it is you are working on and what the product is and will do? If you can not share on the public forum this would be a good candidate to send to our support [at] wolfssl [dot] com domain.</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (Kaleb J. Himes)]]></author>
			<pubDate>Fri, 05 Jun 2020 18:44:43 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5267.html#p5267</guid>
		</item>
		<item>
			<title><![CDATA[Re: AES GCM :How to get authentication vector and tag for decryption]]></title>
			<link>https://www.wolfssl.com/forums/post5266.html#p5266</link>
			<description><![CDATA[<p>Hi Kaleb,</p><br /><p>Thank you for your replay.<br /> I have some&nbsp; doubt regarding IV also. I am working on BLE. I need to make encrypted data transfer. I did encryption using </p><p>wc_AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const byte* iv, word32 ivSz,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;byte* authTag, word32 authTagSz,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;const byte* authIn, word32 authInSz)</p><p>Here i genatated IV randomly&nbsp; every time.</p><br /><p>In decryption side, IV also used for decryption.</p><p>wc_AesGcmEncrypt( aes, out,&nbsp; in,&nbsp; inSz, iv, ivSz,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; authTag, authTagSz,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; authIn, authInSz);</p><p> how to get IV in decryption side. is it need to&nbsp; send IV with encrypted data? </p><br /><p>Thanks <br />Sree</p>]]></description>
			<author><![CDATA[null@example.com (sreerajsreez7658)]]></author>
			<pubDate>Fri, 05 Jun 2020 14:44:38 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5266.html#p5266</guid>
		</item>
		<item>
			<title><![CDATA[Re: AES GCM :How to get authentication vector and tag for decryption]]></title>
			<link>https://www.wolfssl.com/forums/post5265.html#p5265</link>
			<description><![CDATA[<p>Hi @sreerajsreez7658,</p><p>Thank you so much for reaching out to wolfSSL support. You are asking some pretty advanced questions about the use of GCM, can you share details about what it is you are working on and what the product is and will do? If you can not share on the public forum this would be a good candidate to send to our support [at] wolfssl [dot] com domain.</p><p>Just a high-level overview:</p><div class="codebox"><pre><code>wc_AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,     
                                       const byte* iv, word32 ivSz,               
                                       byte* authTag, word32 authTagSz,           
                                       const byte* authIn, word32 authInSz)</code></pre></div><p>A call to AesGcmEncrypt might look like this:</p><div class="codebox"><pre><code>wc_AesGcmEncrypt( aes, out,  in,  inSz, iv, ivSz,               
                              authTag, authTagSz,           
                              authIn, authInSz);</code></pre></div><p>The authTag is computed by the algorithm and is an OUTPUT.</p><p>In 99.9% of use-cases authIn is not set or ever used.</p><p>The only time authIn is used is when GCM is used like a block cipher and the authTag OUTPUT from a previous call is passed BACK in as an INPUT so it can be updated in subsequent calls.</p><p>I am not sure what you mean when you say &quot;authentication vector&quot; unless you are referring to the authIn I mentioned above which is not typically set (IE its&#039; set to NULL and the length is 0 in most cases and always on the first call to GCM Encrypt or Decrypt).</p><p>Warm Regards,</p><p>K</p>]]></description>
			<author><![CDATA[null@example.com (Kaleb J. Himes)]]></author>
			<pubDate>Thu, 04 Jun 2020 23:45:00 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5265.html#p5265</guid>
		</item>
		<item>
			<title><![CDATA[AES GCM :How to get authentication vector and tag for decryption]]></title>
			<link>https://www.wolfssl.com/forums/post5263.html#p5263</link>
			<description><![CDATA[<p>Hi,</p><p>I am testing encryption/decryption using AES GCM. In encryption side I took sample authentication vector and authentication tag is generated. I have following doubts.</p><p>1) can assign any size for authentication vector and authentication tag?</p><p>2) I have to decrypt data in other side , How can share authentication vector and authentication tag into other side for decryption?</p><p>3)Need to change authentication vector every time like IV?</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (sreerajsreez7658)]]></author>
			<pubDate>Thu, 04 Jun 2020 09:48:29 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5263.html#p5263</guid>
		</item>
	</channel>
</rss>
