Datasheet

Table Of Contents
}
else // Manage the error
43.3.4.13.9 Constraints
Random Number Generation
The following conditions must be avoided to ensure that the service works correctly:
{nu1RBase,u2RLength} not in RAM
{nu1RBase,u2RLength} not accessible or authorized for writing
Deterministic Random Number Generation
The length of the parameter nu1XSeedbase is: XSeedLength = max( 2*u2XKeyLength, 44 bytes) The
max() macro takes a maximum of two values.
The following conditions must be avoided to ensure that the service works correctly:
nu1XKeyBase,nu1Workspace, nu1Workspace2, nu1XSeedBase, nu1QBase, nu1RBase are not
aligned on 32-bit boundaries
{nu1XKeyBase, u2XKeyLength}, {nu1Workspace, 64 bytes}, {nu1Workspace2, 2*u1XKeyLength +4},
{nu1XSeedBase, XSeedLength}, {nu1QBase, 24 bytes} or {nu1RBase, 20 bytes} are not in PUKCC
RAM
u2XKeyLength is either: < 20, > 64 or not a 32-bit length
nu1Workspace2 not multiple of 256.
Overlaps exist between two or more of the areas: {nu1XKeyBase, u2XKeyLength}, {nu1Workspace,
64 bytes}, {nu1XSeedBase, XSeedLength}, {nu1QBase, 24 bytes} or {nu1RBase, 20 bytes}
The area {nu1RBase, 20} can overlap with {nu1Workspace, 64 bytes} or {nu1QBas, 24 bytes}. The
pointer nu1RBase can equal the pointer nu1XSeedBase.
43.3.4.13.10 Status Returned Values
Table 43-42. RNG Service Return Codes
Returned status Importance Meaning
PUKCL_OK Information Service functioned correctly
43.3.5 Modular Arithmetic Services
This section provides a complete description of the modular arithmetic services, which consists of two
sets:
Modular reductions, which can be used as stand alone operations, or used as a final step of most
arithmetic operations (full and small multiplications, squaring).
Modular operations, which include modular exponentiations (with or without using the CRT) and a
probabilistic prime number generation.
These operations work on general data so the modulus has no special form. The modular services are
available through:
a Fast form (may return a congruence of the result, with a high probability to have a Normalized
result)
a Normalized form (returns the exact result, strictly lower than the modulus)
a Euclidean form (returns the exact result, strictly lower than the modulus)
The following table describes the modes of the modular reduction with the hypothesis:
In GF(p): The modulus is N with length NLength in bytes
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1483