Datasheet

Table Of Contents
X (pointed by {nu1XBase,u2Length}) filled with X (with MSB word to zero)
Y (pointed by {nu1YBase,u2Length}) filled with Y (with MSB word to zero)
A (pointed by {nu1ABase,u2Length}) to contain calculated A
Z (pointed by {nu1ZBase,u2Length}) to contain calculated Z
The workspace (pointed by {nu1WorkSpace,32})
43.3.4.12.4 Parameters Definition
Table 43-37. GCD Service Parameters
Parameter Type Dir. Location Data Length Before Executing
the Service
After Executing the
Service
Specific/Gf2n Bit I GF(2n) Bit
nu1XBase nu1 I Crypto RAM u2Length Base of X Number X Base of X
Filled with the GCD D
u2Length u2 I Length of the Areas
X, Y, A, Z
Length of the Areas X,
Y, A, Z
nu1YBase nu1 I Crypto RAM u2Length Base of Y Number Y Base of Y Cleared area
nu1ABase nu1 I Crypto RAM u2Length Base of A Base of A
Filled with the result
nu1ZBase nu1 I Crypto RAM u2Length + 4
(see Note 1)
Base of Z Base of Z
Filled with the result
nu1WorkSpace nu1 I Crypto RAM 32 bytes Base of the
workspace
Base of the workspace
corrupted
Note: 
1. The additional word is 4 zero bytes.
The parameters X and Y must have their most significant 32-bit word cleared to zero. The length
u2Length is the length of the longer of the parameters X and Y including this zero word.
To clarify here is an example:
X is an 8 bytes number.
Y is a 12 bytes number.
This example is processed this way before the use of the GCD service:
The longer number is Y so its length is taken and increased by 4 bytes for the 32-bit word cleared to
zero, this gives u2Length = 16 bytes. Therefore, X, Y, A and Z areas have a length of 16 bytes.
Y is padded with 4 bytes cleared to zero on the MSB side and the u2Length = 16 bytes are written in
memory (LSB first).
X is padded with 8 bytes cleared to zero on the MSB side and the u2Length = 16 bytes are written in
memory (LSB first).
The areas A and Z are mapped in memory with a size of u2Length = 16 bytes.
The workspace is mapped in memory with its constant size of 32 bytes
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1478