Datasheet

Table Of Contents
...........continued
Parameter Typ
e
Direction Location Data Length Before Executing the
Service
After Executing the
Service
u2MaxIncrement u2 I Maximum Increment
(see Note 4)
Maximum Increment
Note: 
1. This zone contains the number to be either tested or used as a seed for generation. It has to be
provided with one zero word on the MSB side. This area has supplementary constraints (see the
following Important note).
1. This parameter does not have to be provided and is used as an internal value for computing the
reduction’s constant.
2. The area {nu1ExpBase, u2NLength + 4} must be entirely in the Crypto RAM.
3. The generation starts from the number in {nu1NBase,u2NLength + 4} and increments it until a
number is found as probable prime. However, the generation may stop for two reasons: The
number has been incremented in a way it is bigger than <u2NLength> bytes, or the original number
has been incremented by more than <u2MaxIncrement>.
In case of probable prime generation, ensure that the addition of NSeed and Maximum Increment is not a
number with more bytes than u2NLength, as this would produce an overflow.
Important: 
One additional word is used on the LSB side of the NBase parameter; this word is restored at
the end of the calculus. As a consequence, the parameter nu1NBase must never be at the
beginning of the Crypto RAM, but at least at one word from the beginning.
One additional word is used on the MSB side of the NBase parameter; this word is not
corrupted. As a consequence the Area {nu1NBase, u2NLength} must not be at the end of the
Crypto RAM but at least at one word from the end.
Prime numbers of a size lower than 96 bits (three 32-bit words) cannot be generated or tested
by this service.
43.3.5.3.6 Options
Some of the Prime Generation options configure the Modular Exponentiation steps and so are very
similar to the Modular Exponentiation options.
The options are set by the u2Options input parameter, which is composed of:
the mandatory Operation Option described in Table 43-57
the mandatory Calculus Mode Option described in Table 43-58
the mandatory Window Size Option described in Table 43-59
The u2Options number is calculated by an “Inclusive OR” of the options. Some Examples in C language
are:
Operation: Probable Prime Testing with Fast Modular Exponentiation and the window size equal to 1
PUKCL(u2Options) = PUKCL_PRIMEGEN_TEST | PUKCL_EXPMOD_FASTRSA |
PUKCL_EXPMOD_WINDOWSIZE_1;
Operation: Probable Prime Generate with Regular Modular Exponentiation and the window size
equal to 2
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1498