<?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 — wc_AesSetIV(...)]]></title>
		<link>https://www.wolfssl.com/forums/topic746-wcaessetiv.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic746.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in wc_AesSetIV(...).]]></description>
		<lastBuildDate>Tue, 08 Dec 2015 23:51:32 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: wc_AesSetIV(...)]]></title>
			<link>https://www.wolfssl.com/forums/post2356.html#p2356</link>
			<description><![CDATA[<p>Hi gawiz,</p><p>Yes that will work, and is ok.</p><p>For the reason why... the wc_AesSetIV function is for adjusting the IV on the fly after the key has already been set. This is helpful at times in a SSL/TLS connection but is not needed to be explicitly called for use. You are correct that the SetKey allows for setting up the IV in the AES key structure.</p><p>Was the documentation looked at for use with a TLS/SSL connection? We have a wolfCrypt one at <a href="https://www.wolfssl.com/wolfSSL/Docs-wolfssl-manual-10-wolfcrypt-usage-reference.html">https://www.wolfssl.com/wolfSSL/Docs-wo … rence.html</a></p><p>As an example:<br /></p><div class="quotebox"><blockquote><p>Aes enc;<br />Aes dec;</p><p>const byte key[] = {&nbsp; // some 24 byte key };<br />const byte iv[] = { // some 16 byte iv };</p><p>byte plain[32];&nbsp; &nbsp;// an increment of 16, fill with data<br />byte cipher[32];</p><p>// encrypt<br />wc_AesSetKey(&amp;enc, key, sizeof(key), iv, AES_ENCRYPTION);<br />wc_AesCbcEncrypt(&amp;enc, cipher, plain, sizeof(plain));</p><br /><p>cipher now contains the cipher text from the plain text.</p><p>// decrypt<br />wc_AesSetKey(&amp;dec, key, sizeof(key), iv, AES_DECRYPTION);<br />wc_AesCbcDecrypt(&amp;dec, plain, cipher, sizeof(cipher));</p><p>plain now contains the original plaintext from the cipher text.</p></blockquote></div><p>Regards,<br />Jacob</p>]]></description>
			<author><![CDATA[null@example.com (Jacob)]]></author>
			<pubDate>Tue, 08 Dec 2015 23:51:32 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2356.html#p2356</guid>
		</item>
		<item>
			<title><![CDATA[wc_AesSetIV(...)]]></title>
			<link>https://www.wolfssl.com/forums/post2345.html#p2345</link>
			<description><![CDATA[<p>The documentation shows that I should call wc_AesSetKey, then wc_AesSetIV, then w_AesCbcEncrypt.</p><p>Is it really necessary to call SetIV being as the call to SetKey also takes the IV as input?&nbsp; It <strong>seems</strong> to work OK without calling it, but I just want to confirm that there&#039;s not some side effect that I&#039;m missing.</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (gawiz)]]></author>
			<pubDate>Tue, 24 Nov 2015 23:33:09 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2345.html#p2345</guid>
		</item>
	</channel>
</rss>
