OVMS3-idf/tools/ldgen
KonstantinKondrashov 5ed8388f6b mbedtls: Add Montgomery exponentiation implementation (HAC 14.94)
It gave us a better performance of RSA operations. (2~11 times)

The old modexp implementation (Z = X ^ Y mod M) loaded all the data into
the hw registers and was waiting for completion, but due to
the hardware RSA implementation, the calculations always started with 4096 bit,
which took a lot of time.
Measurement results (measurements were made for keys: 2048, 3072 and 4096 bits)
(Old) - Sliding-window exponentiation (HAC 14.85):
keysize = 2048 bits
RSA key operation (performance): public [93206 us], private [280189 us]
keysize = 3072 bits
RSA key operation (performance): public [293614 us], private [858157 us]
 keysize = 4096 bits
RSA key operation (performance): public [653192 us], private [1912126 us]

Instead (Old) - Sliding-window exponentiation (HAC 14.85) was implemented
(New) - Montgomery exponentiation (HAC 14.94) which showed
better performance on private and public keys.
keysize = 2048 bits
RSA key operation (performance): public [14504 us], private [149456 us]
keysize = 3072 bits
RSA key operation (performance): public [35073 us], private [392743 us]
keysize = 4096 bits
RSA key operation (performance): public [58650 us], private [787186 us]

For this reason, the old implementation was removed
and the MBEDTLS_HARDWARE_MPI option was turned on by default.

Why the MPI_INTERRUPT option is removed:
the old implementation used calculations on the hardware and
it took a lot of time (10ms - 500ms). And in order not to stand idle
while waiting for completion, an interrupt option was added.
This made it possible to carry out other tasks during the calculation,
and this one to block. The new method is free from such a drawback and
the maximum duration of one RSA HW operation does not exceed 70us (usually 2-70 μs).
This option is no longer needed.

Closes: IDF-965
2019-11-05 16:33:11 +08:00
..
samples mbedtls: Add Montgomery exponentiation implementation (HAC 14.94) 2019-11-05 16:33:11 +08:00
test ldgen: allow multiple mapping fragments to map same library 2019-06-12 10:48:54 +08:00
__init__.py tools: implement linker script generation 2018-11-16 12:42:02 +08:00
fragments.py ldgen: allow multiple mapping fragments to map same library 2019-06-12 10:48:54 +08:00
generation.py ldgen: allow multiple mapping fragments to map same library 2019-06-12 10:48:54 +08:00
ldgen.py cmake: Use environment variables file for all config binaries 2019-07-01 15:54:27 +10:00
ldgen_common.py ldgen: rename common module 2019-04-13 08:59:32 +08:00
sdkconfig.py Use kconfiglib from $IDF_PATH/tools/kconfig_new 2019-09-11 14:30:31 +02:00