Datasheet

Table Of Contents
43.3.4.10.8 Constraints
When the options only indicate a square, the constraints involving nu1ZBase are not checked. The
following conditions must be avoided to ensure that the service works correctly:
nu1XBase, nu1RBase or nu1ZBase are not aligned on 32-bit boundaries
{nu1XBase, u2XLength}, {nu1ZBase, 2*u2XLength} or {nu1RBase, 2*u2XLength} are not in Crypto
RAM
u2XLength is either: < 4, > 0xffc or not a 32-bit length
{nu1RBase, 2*u2XLength} overlaps {nu1XBase,u2XLength}
{nu1RBase, 2*u2XLength} overlaps {nu1ZBase, 2*u2XLength} and nu1RBase >nu1ZBase
If a modular reduction is specified, the relevant parameters must be defined according to the chosen
reduction and follow the description in 43.3.5.1 Modular Reduction. Additional constraints to be
respected and error codes are described in this section and in Table 43-49.
Multiplication with Accumulation or Subtraction
Where the options bits specify that either an Accumulation or a subtraction should be performed, this
command performs the following operation:
R = (Z ± (X
2
+ CarryOperand))mod B
2 ˟ XLength
Table 43-32. Multiplication with Accumulation or Subtraction
Option AND CARRYOPTIONS CarryOperand Resulting Operation
SET_CARRYOPTION(ADD_CARRY) CarryIn R = Z ± (X
2
+ CarryIn)
SET_CARRYOPTION(SUB_CARRY) - CarryIn R = Z ± (X
2
- CarryIn)
SET_CARRYOPTION(ADD_1_PLUS_CARRY) 1 + CarryIn R = Z ± (X
2
+ 1 + CarryIn)
SET_CARRYOPTION(ADD_1_MINUS_CARRY) 1 - CarryIn R = Z ± (X
2
+ 1 - CarryIn)
SET_CARRYOPTION(CARRY_NONE) 0 R = Z ± (X
2
)
SET_CARRYOPTION(ADD_1) 1 R = Z ± (X
2
+ 1)
SET_CARRYOPTION(SUB_1) - 1 R = Z ± (X
2
- 1)
SET_CARRYOPTION(ADD_2) 2 R = Z ± (X
2
+ 2)
43.3.4.10.9 Multiplication without Accumulation or Subtraction
Where the options bits specify that either an accumulation or a subtraction should be performed, this
command performs the following operation:
R = (X
2
+ CarryOperand)mod B
2 ˟ XLength
Table 43-33. Square Service Carry Settings
Option AND CARRYOPTIONS CarryOperand Resulting Operation
SET_CARRYOPTION(ADD_CARRY) CarryIn R = X
2
+ CarryIn
SET_CARRYOPTION(SUB_CARRY) - CarryIn R = X
2
- CarryIn
SET_CARRYOPTION(ADD_1_PLUS_CARRY) 1 + CarryIn R = X
2
+ 1 + CarryIn
SET_CARRYOPTION(ADD_1_MINUS_CARRY) 1 - CarryIn R = X
2
+ 1 - CarryIn
SET_CARRYOPTION(CARRY_NONE) 0 R = X
2
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1473