AES CBC with nRF52832 using NCS

Hello,

I'm using nRF52832 custom board with nRF Connect SDK2.6.0

When I try to run AES CBC sample from ncs\v2.6.0\nrf\samples\crypto\aes_cbc, 

I got an error log:

*** Booting nRF Connect SDK d96769faceca ***
[00:00:00.382,934] <inf> aes_cbc: Starting AES-CBC-NO-PADDING example...
[00:00:00.382,934] <inf> aes_cbc: Generating random AES key...
[00:00:00.382,965] <inf> aes_cbc: psa_generate_key failed! (Error: -134)
[00:00:00.382,965] <inf> aes_cbc: Example exited with error!

But when I run the same application code build for nRF52840 dongle, it workrd.

How do I fix the code for my nrf52832?

[00:00:00.326,324] <inf> aes_cbc: Starting AES-CBC-NO-PADDING example...
[00:00:00.326,324] <inf> aes_cbc: Generating random AES key...
[00:00:00.326,477] <inf> aes_cbc: AES key generated successfully!
[00:00:00.326,507] <inf> aes_cbc: Encrypting using AES CBC MODE...
[00:00:00.326,782] <inf> aes_cbc: Encryption successful!
[00:00:00.326,812] <inf> aes_cbc: ---- IV (len: 16): ----
[00:00:00.326,843] <inf> aes_cbc: Content:
                                  7e 91 78 41 07 dc 61 8e  94 04 8d d1 98 aa 2a 51 |~.xA..a. ......*Q
[00:00:00.326,873] <inf> aes_cbc: ---- IV end  ----
[00:00:00.326,904] <inf> aes_cbc: ---- Plaintext (len: 64): ----
[00:00:00.326,934] <inf> aes_cbc: Content:
                                  45 78 61 6d 70 6c 65 20  73 74 72 69 6e 67 20 74 |Example  string t
                                  6f 20 64 65 6d 6f 6e 73  74 72 61 74 65 20 62 61 |o demons trate ba
                                  0m

Parents Reply Children
Related