[cap-talk] Dan Bernstein's qmail security lessons paper

David Wagner daw at cs.berkeley.edu
Mon Dec 17 18:18:24 EST 2007


Sandro Magi write:
>Computers cannot represent true integer arithmetic because of the
>infinity. ALL supposed computable "integer arithmetic" is modular
>arithmetic [1].

That doesn't sound right to me.  Generally bignum libraries support
"integer arithmetic".  The larger the integer you try to operate on,
the greater the time and space it takes to complete the operation.
Some operations on large integers may not complete in a timely manner,
or may not complete successfully at all (e.g., because they threw a
OutOfMemory exception).  But that's different in an important way from
saying that they use modular arithmetic.  If the bignum computation
completes, then you know that it was performed correctly in the integers
(not in some ring of integers mod 2^n).  That's an important property
in some applications.  In some applications, reducing mod 2^n leads
to an incorrect answer, while failing to complete in a timely manner
leads to no answer at all.  If no answer at all is better than an
incorrect answer (if it is preferable to fail safe), then bignum
arithmetic may be preferable over modular arithmetic.


More information about the cap-talk mailing list