Datasheet

Table Of Contents
Multiplication without Accumulation or Subtraction
In the case the options bits specify that either an Accumulation or a subtraction should be performed, this
service performs the following operation:
R = (X × Y + CarryOperand)mod B
XLength + YLength
Table 43-28. Fmult Service Carry Settings
Option AND CARRYOPTIONS CarryOperand Resulting Operation
SET_CARRYOPTION(ADD_CARRY) CarryIn R = X*Y + CarryIn
SET_CARRYOPTION(SUB_CARRY) - CarryIn R = X*Y - CarryIn
SET_CARRYOPTION(ADD_1_PLUS_CARRY) 1 + CarryIn R = X*Y + 1 + CarryIn
SET_CARRYOPTION(ADD_1_MINUS_CARRY) 1 - CarryIn R = X*Y + 1 - CarryIn
SET_CARRYOPTION(CARRY_NONE) 0 R = X*Y
SET_CARRYOPTION(ADD_1) 1 R = X*Y + 1
SET_CARRYOPTION(SUB_1) - 1 R = X*Y - 1
SET_CARRYOPTION(ADD_2) 2 R = X*Y + 2
43.3.4.9.9 Status Returned Values
Table 43-29. Fmult Service Return Codes
Returned Status Importance Meaning
PUKCL_OK Service functioned correctly
43.3.4.10 Square
43.3.4.10.1 Purpose
The purpose of this service is to compute the square of a big number and optionally accumulate/subtract
from a second big number.
Please note that this service uses an optimized implementation of the squaring. It also means that when
the GF(2
n
) flag is set, the execution time will be smaller than when not set (in that case, the squaring
execution time will still be smaller than for a standard multiplication).
The available options are as follows:
Work in the GF(2
n
) or in the standard integer arithmetic field
Add of a supplemental CarryOperand
Overlapping of the operands is possible, taking into account some constraints
Modular Reduction of the computation result
43.3.4.10.2 How to Use the Service
43.3.4.10.3 Description
This service provides the following (if not computing a modular reduction of the result):
R = [Z] ± (X
2
+ CarryOperand)
Or (if computing a modular reduction of the result):
R = ([Z] ± (X
2
+ CarryOperand))mod N
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1469