ring icon indicating copy to clipboard operation
ring copied to clipboard

Add support for doing RSA private key operations for keys with public modulus up to 16384 bits

Open briansmith opened this issue 2 years ago • 0 comments

Currently, ring limits the size of the public modulus of RSA private key operations to 4096 bits. This is in line with NIST/FIPS guidance that suggested (at the time, at least) using only 3072 or 4096 bit keys.

The underlying bigint math functions use stack space roughly in proportion of a multiple of the actual size of the modulus (the assembly-language squaring and multiplication) or the maximum allowed size, depending on the function. Thus, using too much stack space and/or triggering stack overflow is a very real issue when key sizes are 16384 bits (2048 bytes).

When the key is that large, the operation doesn't need to be particularly fast; we just need to make sure it works and is safe to use. Thus, we might use a different implementation strategy for these large keys that trades speed for less space usage.

briansmith avatar Mar 30 '22 17:03 briansmith