The CryptoCell peripheral (see the nRF52840 Product Specification) on nRF52840 SoCs provides fast and power-efficient cryptographic functionality. The nrf_cc310 and ARM TrustZone CryptoCell provides an API to use hardware-accelerated cryptography.
To help you get started using the CryptoCell API, the SDK includes several example applications that demonstrate the use of many CryptoCells features and verify their behavior.
The following example applications are available:
Name | Description |
---|---|
aes | Demonstrates how to use the Advanced Encryption Standard. |
chacha_poly | Demonstrates how to use the ChaCha variant of the Salsa20 stream cipher. |
ecc | Demonstrates how to use Elliptic Curve Cryptopgraphy (ECC). The example shows Elliptic Curve Diffie-Hellman (ECDH) and Elliptic Curve Digital Signature Algorithm (ECDSA) key generation, signing, and verification. CryptoCell supports the Edwards and Montgomery families of curves. |
hash | Demonstrates the hash capabilities of CryptoCell. The following hash algorithms are supported: SHA-1, SHA-224, SHA-256, and SHA-512. |
hkdf | Demonstrates the HMAC-based key derivation function. |
hmac | Demonstrates how to use keyed-hash message authentication codes. |
rnd | Demonstrates random number generation. |
rsa | Demonstrates how to generate RSA keys and how to use them for encryption and decryption. |
You can find the source code and the project file of the examples in the following folder: <InstallFolder>\examples\crypto\nrf_cc310
Test the CryptoCell Example applications by performing the following steps:
armgcc
folder of the example at examples\crypto\nrf_cc310\example_name\pca10056\blank\armgcc
.make
to build the project._build
folder to the board.