[cap-talk] Dan Bernstein's qmail security lessons paper
Sandro Magi
smagi at higherlogics.com
Mon Dec 17 15:03:19 EST 2007
Jonathan S. Shapiro wrote:
> On Mon, 2007-12-17 at 12:51 -0500, Sandro Magi wrote:
>> Modular arithmetic has the same semantics as native integers. So they
>> are integers, from a certain point of view.
>
> I believe you mean to be saying that conventional register-based
> fixed-point arithmetic is defined w.r.t. a ring algebra. I agree.
>
> This is precisely why fixed-point arithmetic is NOT integer arithmetic.
> Integer arithmetic is defined over an infinite field.
Integers are also defined by a ring algebra [2], not a field [3].
Computers cannot represent true integer arithmetic because of the
infinity. ALL supposed computable "integer arithmetic" is modular
arithmetic [1]. Addition is partial function for both arbitrary
precision integers and native integers, where addition for true integers
is total. I see no significant semantic difference between overflow and
"resource exhaustion".
As Zooko mentioned, this might be a useful psychology debate for the
usability of one particular abstraction over another, but I see little
formal difference.
Sandro
[1] http://mathworld.wolfram.com/ModularArithmetic.html
[2] http://mathworld.wolfram.com/Integer.html
[3] http://mathworld.wolfram.com/Field.html
More information about the cap-talk
mailing list