Open JeremyTubongbanua opened 1 year ago
I believe a fresh RSA context should be used each time to not reuse old RNG contexts..
Will have to investigate more on this.
This is an optimization. Until we are comfortable with functionality and can move on to "nice have optimizations", this will be back logged.
Discussion:
@JeremyTubongbanua - Maybe importing N E D P Q every time is costly for every RSA operation.
@XavierChanth @realvarx - think it is not costly, we will investigate later
Not that it's not costly, but that there are many ways to optimize this, so we should avoid over-optimizing early.
In all RSA functions, we always create a new
mbedtls_rsa_context
which holds things like the public keys and private keys to do various operations.For optimization, we should have one singular mbedtls_rsa_context once the public key and private key have been imported.