Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Teensy 4 crypto

  1. #1
    Junior Member
    Join Date
    Jun 2021

    Teensy 4 crypto

    Are there libraries, or Arm Cortex assembler references for using the data co-processor (DCP) cryptographic acceleration? I'm new to the Teensy environment, and have a few projects that could utilize SHA256 hashing functionality and random number generator.

    Thanks in advance.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Not sure to what degree - but seems in a beta for 4.0 there was some minimal test code at least for the RND portion.

    Forum search or (bing/google) search engine search with right keywords might make it show up.

    Here's one :

    The beta has an index to functioanl areas :

    That links here for TRNG :

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    The Entropy library uses the random number hardware.

    So far there is no library support for SHA256 or AES128 in the DCP.

  4. #4
    Senior Member
    Join Date
    Dec 2016
    Montreal, Canada
    Duino coin was working on Teensy 4, according to another forum member, although you'd need their modded code to get it to work

  5. #5
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    here is an earlier post
    that describes using the T4 crypto accelerators for AES and SHA. The low level block operations are accelerated, so one would need to add code to do blocking etc to get a full library-like implementation. The NXP SDK has modified the mbedtls and wolfssl crypto libs to incorporate the T4 acceleration and T4 TRNG. You could study those libraries to see how you might make an accelerated Teensy lib. (the "unaccelerated" versions of mbedtls and wolfssl work on the Teensy 3/4)

    some comparisons of AES and SHA256 on various MCUs in perf.txt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts