Datasheet

Table Of Contents
R = (Z ± (MulValue × X + CarryOperand))mod B
RLength
Table 43-20. Smult Service (with Accumulate/Subtract From) Carry Settings
Carry Options CarryOperand Resulting Operation
SET_CARRYOPTION(ADD_CARRY) CarryIn R = Z ± (MulValue*X + CarryIn)
SET_CARRYOPTION(SUB_CARRY) - CarryIn R = Z ± (MulValue*X - CarryIn)
SET_CARRYOPTION(ADD_1_PLUS_CARRY) 1 + CarryIn R = Z ± (MulValue*X + 1 + CarryIn)
SET_CARRYOPTION(ADD_1_MINUS_CARRY) 1 - CarryIn R = Z ± (MulValue*X + 1 - CarryIn)
SET_CARRYOPTION(CARRY_NONE) 0 R = Z ± (MulValue*X)
SET_CARRYOPTION(ADD_1) 1 R = Z ± (MulValue*X + 1)
SET_CARRYOPTION(SUB_1) - 1 R = Z ± (MulValue*X - 1)
SET_CARRYOPTION(ADD_2) 2 R = Z ± (MulValue*X + 2)
Multiplication without Accumulation or Subtraction
When the case the options bits specify that neither an Accumulation nor a Subtraction should be
performed, this service performs the following operation:
R = (MulValue × X + CarryOperand)mod B
RLength
Table 43-21. Smult Service Carry Settings
Carry Options CarryOperand Resulting Operation
SET_CARRYOPTION(ADD_CARRY) CarryIn R = MulValue*X + CarryIn
SET_CARRYOPTION(SUB_CARRY) - CarryIn R = MulValue*X - CarryIn
SET_CARRYOPTION(ADD_1_PLUS_CARRY) 1 + CarryIn R = MulValue*X + 1 + CarryIn
SET_CARRYOPTION(ADD_1_MINUS_CARRY) 1 - CarryIn R = MulValue*X + 1 - CarryIn
SET_CARRYOPTION(CARRY_NONE) 0 R = MulValue*X
SET_CARRYOPTION(ADD_1) 1 R = MulValue*X + 1
SET_CARRYOPTION(SUB_1) -1 R = MulValue*X - 1
SET_CARRYOPTION(ADD_2) 2 R = MulValue*X + 2
43.3.4.7.8 Status Returned Values
Table 43-22. Smult Service Return Codes
Returned Status Importance Meaning
PUKCL_OK Service functioned correctly
43.3.4.8 Compare
43.3.4.8.1 Purpose
The purpose of this service is to compare two numbers in classical arithmetic GF(p).
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1462