<?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: i.mx8mq DRM in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-mx8mq-DRM/m-p/1313453#M177478</link>
    <description>&lt;P&gt;Could you tell me more information about your issue?&lt;/P&gt;
&lt;P&gt;Which version of BSP are you using?&lt;/P&gt;
&lt;P&gt;Is there any error message?&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jul 2021 00:21:43 GMT</pubDate>
    <dc:creator>jimmychan</dc:creator>
    <dc:date>2021-07-27T00:21:43Z</dc:date>
    <item>
      <title>i.mx8mq DRM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx8mq-DRM/m-p/1307544#M176902</link>
      <description>&lt;P&gt;您好&lt;/P&gt;&lt;P&gt;在下面的code當中，在ubuntu16.04下使用python3去build 會有問題(python2也是不行的)&lt;/P&gt;&lt;P&gt;請問我要bulidt 成 level 1，相信這是很重要的步驟，可以請您回覆我?&lt;/P&gt;&lt;P&gt;謝謝&lt;/P&gt;&lt;P&gt;#!/usr/bin/env python3&lt;/P&gt;&lt;P&gt;from Crypto.Cipher import AES&lt;BR /&gt;from Crypto.Random import get_random_bytes&lt;BR /&gt;from argparse import FileType&lt;/P&gt;&lt;P&gt;import argparse&lt;BR /&gt;parser = argparse.ArgumentParser(description='Provisioning encryption tool.')&lt;BR /&gt;parser.add_argument('key', type = file)&lt;BR /&gt;parser.add_argument('plaintext', type = file)&lt;BR /&gt;parser.add_argument('ciphertext', type = argparse.FileType('w'))&lt;BR /&gt;parser.add_argument('nonce', type = argparse.FileType('w'))&lt;BR /&gt;parser.add_argument('tag', type = argparse.FileType('w'))&lt;BR /&gt;args = parser.parse_args()&lt;/P&gt;&lt;P&gt;data = args.plaintext.read()&lt;BR /&gt;key = args.key.read()&lt;BR /&gt;nonce = get_random_bytes(7)&lt;/P&gt;&lt;P&gt;data += '\0' * (((len(data)+15)/16 * 16) - len(data))&lt;/P&gt;&lt;P&gt;cipher = AES.new(key, AES.MODE_CCM, nonce)&lt;BR /&gt;ciphertext, tag = cipher.encrypt_and_digest(data)&lt;/P&gt;&lt;P&gt;cipher = AES.new(key, AES.MODE_CCM, nonce)&lt;BR /&gt;plaintext = cipher.decrypt_and_verify(ciphertext, tag)&lt;/P&gt;&lt;P&gt;if (plaintext != data):&lt;BR /&gt;print ("Encryption error.")&lt;BR /&gt;else:&lt;BR /&gt;args.nonce.write(nonce)&lt;BR /&gt;args.tag.write(tag)&lt;BR /&gt;args.ciphertext.write(ciphertext)&lt;BR /&gt;print ("ncryption done. ")&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 08:56:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx8mq-DRM/m-p/1307544#M176902</guid>
      <dc:creator>i_MX51</dc:creator>
      <dc:date>2021-07-14T08:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx8mq DRM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx8mq-DRM/m-p/1313453#M177478</link>
      <description>&lt;P&gt;Could you tell me more information about your issue?&lt;/P&gt;
&lt;P&gt;Which version of BSP are you using?&lt;/P&gt;
&lt;P&gt;Is there any error message?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 00:21:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx8mq-DRM/m-p/1313453#M177478</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2021-07-27T00:21:43Z</dc:date>
    </item>
  </channel>
</rss>

