element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum Cryptographic App' exploiting the Freescale iMX6 CAAM
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 9 replies
  • Answers 2 answers
  • Subscribers 305 subscribers
  • Views 2271 views
  • Users 0 members are here
  • cryptography
  • applications
  • freescale
  • imx6
  • caam
  • accelerator
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

Cryptographic App' exploiting the Freescale iMX6 CAAM

Former Member
Former Member over 10 years ago

Hi all,

 

I'm little bit discomforted about this question because it seem to be simple question but I haven't found a correct answer:

- on Frescale iMX6 comunity.

- on Riotboard FAQ.

- Into Fresscale Security Reference Manual for iMX6 [...] Families applications Processors. (IMX6DQ6SDLSRM)

- ...

 

So I ask my question here image .


To sum up :

I've bought an element14 SABRELITE and a RIoTboard . Both board have an Freescale iMX6 processor embedded.

One has an iMX6quad and the other has an iMX6solo.

 

Each board have a Cryptographic Acceleration and Assurance Module (CAAM) which allow to perform fast cryptographic process.

In first time, to test the efficiency of this module I just want to perform a simple AES encryption process.

 

I would like to make a C code program which use the CAAM to perform fast AES computation.

In this code I want :

- Load my plaintext in specific CAAM data register.

- Load a Key in CAAM key register

- Run the cryptographic process

- Read the Ciphered in specific output register.

 

In the documentation that I've read (in particular the IMX6DQ6SDLSRM), I understand they are many Security management registers and security mode

that I have to set up in order to be able to access to some registers addresses.

 

But the documentation is very a Low level documentation and it don't explain "How make a Software application exploiting CAAM".

 

It's for this reason that I ask here.

 

Please has Anyone could help me ?

Has anyone had a code example ?

Do you know right documentation / C library / kernel, OS, setting ... ?

Everything is welcome image

 

 

Fabien.

  • Sign in to reply
  • Cancel
  • kylemills
    0 kylemills over 10 years ago

    the CAAM is a protected module.

     

    fresscale faes can share those to you. check this and this

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • kylemills
    0 kylemills over 10 years ago in reply to kylemills

    no sure if NDA is required or check with your board vendor .

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago

    Fabien,

         As I am a programmer of many years and have done crypto work for a few of them, This subject is very vast. Here are some of the high level details:

    1. The keys must be created using two large prime numbers to create asymmetrical pairs usually RSA.
    2. One being the private and is store in protected tamper proof storage over the DMA channel.
    3. The other public key is shared with whoever will encrypt the message.
    4. The reverse is needed for two way communications.
    5. A signature is created in a similar  way to authenticate senders. with a exchange.
    6. These are done with PKI interface.
    7. Now plaintext is broken done into blocks and encrypted using AES 128 maybe. There are various flavors depending on usage. ECB is one type. The cipher is added to the RSA of the AES block and sent together.

     

    I could go on, but the explanation would be long. Therefore the documentation to the low level is seldom divulge due to details like this. I would encourage you to read about enigma machine used by German in WWII to get a taste. BTW, I plan on writing code to emulate the real machine used back then in near future, if you wish to learn more. Follow me if you wish.

     

    Cheers,

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to clem57

    Hi Clem,

     

    I think there are a misunderstanding image ...

    My question is more about "How to implement an AES - ECB" rather than " what is an ECB mode..." image

    I understand cryptography theory. But I don't understand How implement through the CAAM accelerator.

     

    So if you have a code C example using CAAM it could be helpful .

     

    Cheers,

    Fabien.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to kylemills

    Hi Kyle,

     

    I've already contact Freescale about this topic

    and they gave me this link : https://community.freescale.com/thread/338204

     

    So I'll test this answer.

     

    Cheers,

     

    Fabien.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • amgalbu
    0 amgalbu over 10 years ago

    Hi Fabien

    I don't know the OS you are working with

    I don't have specific experience on iMX6, but I implemented a crypto accelerator in an Altera CycloneV FPGA. In that case, the OS was Linux and the interface to the software was done by writing an OpenSSL engine. It's not a difficult task to write and load a new engine... just google and you will find wealth of information about the topic.

    In case you need some extra help, just ask!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to amgalbu

    Hi Ambrogio,

    Thank you for your answer.

     

    I've 3 board :

    - Riotboard running with linaro-ubuntu-desktop (Ubuntu 11.10) )/ Linux 3.0.35-02871-ga35ffe3

    - RIoTboard running with Android 4.3 / Linux 3.0.35-06429-g55e239f

    - Sabrelite board running with Android 4.4 / Linux 3.13.0-44 generic

     

    I have already read some articles about OpenSSL cryptographic acceleration using CAAM ( secure hardward module in iMX6).

    The main difficulty that I've seen is how to know if the OpenSSL cryptographic library use the hardware accelerator module or a software module.

     

    Because in Linux you have  into /proc/crypto you have some software implementation of AES, RSA and others...

     

    My problem is that I want to be sure that my program use CAAM of the iMX6.

    See you .

     

    Fabien.

    .

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • amgalbu
    0 amgalbu over 10 years ago in reply to Former Member

    Hi Fabien

    When you register your own cryptoengine for a specific algorithm (RSA; AES, etc) that engine will be used in place of the default one. I had a look at the source code and, when you dynamically load a cryptoengine, it is added in front of a queue of engines. OpenSSL then scans the queue from begin to end looking for an engine that can process a given algorithm. Hence, the last engine you register for a specific algortihm will be for sure used for that algorithm

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to amgalbu

    Ok Ambrogio, thank you for these precisions.

    For the moment I trying others trick about CAAM handling.

    If I succeed I'll write here.

    After that I'll try OpenSSL.

     

     

    Thank you for your help.

     

     

    Fabien.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube