Datasheet

Table Of Contents
// Condition Option PUKCL(u2Options) = ...;
// Initialize parameters
PUKCL_CondCopy(nu1XBase) = <Base of the X number>;
PUKCL_CondCopy(nu1RBase) = <Base of the R number>;
PUKCL_CondCopy(u2XLength) = <Length of the X number>;
PUKCL_CondCopy(u2RLength) = <Length of the R number>;
// vPUKCL_Process() is a macro command, which populates the service name
// and then calls the library...
vPUKCL_Process(CondCopy,pvPUKCLParam);
if (PUKCL(u2Status) == PUKCL_OK)
{
...
}
else // Manage the error
43.3.4.6.7 Constraints
The parameters placement that are not allowed are listed below.
If the conditional option and the CarryIn do not lead to execute the copy, no checks are made on the
constraints to be respected.
If nu1XBase equals zero, no checks are made on nu1XBase (fixed) and u2XLength (unused).
The following conditions must be avoided to ensure that the service works correctly:
nu1XBase or nu1RBase are not aligned on 32-bit boundaries
u2XLength or u2RLength is either: <4, >0xffc or not a 32-bit length or u2XLength >u2RLength
{nu1XBase, u2XLength} or {nu1RBase, u2RLength} do not entirely lie in Crypto RAM
{nu1XBase, u2XLength} overlaps {nu1RBase,u2RLength}
43.3.4.6.8 Status Returned Values
Table 43-17. CondCopy Service Return Codes
Returned status Importance Meaning
PUKCL_WRONG_SERVICE Severe An inconsistency has been detected between the called
service and the provided service number.
PUKCL_OK Service functioned correctly
43.3.4.7 Small Multiply, Add, Subtract, Exclusive OR
43.3.4.7.1 Purpose
This purpose of this service is to multiply a large number X by a single-word number, MulValue, and
perform an optional accumulation/subtract with a large number Z, returning the result R.
The following options are available:
Work in the GF(2
n
) or in the standard GF(p) arithmetic integer field
Add of a supplemental CarryOperand
Overlap of the operands is possible, taking into account some constraints
Modulo-reduction of the computation result (see 43.3.5.1 Modular Reduction)
In addition to a multiply, possible uses of this service can include:
Copy a block of data from one place to another (if u4MulValue is 1). This operation can alternatively
be made by using the Fast Copy service (see 43.3.4.5 Fast Copy/Clear).
Adding/Subtracting two numbers (if u4MulValue is1)
Xoring two blocks of data (if u4MulValue is 1 and the selected mathematical field is GF(2
n
))
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1457