TRNG on S32K144EVB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TRNG on S32K144EVB

2,543 Views
bix010
Contributor III

Hi,

I'm trying out the CSEc funtionality on the S32K144EVB-Q100.

In AN5401 (attached), it says in Section 3 that APIs for TRNG are available.

However, in the header files defining the CSEc commands, I have the following and I do not see one for TRNG. Perhaps one of the reserved commands?

Help greatly appreciated :smileyhappy:.

typedef enum {
CSEC_CMD_ENC_ECB = 0x1U,
CSEC_CMD_ENC_CBC,
CSEC_CMD_DEC_ECB,
CSEC_CMD_DEC_CBC,
CSEC_CMD_GENERATE_MAC,
CSEC_CMD_VERIFY_MAC,
CSEC_CMD_LOAD_KEY,
CSEC_CMD_LOAD_PLAIN_KEY,
CSEC_CMD_EXPORT_RAM_KEY,
CSEC_CMD_INIT_RNG,
CSEC_CMD_EXTEND_SEED,
CSEC_CMD_RND,
CSEC_CMD_RESERVED_1,
CSEC_CMD_BOOT_FAILURE,
CSEC_CMD_BOOT_OK,
CSEC_CMD_GET_ID,
CSEC_CMD_BOOT_DEFINE,
CSEC_CMD_DBG_CHAL,
CSEC_CMD_DBG_AUTH,
CSEC_CMD_RESERVED_2,
CSEC_CMD_RESERVED_3,
CSEC_CMD_MP_COMPRESS
} csec_cmd_t;

0 Kudos
Reply
3 Replies

2,043 Views
veronicavelciu
NXP Employee
NXP Employee

Hello Bertrand,

The CSEc commands related to random number generation are the following:

  • CSEC_CMD_INIT_RNG
  • CSEC_CMD_EXTEND_SEED
  • CSEC_CMD_RND

There are no separate commands for true/pseudo-random number generation.

According to the reference manual, a TRNG sub-block exists and enables true random number generation:

Additionally a TRNG and Miyaguchi-Prenell compression sub-blocks enables true random number generation
(entropy generator for PRNG in AES sub-block).

Best regards,

Veronica

2,043 Views
bix010
Contributor III

Hello Veronica,

Thanks for your reply. Could you explain what the CMD_EXTEND_SEED does, and when it should be used?

Thanks!

Bertrand

0 Kudos
Reply

2,043 Views
veronicavelciu
NXP Employee
NXP Employee

Hello Bertrand,

According to the RM and the SHE Spec:

The EXTEND_SEED command extends the seed of the PRNG by compressing the
former seed value and the supplied ENTROPY into a new seed. This new seed is then to
be used to generate a random number by invoking the CMD_RND command.

This seed is generated for the first time using the internal TRNG when INIT_RNG is invoked and it is used as input to the random number generator (PRNG). Whenever additional entropy is needed, EXTEND_SEED can be invoked.

Best regards,

Veronica