Datasheet

Table Of Contents
43.3.5.2.2 How to Use the Service
43.3.5.2.3 Description
Important:  Before using these functions, ensure that the constant Cns has been calculated
with the Setup of the Modular Reductions service.
This service processes the following operation:
The service name for this operation is ExpMod.
R = X
Exp
mod(N)
In this computation, the following parameters need to be provided:
X: input number (pointed by {nu1XBase,u2ModLength +16})
N: modulus (pointed by {nu1ModBase,u2ModLength +4}).
Exp: exponent (pointed by {pfu1ExpBase,u2ExpLength +4})
Cns: Fast Modular Constant (pointed by {nu1CnsBase,u2ModLength +8})
Precomp: precomputation workspace (pointed by{nu1PrecompBase,PrecompLen})
Blinding: exponent blinding value (provided inu1Blinding)
The length PrecompLen depends on the lengths and options chosen; its calculus is detailed in Options
below.
Note:  The minimum value for u2ModLength is 12 bytes. Therefore, the significant length of N must be at
least three 32-bit words.
43.3.5.2.4 Parameters Definition
Table 43-50. ExpMod Service Parameters
Parameter Type Direction Location Data Length Before
Executing the
Service
After
Executing the
Service
u2Options u2 I Options (see
below)
Options (see
below)
nu1ModBase nu1 I Crypto
RAM
u2ModLength
+ 4
Base of N Base of N
untouched
nu1CnsBase nu1 I Crypto
RAM
u2ModLength
+ 8
Base of Cns Base of Cns
untouched
u2ModLength u2 I Length of N Length of N
nu1XBase (see
Note 1)
nu1 I Crypto
RAM
u2ModLength
+ 16
Base of X Base of X
Filled with the
result
nu1PrecompBase nu1 I Crypto
RAM
See below Base of
Precomp as a
workspace
Base of
Precomp
workspace
corrupted
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1492