Datasheet

Table Of Contents
Important:  Before using this service:
Ensure that the constant Cns has been calculated with the setup of the Modular Reduction
service.
Be sure to follow the directives given for the RNG on the chip you use (particularly
initialization, seeding) and compulsorily start the RNG
.
43.3.6.9.4 Parameters Definition
Table 43-81. ZpEccRandomiseCoordinate Service Parameters
Parameter Type Direction Location Data Length Before
Executing the
Service
After
Executing the
Service
nu1ModBase nu1 I Crypto RAM u2ModLength + 4 Base of
modulus P
Base of
modulus P
nu1CnsBase nu1 I Crypto RAM u2ModLength + 8 Base of Cns Base of Cns
u2ModLength u2 I Length of
modulus P
Length of
modulus P
nu1PointBase nu1 I Crypto RAM 3*u2ModLength
+ 12
Input point Resulting point
nu1RandomBase nu1 I Crypto RAM u2ModLength + 4 Random Corrupted
nu1Workspace nu1 I Crypto RAM 3*u2ModLength
+ 28
Workspace
43.3.6.9.5 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) = 0;
// Depending on the option specified, not all fields should be filled
PUKCL _ZpEccRandomiseCoordinate(nu1ModBase) = <Base of the ram location of P>;
PUKCL _ZpEccRandomiseCoordinate(u2ModLength) = <Byte length of P>;
PUKCL _ZpEccRandomiseCoordinate(nu1CnsBase) = <Base of the ram location of Cns>;
PUKCL_ZpEccRandomiseCoordinate(nu1RandomBase) = <Base of the ram location where the the RNG
is stored>;
PUKCL _ZpEccRandomiseCoordinate(nu1PointBase) = <Base of the ram location of the point>;
PUKCL _ZpEccRandomiseCoordinate(nu1Workspace) = <Base of the ram location of the workspace>;
...
// vPUKCL_Process() is a macro command, which populates the service name
// and then calls the library...
vPUKCL_Process(ZpEccRandomiseCoordinate,&PUKCLParam);
if (PUKCL (u2Status) == PUKCL_OK)
{
...
}
else // Manage the error
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1528