Datasheet

Table Of Contents
43.2.6 Events
Not applicable.
43.3 Functional Description
43.3.1 Public Key Cryptography Library (PUKCL) Application Programming Interface (API)
The Public Key Cryptography Controller (PUKCC) is a peripheral that can be used to accelerate public
key cryptography, and processes public key cryptography algorithm calculus in both Prime field (GF(p))
and Binary field (GF(2
n
)). Different functionalities of the PUKCC are accessed with the help of the Public
Key Cryptography Library (PUKCL), which is embedded into a dedicated ROM inside the microcontroller.
The PUKCL provides access to many algorithms and functions. The features provided, start from basic
addition or comparison, up to the RSA or ECDSA complete computation. The library can be utilized by
including the PUKCL Driver in the application and passing parameters through a common Application
Programming Interface (API). The PUKCC Driver is available in Atmel START within Drivers >
Cryptography. This library can be used in conjunction with a SSL software stack to improve performance
and helps to reduce the RAM usage and time taken to perform different cryptographic functions.
43.3.2 PUKCL Features
PUKCL features include:
43.3.4 Basic Arithmetic and Cryptographic Services - PUKCL self-test, GCD, integral division, etc.
43.3.5 Modular Arithmetic Services - Modular reduction, modular exponentiation, probable prime
generation and modular exponentiation
43.3.6 Elliptic Curves Over GF(p) Services - Point addition and doubling on an elliptic curve in a
prime field, ECDSA signature generation and verification on an elliptic curve over GF(p)
43.3.7 Elliptic Curves Over GF(2n) Services - Point addition and doubling on an elliptic curve in a
prime field, ECDSA signature generation and verification on an elliptic curve over GF(2
n
)
43.3.3 PUCKL Usage
The following sections provide details on accessing the PUKCL and its features.
43.3.3.1 Initializing the PUKCC and PUKCL
For a project created with Atmel START, the clock initialization is handled by the initialization function
atmel_start_init. After a power-on reset, and when the PUKCC Clock is enabled, a Crypto RAM
clear process is launched. It is mandatory to wait until the end of this process before using the Crypto
Library.
The following code shows how to wait for the Crypto RAM clear process.
while ((PUKCCSR & BIT_PUKCCSR_CLRRAM_BUSY) != 0);
The next task to be done is self-test. From the generated project in Atmel Studio, copy the example for
the PUKCC Driver SelfTest and add it to the main source file. This is a mandatory step before using the
library. The return values from the SelfTest service must be compared against known values mentioned in
the service description (see the Description section in 43.3.4.1 SelfTest).
Example 43-1. PUKCC Initialization
void PUKCC_self_test(void)
{
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1444