Implementation of RSA without dynamic allocation
A typical RSA implementation incorporates a multi-precision integer
library. A typical multi-precision integer library uses dynamic allocation
to represent large integers as arrays of machine words just the right
size.
I expect there must be a bound on the mathematical integers one may
encounter when using the multi-precision integers only to encrypt or
decrypt messages of known length (typically, symmetric encryption keys)
with, say, RSA-2048, and that it would be possible to implement the
algorithm by allocating space for all necessary intermediate results
either statically or on the stack.
I found this forum thread suggesting this is possible. It does not
indicate maximum integer sizes. Perhaps it is obvious ("you need 2048 bits
for all integers, duh!"). In any case, I would be more interested in an
already existing implementation, if there is one.
As a side-question that does not deserve its own entry, do typical
implementations of elliptic curve cryptography require dynamic allocation?
No comments:
Post a Comment