Datasheet

Table Of Contents
This service checks the signature and fills the status accordingly.
Important:  This service has a quick implementation without additional security.
43.3.6.13.2 How to Use the Service
43.3.6.13.3 Description
The operation performed is:
Verify = EcDsaVerifySignature(Pt
A
, HashVal, Signature, CurveParameters, PublicKey)
The points used for this operation are represented in different coordinate systems.
In this computation, the following parameters need to be provided (such that u2MaxLength =
max(u2ModLength, u2ScalarLength)):
A the input point is filled with the affine values (X,Y) and Z = 1 (pointed by {pu1PointABase,
(3*(u2ModLength + 4)) * (2
(WA-2)
)})
P the modulus filled and Cns the working space for the Fast Modular Constant not initialized (pointed
by {pu1ModBase, u2ModLength + u2MaxLength + 16})
The a parameter relative to the elliptic curve filled and workspace not initialized (pointed by
{pu1AWorkBase,8*u2MaxLength + u2ModLength + 48})
The order of the Point A on the elliptic curve (pointed by {pu1OrderPointBase,u2ScalarLength +4})
HashVal the hash value beforehand generated and filled (pointed by {pu1HashBase,u2MaxLength
+4})
The Public Key point is filled in “mixed” coordinates (X,Y) with the affine values and Z = 1 (pointed by
{nu1PointPublicKeyGen, (3*(u2ModLength + 4)) * (2
(WB-2)
)})
The input signature (R,S), even if it is not a Point, is represented in memory like a point in affine
coordinates (X,Y) (pointed by {nu1PointSignature, 2*u2ScalarLength + 8})
The operation consists of obtaining a V value with all input parameters and checks that V equals the
provided R. If all is correct and the signature is the good one, the status is set to PUKCL_OK. If all is
correct and the signature is wrong, the status is set to PUKCL_WRONG_SIGNATURE. If an error occurs,
the status is set to the corresponding error value (see Status Returned Values below).
43.3.6.13.4 Parameters Definition
To place the parameters correctly the maximum of u2ModLength and u2ScalarLength must be calculated:
u2MaxLength = max(u2ModLength, u2ScalarLength)
WA is the Point A window size and WB is the Point Public Key window size (see Options below for
details).
Important:  Please calculate precisely the length of areas with the formulas and the max()
service which takes the maximum of two values. Ensure that the pu1 type is a pointer on 4
bytes and contains the full address (see 43.3.3.4 Aligned Significant Length for details).
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1538