<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CryptoCell CC310 AES CCM* MAC length other than zero</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30992/cryptocell-cc310-aes-ccm-mac-length-other-than-zero</link><description>Hello guys, 
 these days i started to work with the CryptoCell library on nrf52840 and i&amp;#39;m facing some issues running AES CCM* mode 
 little example with pseudo code for initialization 
 
 if i&amp;#39;m using another length than 0 for SizeOfT parameter e.g.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Mar 2018 07:46:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30992/cryptocell-cc310-aes-ccm-mac-length-other-than-zero" /><item><title>RE: CryptoCell CC310 AES CCM* MAC length other than zero</title><link>https://devzone.nordicsemi.com/thread/122389?ContentTypeID=1</link><pubDate>Thu, 01 Mar 2018 07:46:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81450496-444c-4449-8838-8eeb284061eb</guid><dc:creator>chris-ho</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/jarz"&gt;Jakub Rzeszutko&lt;/a&gt; thank you very much, that&amp;#39;s what i missed. &lt;/p&gt;
&lt;p&gt;the nonce array posted was taken from my test set whereas the CRYS_AESCCMStar_NonceGenerate overwrites that and there i didn&amp;#39;t updated the tag_len...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CryptoCell CC310 AES CCM* MAC length other than zero</title><link>https://devzone.nordicsemi.com/thread/122388?ContentTypeID=1</link><pubDate>Thu, 01 Mar 2018 07:31:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2870363-cdc1-4f1c-a6ec-dd4acd29c9dc</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;First of all when you are changing size of tag you need to update nonce array well:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;tag_len == 0&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;last value in nonce array ==&amp;nbsp;&lt;/span&gt; 4&lt;br /&gt;&lt;span&gt;tag_len ==&amp;nbsp;4&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;last value in nonce array ==&amp;nbsp;&lt;/span&gt; 5&lt;br /&gt;&lt;span&gt;tag_len == 8&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;last value in nonce array ==&amp;nbsp;&lt;/span&gt; 6&lt;br /&gt;&lt;span&gt;tag_len == 16&amp;nbsp;&lt;/span&gt;&lt;span&gt;last value in nonce array ==&amp;nbsp;&lt;/span&gt; 7&lt;/p&gt;
&lt;p&gt;If you will not do it you will receive an error:&amp;nbsp;CRYS_AESCCM_ILLEGAL_PARAMETER_ERROR.&lt;/p&gt;
&lt;p&gt;So for tag_len == 0 you shall have following nonce array:&lt;/p&gt;
&lt;p&gt;CRYS_AESCCMStar_Nonce_t nonce_n = &lt;br /&gt;{ 0x00, 0x00, 0xf0, 0xe0, 0xd0, 0xc0, 0xb0, 0xa0, 0x00, 0x00, 0x00, 0x00, &lt;strong&gt;0x04 &lt;/strong&gt;};&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>