How to access functions like SHA-256 from the CRYPTOCELL?

I need a checksum to verify integrity of some data blocsk. As I saw, that the nrf5340 hardware has some builtin support for SHA-256, I though: cool, let's use SHA-256

Now, I'm desperately searching for documentation as how to access that functionality. My application is based on the Nordic version of Zephyr and in an ideal world, I would access some Zephyr API functions to use the underlying CRYPTOCELL hardware.

However, when I lookup the Crypto-API in the Nordic-Zephyr documentation (https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/crypto/index.html), I can find a few pointers, that SHA-256 is implemented but when I try to lookup details in the API section (https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/crypto/api/index.html) I do not get any details as how to use SHA-256.

How is this API supposed to be used? Is there more detailed documentation?

The nRF5340 data sheet mentions that: "The CRYPTOCELL cryptographic functions are accessible through a software library provided in the device SDK.". Searching on https://docs.nordicsemi.com/ for the term "device SDK" just yield hits to the sentence above.

Ok, let's assume, that by "device SDK", "nRF ConnectSDK" is meant. First hit, searching for "SHA-256": https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/crypto/doc/nrf_oberon.html. Ok, there is a library called nrf_oberon, is that, what I'm supposed to use? Oh, in the very same chapter, there is a nrf_cc3xx_platform library. Maybe that's the one, I want to use? There is a link to an API documentation! Ups, content cannot be loaded? Ok, let's try an other browser! That works and the resulting URL can also be viewed in Safari: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/crypto/doc/api.html#crypto-api-nrf-cc3xx-platform

Is that the library that I'm supposed to use?

Totally confused,

Torsten

Related