24 RSA Accelerator (RSA)
24 RSA Accelerator (RSA)
24.1 Introduction
The RSA Accelerator provides hardware support for multiple precision arithmetic operations used in RSA asym-
metric cipher algorithms.
Sometimes, multiple precision arithmetic is also called "bignum arithmetic", "bigint arithmetic" or "arbitrary pre-
cision arithmetic".
24.2 Features
• Support for large-number modular exponentiation
• Support for large-number modular multiplication
• Support for large-number multiplication
• Support for various lengths of operands
24.3 Functional Description
24.3.1 Initialization
The RSA Accelerator is activated by enabling the corresponding peripheral clock, and by clearing the DPORT_RSA_PD
bit in the DPORT_RSA_PD_CTRL_REG register. This releases the RSA Accelerator from reset.
When the RSA Accelerator is released from reset, the register RSA_CLEAN_REG reads 0 and an initialization
process begins. Hardware initializes the four memory blocks by setting them to 0. After initialization is complete,
RSA_CLEAN_REG reads 1. For this reason, software should query RSA_CLEAN_REG after being released from
reset, and before writing to any RSA Accelerator memory blocks or registers for the first time.
24.3.2 Large Number Modular Exponentiation
Large-number modular exponentiation performs Z = X
multiplication. Aside from the arguments X, Y , and M , two additional ones are needed — r and M
arguments are calculated in advance by software.
The RSA Accelerator supports operand lengths of N ∈ {512, 1024, 1536, 2048, 2560, 3072, 3584, 4096} bits. The
bit length of arguments Z, X, Y , M , and r can be any one from the N set, but all numbers in a calculation must
be of the same length. The bit length of M
To represent the numbers used as operands, define a base-b positional notation, as follows:
In this notation, each number is represented by a sequence of base-b digits, where each base-b digit is a 32-bit
word. Representing an N -bit number requires n base-b digits (all of the possible N lengths are multiples of
Espressif Systems
Y
mod M . The operation is based on Montgomery
'
is always 32.
32
b = 2
598
Submit Documentation Feedback
'
. These
ESP32 TRM (Version 5.2)
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?