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
    Posts
    1

    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
    Posts
    14,462
    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 : pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test

    The beta has an index to functioanl areas : forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test

    That links here for TRNG : pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,485
    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
    Location
    Montreal, Canada
    Posts
    3,832
    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
    Posts
    2,633
    here is an earlier post https://forum.pjrc.com/threads/54711...l=1#post197722
    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
  •