
RM0453 Rev 2
703/1454
RM0453
Public key accelerator (PKA)
721
Note:
Fractional results for above formulas are rounded up to the nearest integer since PKA core
processes 32-bit words.
Note:
The maximum ROS is 99 words (3136-bit max exponent size), while the maximum EOS is
21 words (640-bit max operand size).
•
The column indicated with Storage in the following tables indicates either the Register
PKA_CR, or the address offset within the PKA, located in the PKA RAM area (starting
from 0x400). To recover the physical address of an operand the application must add to
the indicated offset the base address of the PKA.
•
About writing parameters (“IN” direction)
–
When elements are written as input in the PKA memory, an additional word with all
bits equal to zero must be added. As an example, when ECC P256 is used and
when loading an input (represented on 256 bits or 8 words), an additional word is
expected by the PKA and it has to be filled with zeros.
–
About endianess, for example to prepare the operation ECC Fp scalar
multiplication, when application writes x
p
coordinate for an ECC P256 curve
(EOS= 9 words) the least significant bit is to be placed in bit 0 at address offset
0x55C; the most significant bit is to be placed in bit 31 of address offset 0x578.
Then, as mentioned above, word 0x00000000 should also be written at address
offset 0x57C.
–
Unless indicated otherwise all operands in the tables are integers.
•
About PKA outputs (“OUT” direction)
–
Unless specified in the tables PKA does not provide an error output when a wrong
parameter is written by the application.
Caution:
Validity of all input parameters to the PKA must be checked before issuing any PKA
operation. Indeed, the PKA assumes that all input parameters are valid and consistent with
each other.
24.4.2
Montgomery parameter computation
This function is used to compute the Montgomery parameter (R
2
mod
n
) used by PKA to
convert operands into the Montgomery residue system representation.
Note:
This operation can also be used with ECC curves. In this case prime modulus length and
EOS size must be used.
Operation instructions for Montgomery parameter computation are summarized in
.
Table 146. Montgomery parameter computation
Parameters with direction
Value (Note)
Storage
Size
IN
MODE
0x01
PKA_CR
6 bits
Modulus length
(In bits, 0
≤
value < 3136bits)
RAM@0x404
32 bits
Modulus value n
(Odd integer only, n < 2
3136
)
RAM@0xD5C
ROS
OUT
Result: R
2
n
-
RAM@0x594