<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: S32K116 - CSEC_DRV_GenerateMAC Calculates Signature Different than other sources in S32K</title>
    <link>https://community.nxp.com/t5/S32K/S32K116-CSEC-DRV-GenerateMAC-Calculates-Signature-Different-than/m-p/1592154#M20375</link>
    <description>&lt;P&gt;alright I solved it.&lt;/P&gt;&lt;P&gt;msg_len must be in bits... so in my case it must be 179*8...&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2023 08:46:57 GMT</pubDate>
    <dc:creator>muhammetkalayci</dc:creator>
    <dc:date>2023-02-02T08:46:57Z</dc:date>
    <item>
      <title>S32K116 - CSEC_DRV_GenerateMAC Calculates Signature Different than other sources</title>
      <link>https://community.nxp.com/t5/S32K/S32K116-CSEC-DRV-GenerateMAC-Calculates-Signature-Different-than/m-p/1592019#M20370</link>
      <description>&lt;P&gt;uint8_t plainKey[] = {0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB,0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB,&amp;nbsp;0xAB};&lt;/P&gt;&lt;P&gt;CSEC_DRV_Init(&amp;amp;csecState);&lt;BR /&gt;CSEC_DRV_LoadPlainKey(plainKey);&lt;/P&gt;&lt;P&gt;CSEC_DRV_GenerateMAC(CSEC_RAM_KEY, msg, msg_len, cmac, &amp;amp;timeout);&lt;/P&gt;&lt;P&gt;*I use 179 byte message as msg, so msg_len=179.&lt;/P&gt;&lt;P&gt;*16 byte output buffer as cmac.&lt;/P&gt;&lt;P&gt;*timout = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used same parameters in different libraries to confirm if SDK calculates the right value;&lt;/P&gt;&lt;P&gt;mbedtls calculated a different cmac signature than SDK.&lt;/P&gt;&lt;P&gt;python cryptography library calculated same cmac signature with mbedtls.&lt;/P&gt;&lt;P&gt;a web tool calculated the same signature with mbedtls.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What could be the problem here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I possibly doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 08:45:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K116-CSEC-DRV-GenerateMAC-Calculates-Signature-Different-than/m-p/1592019#M20370</guid>
      <dc:creator>muhammetkalayci</dc:creator>
      <dc:date>2023-02-02T08:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: S32K116 - CSEC_DRV_GenerateMAC Calculates Signature Different than other sources</title>
      <link>https://community.nxp.com/t5/S32K/S32K116-CSEC-DRV-GenerateMAC-Calculates-Signature-Different-than/m-p/1592154#M20375</link>
      <description>&lt;P&gt;alright I solved it.&lt;/P&gt;&lt;P&gt;msg_len must be in bits... so in my case it must be 179*8...&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 08:46:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K116-CSEC-DRV-GenerateMAC-Calculates-Signature-Different-than/m-p/1592154#M20375</guid>
      <dc:creator>muhammetkalayci</dc:creator>
      <dc:date>2023-02-02T08:46:57Z</dc:date>
    </item>
  </channel>
</rss>

