Greetings, all. I took the liberty of creating a new library for interacting with the Teensy 4 CPU's DCP crypto module. It's a reimagining of the interface and driver entirely in C++. No C layer, and none of the complexity that's in the NXP SDK.
It's called Decept, and it can be found here:
github.com
I tried to distill all the necessary parts into a good API. I included a bunch of tests so that there's some trust.
What's there:
* All the NIST tests (well, maybe not all of them) for the relevant algorithms (I actually wrote a bunch of this a few years ago, so it's whatever was current then)
* HMAC: HMAC, TOTP
* CRC: CRC-32
* Hash: SHA-256, SHA-1
* Encryption: AES-128
What's not there yet:
* A complete non-blocking API; it's only partially done
* No examples
* I still need to complete the CTR DRBG, but I have local Hash- and HMAC-based DRBG's completed that I still need to go through and commit. (Deterministic random bit generators that are cryptographically secure.)
* Some sort of security review by experts more expert than me in the ways of security
* A better way to manage channels
* There's still room for design cleanup
Some asks:
* Don't rely on this for complete security just yet, because while executing the core algorithms is probably correct, it's usually the stuff around and that uses the crypto that isn't quite right for all cases.
* Some code review, especially by security experts more versed than I
* Contributions and suggestions/issues/comments
It's called Decept, and it can be found here:
GitHub - ssilverman/Decept: A library that makes use of the Teensy's built-in DCP module
A library that makes use of the Teensy's built-in DCP module - ssilverman/Decept
I tried to distill all the necessary parts into a good API. I included a bunch of tests so that there's some trust.
What's there:
* All the NIST tests (well, maybe not all of them) for the relevant algorithms (I actually wrote a bunch of this a few years ago, so it's whatever was current then)
* HMAC: HMAC, TOTP
* CRC: CRC-32
* Hash: SHA-256, SHA-1
* Encryption: AES-128
What's not there yet:
* A complete non-blocking API; it's only partially done
* No examples
* I still need to complete the CTR DRBG, but I have local Hash- and HMAC-based DRBG's completed that I still need to go through and commit. (Deterministic random bit generators that are cryptographically secure.)
* Some sort of security review by experts more expert than me in the ways of security
* A better way to manage channels
* There's still room for design cleanup
Some asks:
* Don't rely on this for complete security just yet, because while executing the core algorithms is probably correct, it's usually the stuff around and that uses the crypto that isn't quite right for all cases.
* Some code review, especially by security experts more versed than I
* Contributions and suggestions/issues/comments