Datasheet

Table Of Contents
...........continued
Parameter Type Direction Location Data Length Before
Executing the
Service
After
Executing the
Service
u2XKeyLength u2 I Length of
XKey,
Xseed[0] and
Xseed[1]
Length of XKey,
Xseed[0] and
Xseed[1]
nu1QBase nu1 I Crypto
RAM
20 bytes Base of Q Base of Q
nu1RBase nu1 I Crypto
RAM
u2RLength Base of R Base of R filled
with the result
on 20 bytes
Note: 
1. The nu1 Workspace2 must be a multiple of 256.
43.3.4.13.7 Options
The option is set by the u2Options input parameter that must take one of the values listed in the following
table. Please note that the values, OPTION_RNG_SEED and OPTION_RNG_GETSEED, are reserved
for future use.
Table 43-41. RNG Service Options
Option Purpose Required Parameters
PUKCL_RNG_SEED Reserved Reserved
PUKCL_RNG_GET Generation of a random number from
the RNG
nu1RBase, u2RLength
PUKCL_RNG_X931_GET Generation of a random number from
the Deterministic RNG
nu1XKeyBase, nu1Workspace,
nu1XSeedBase, u2XKeyLength,
nu1QBase, nu1RBase
PUKCL_RNG_GETSEED Reserved Reserved
43.3.4.13.8 Code Example
PUKCL_PARAM PUKCLParam;
PPUKCL_PARAM pvPUKCLParam = &PUKCLParam;
// ! The Random Number Generator must be initialized and started
// ! following the directives given for the RNG on the chip
PUKCL(u2Option) =...;
// Initializing parameters
PUKCL_Rng(nu1RBase) = <Base of the ram location to store the rng>;
PUKCL_Rng(u2RLength) = <Length of the rng to get>;
// vPUKCL_Process() is a macro command, which populates the service name
// and then calls the library...
vPUKCL_Process(Rng,pvPUKCLParam);
if (PUKCL(u2Status) == PUKCL_OK)
{
// The RNG generation has been executed correctly
...
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1482