Home
last modified time | relevance | path

Searched hist:"7910 f4d89008cedd0176c4091bb8b8c17812a003" (Results 1 – 1 of 1) sorted by relevance

/optee_os/lib/libmbedtls/core/
H A Drsa.c7910f4d89008cedd0176c4091bb8b8c17812a003 Fri Aug 12 13:35:55 UTC 2022 Lars Persson <larper@axis.com> core: mbedtls: Use a DRBG to speed up RSA key generation

The output rate of a TRNG is quite slow and this has a big impact
on the time needed to generate an RSA key since that process does
require a lot of random bits to find prime numbers.

We instantiate a CTR DRBG that is seeded from the TRNG to provide a
higher-speed source of random bits.

Performance comparison for rsa 2048 key generation on our device
with a TRNG that outputs on the order of 1e5 bits per second.

Before patch (14 samples)
mean time 14.02 sec stddev. 7.91

With patch (14 samples):
mean time 1.67 sec stddev. 1.24

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Lars Persson <larper@axis.com>