Datasheet

Table Of Contents
There is no difference on the final result when using any of the options for this service. The choice has to
be made according to the available resources (RAM, Time) and also taking into account the expected
security level.
For this service, two exclusive Calculus Modes are possible. The following table describes the Calculus
Mode Options.
Table 43-51. ExpMod Service Calculus Mode Option
Option Explanation
PUKCL_EXPMOD_FASTRSA Performs a Fast computation
PUKCL_EXPMOD_REGULARRSA Performs a Regular computation, slower than the Fast version, but
using Regular calculus methods
For this service, four window sizes are possible. The window size in bits is those of the windowing
method used for the exponent.
The choice of the window size is a balance between the size of the parameters and the computation time:
Increasing the window size increases the precomputation workspace.
Increasing the window size reduces the computation time (may not be relevant for very small
exponents).
The following table details the size of the precomputation workspace, depending on the chosen window
size option.
Table 43-52. ExpMode Service Window Size Options and Precomputation Space Size
Option specified Size of the PrecompBase
Workspace (bytes)
Content of the Workspace
PUKCL_EXPMOD_WINDOWSIZE_1 3*(u2ModLength + 4) + 8 x
PUKCL_EXPMOD_WINDOWSIZE_2 4*(u2ModLength + 4) + 8 x x
3
PUKCL_EXPMOD_WINDOWSIZE_3 6*(u2ModLength + 4) + 8 x x
3
x
5
x
7
PUKCL_EXPMOD_WINDOWSIZE_4 10*(u2ModLength + 4) + 8 x x
3
x
5
x
7
x
9
x
11
x
13
x
15
The exponent can be located in RAM or in the data space. If one part of the exponent is in Crypto RAM
this must be mandatory signaled by using the option PUKCL_EXPMOD_EXPINPUKCCRAM.
The following table describes this option.
Table 43-53. ExpMod Service Exponent in Crypto RAM Option
Option Purpose
PUKCL_EXPMOD_EXPINPUKCCRAM The exponent can be read from any data space of memory,
including Flash, RAM or even Crypto RAM. When at least one
word the exponent is in Crypto RAM, this option has to be set.
43.3.5.2.6 Code Example
PUKCL_PARAM PUKCLParam;
PPUKCL_PARAM pvPUKCLParam = &PUKCLParam;
PUKCL(u2Option) =...;
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1494