Datasheet

Table Of Contents
// Depending on the option specified, not all fields should be filled
PUKCL_ExpMod(nu1ModBase) = <Base of the ram location of N>;
PUKCL_ExpMod(u2ModLength) = <Length of N>;
PUKCL_ExpMod(nu1CnsBase) = <Base of the ram location of Cns>;
PUKCL_ExpMod(nu1XBase) = <Base of the ram location of X>;
PUKCL_ExpMod(nu1PrecompBase) = <Base of the ram location of Precomp>;
PUKCL_ExpMod(pfu1ExpBase) = <Base of the location of Exp>;
PUKCL_ExpMod(u2ExpLength) = <Length of Exp>;
...
// vPUKCL_Process() is a macro command, which populates the service name
// and then calls the library...
vPUKCL_Process(ExpMod, pvPUKCLParam);
if (PUKCL_Param.Status == PUKCL_OK)
{
// operation has been performed correctly
...
}
else // Manage the error
43.3.5.2.7 Constraints
The following combinations of input values should be avoided in the case of a modular reduction ‘alone’,
meaning that it has not been requested as an option of any other command:
nu1ModBase,nu1CnsBase, nu1XBase,nu1PrecompBase,nu1ExpBase are not aligned on 32-bit
boundaries
{nu1ModBase, u2ModLength + 4}, {nu1CnsBase, u2ModLength + 8}, {nu1XBase, u2ModLength
+16},{nu1PrecompBase, <PrecompLength>} are not in Crypto RAM
{nu1ExpBase,u2ExpLength + 4} has no part in Crypto RAM and
PUKCL_EXPMOD_EXPINPUKCCRAM is specified
u2ModLength or u2ExpLength are either: < 4, > 0xffc or not a 32-bit length
None or both PUKCL_EXPMOD_REGULARRSA and PUKCL_EXPMOD_FASTRSA are specified.
{nu1PrecompBase,<PrecompLength>} overlaps with either: {nu1ModBase, u2ModLength +4},
{nu1CnsBase, u2ModLength + 8} {nu1XBase, u2ModLength + 16} or {nu1ExpBase, u2ExpLength
+ 4}
{nu1XBase,u2ModLength + 16} overlaps with either: {nu1ModBase, u2ModLength + 4},
{nu1CnsBase, u2ModLength + 8} or {nu1ExpBase, u2ExpLength + 4}
{nu1ModBase, u2ModLength + 4} overlaps {nu1CnsBase, u2ModLength +8}
43.3.5.2.8 Maximum Sizes for the Modular Exponentiation
The following table provides the maximum sizes for the Modular Exponentiation, depending on the
window size and the presence of the exponent in Crypto RAM.
The figures below are calculated supposing that u2ExpLength =u2ModLength.
In case of the PUKCL_EXPMOD_EXPINPUKCCRAM option is specified, for the computation of the
maximum acceptable size, it is assumed the Exponent is entirely in the Crypto RAM and its length is
equal to the Modulus one.
Otherwise, the Exponent is entirely out of the Crypto RAM and so the computation do not depend on
its length.
Table 43-54. Maximum Exponentiation Sizes
Option Specified Maximum Modulus Size
(bytes)
Maximum Modulus Size
(bits)
Exponent in Crypto RAM, 1 bit window 576 4608
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1495