Datasheet

Table Of Contents
The following table shows all of the necessary parameters for the Full Multiply option. When the Addition
or Subtraction option is not chosen, it is not necessary to fill in the nu1ZBase parameter.
Table 43-26. Fmult Service Options
Option Purpose Required
Parameters
SET_MULTIPLIEROPTION(PUKCL_FMUL_ONLY) Perform R = X*Y +
CarryOperand
nu1RBase,
nu1YBase,
u2YLength,
nu1XBase, u2XLength
SET_MULTIPLIEROPTION(PUKCL_FMUL_ADD) Perform R = Z + X*Y +
CarryOperand
nu1RBase,
nu1ZBase, nu1YBase,
u2YLength,
nu1XBase, u2XLength
SET_MULTIPLIEROPTION(PUKCL_FMUL_SUB) Perform R = Z - (X*Y +
CarryOperand)
nu1RBase,
nu1ZBase, nu1YBase,
u2YLength,
nu1Xlength,
u2XLength
43.3.4.9.6 Code Example
PUKCL_PARAM PUKCLParam;
PPUKCL_PARAM pvPUKCLParam = &PUKCLParam;
// Gf2n and CarryIn shall be beforehand filled (with zero or one)
PUKCL(Specific).Gf2n = ...;
PUKCL(Specific).CarryIn = ...;
PUKCL(u2Option) =...;
// Depending on the option specified, not all fields should be filled
PUKCL_Fmult(nu1XBase) = <Base of the ram location of X>;
PUKCL_Fmult(u2XLength) = <Length of X>;
PUKCL_Fmult(nu1YBase) = <Base of the ram location of Y>;
PUKCL_Fmult(u2YLength) = <Length of Y>;
PUKCL_Fmult(nu1ZBase) = <Base of the ram location of Z>;
PUKCL_Fmult(nu1RBase) = <Base of the ram location of R>;
// vPUKCL_Process() is a macro command, which populates the service name
// and then calls the library...
vPUKCL_Process(Fmult,pvPUKCLParam);
if (PUKCL(u2Status) == PUKCL_OK)
{
// The Full multiply has been executed correctly
...
}
else // Manage the error
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1467