<?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 Keywrap Alogrithm]]></title>
		<link>https://www.wolfssl.com/forums/topic428-aes-keywrap-alogrithm.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic428.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in AES Keywrap Alogrithm.]]></description>
		<lastBuildDate>Mon, 16 Sep 2013 15:51:11 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AES Keywrap Alogrithm]]></title>
			<link>https://www.wolfssl.com/forums/post1380.html#p1380</link>
			<description><![CDATA[<p>Gotcha, Chris. </p><p>However, using this in a keywrap is still part of the DNP Secure Authentication v5 protocol, so I have to go ahead and implement it.&nbsp; I think it does make it a bit more secure because the keywrap function actually used previous values to generate the IV for the next AES operation.</p>]]></description>
			<author><![CDATA[null@example.com (ctb)]]></author>
			<pubDate>Mon, 16 Sep 2013 15:51:11 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post1380.html#p1380</guid>
		</item>
		<item>
			<title><![CDATA[Re: AES Keywrap Alogrithm]]></title>
			<link>https://www.wolfssl.com/forums/post1378.html#p1378</link>
			<description><![CDATA[<p>Hi ctb,</p><p>Yes, the AesEncryptDirect() and AesDecryptDirect() functions just do a direct ECB-mode AES operation.&nbsp; These are left out of the documentation because ECB (Electronic codebook) mode is not regarded as very secure.&nbsp; If you take a look at the penguin image on the following Wikipedia page under the &quot;ECB&quot; section, you will see that it doesn&#039;t hide patterns very well:</p><p><a href="https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation">https://en.wikipedia.org/wiki/Block_cip … _operation</a></p><p>Best Regards,<br />Chris</p>]]></description>
			<author><![CDATA[null@example.com (chrisc)]]></author>
			<pubDate>Thu, 12 Sep 2013 16:50:50 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post1378.html#p1378</guid>
		</item>
		<item>
			<title><![CDATA[Re: AES Keywrap Alogrithm]]></title>
			<link>https://www.wolfssl.com/forums/post1372.html#p1372</link>
			<description><![CDATA[<p>I dug into the code a bit and found AesEncryptDirect(...);</p><p>The only thing is that I had to enable the precomplier switch for WOLFSSL_AES_DIRECT.</p><p>Also, the functions seem to be a bit outdated because they were returning the return value from a function that returned void, in a function that returns void.</p><p>I simply removed the return in the function and everything compiles correctly and I got the right value from the AES encryption.&nbsp; So, problem solved.&nbsp; I think.&nbsp; Unless there is some issue with me using these direct functions.&nbsp; They aren&#039;t in the documentation but it appears it is just a direct call to the base AES function itself, which is used in the code, so I suspect it is fine.</p>]]></description>
			<author><![CDATA[null@example.com (ctb)]]></author>
			<pubDate>Fri, 06 Sep 2013 13:46:19 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post1372.html#p1372</guid>
		</item>
		<item>
			<title><![CDATA[AES Keywrap Alogrithm]]></title>
			<link>https://www.wolfssl.com/forums/post1371.html#p1371</link>
			<description><![CDATA[<p>I am trying to implement the key wrap AES Key Wrap Specification described in csrc.nist.gov/groups/ST/toolkit/documents/kms/key-wrap.pdf</p><p>I am just trying to get the &quot;encrypt&quot; part to work right now with wolfSSL embedded SSL, and am using the &quot;alternate algorithm.&quot;</p><p>The key wrap algorithm contains multiple AES encrypting iterations.&nbsp; The document gives you known values for the example inputs (located at the end of the document), but I am having no success getting it to work for the first iteration.</p><p>In the key wrap document, they say:</p><p>B = AES K (A | Ri )</p><p>Which is basically saying do an AES encryption with key K on the concatenated data, A (the initialization vector) and the i-th 64 bit data block of the data.&nbsp; So for the first iteration, the i-th data would be the first 64 bits of the data to be wrapped.&nbsp; And then put the encrypted data in B.</p><p>I see when I call AesSetKey(...) I am passing it the Initialize Vector (A).&nbsp; And when I call Aes...Encrypt(...) I do not pass it the IV.</p><p>Does the code automatically concatenate the IV onto the beginning of the data when you call Aes...Encrypt(...)?&nbsp; Or do I still need to handle that concatenation myself?&nbsp; If the latter, how does the IV get used in Aes...Encrypt(...)?</p><p>Also, I&#039;m not sure which Aes...Encrypt(...) to use (CBC, CTR, GCM, etc) for this.&nbsp; It says &quot;codebook&quot; which is another kind you apparently don&#039;t support, but it also say it isn&#039;t a good one to use on the wikipedia page.</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (ctb)]]></author>
			<pubDate>Thu, 05 Sep 2013 20:45:14 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post1371.html#p1371</guid>
		</item>
	</channel>
</rss>
