Datasheet

Table Of Contents
...........continued
Option AND CARRYOPTIONS CarryOperand Resulting Operation
SET_CARRYOPTION(ADD_1) 1 R = X
2
+ 1
SET_CARRYOPTION(SUB_1) - 1 R = X
2
- 1
SET_CARRYOPTION(ADD_2) 2 R = X
2
+ 2
43.3.4.10.10 Status Returned Values
Table 43-34. Square Service Return Codes
Returned status Importance Meaning
PUKCL_OK Service functioned correctly
43.3.4.11 Integral (Euclidean) Division
43.3.4.11.1 Purpose
The purpose of this service is to compute the Euclidean Division of two multiple precision numbers in
GF(p) or polynomial in GF(2
n
). The Numerator is divided by the Denominator giving the Quotient “Quo”
and the Remainder “R”.
The following options are available:
Work in the GF(2
n
) field or in the standard integer arithmetic field GF(p)
43.3.4.11.2 How to Use the Service
43.3.4.11.3 Description
This service processes the calculus corresponding to:
 =  ×  +  0 <    =


The Numerator is Num.
The Divisior (Modulus) is Mod.
The Quotient is Quo.
The Remainder is R.
The Inputs are, the Numerator Num, and the Denominator Mod. The service calculates the Quotient and
the Remainder. The Remainder overwrites the Numerator and is copied to the R area.
If the parameter nu1QuoBase equals zero, the Quotient is not stored in memory.
If nu1QuoBase is different from zero, the Quotient length is (<Numerator Length> - <Denominator
Length>) + 4 bytes.
In this computation, the following areas need to be provided:
Num (pointed by {nu1NumBase,u2NumLength}) filled with the Numerator (with MSB word to zero).
Mod (pointed by {nu1ModBase,u2ModLength}) filled with the Denominator.
Workspace (pointed by {nu1CnsBase,64 or68}).
Quo (pointed by {nu1QuoBase,u2NumLength - u2ModLength + 4}) to contain calculated Quotient.
When the quotient is not needed, the nu1QuoBase pointer can be provided as NULL. In that
case, only the remainder will be provided as a result.
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1474