POV-Ray : Newsgroups : povray.off-topic : How to break a simple "encryption"? : Re: How to break a simple "encryption"? Server Time
28 Jul 2024 10:26:00 EDT (-0400)
  Re: How to break a simple "encryption"?  
From: Lars Rohwedder
Date: 7 Jul 2014 03:57:42
Message: <53ba52f6$1@news.povray.org>
>>> Which value of Secret2 would allow the * (without overloading) to
>>> reverse the value with a value of Inverse_of_secret2.
>>
>> if SECRET2 is be 123456789, its inverse is 16969517551553616445.
>>
>> It is just the "multiplicative inverse modulo 2^64".
>>
>> Note the arithmetics of unsigned integer data types is always
>> "modulo" 2^BITSIZE of that data type.
>
> You use the crypto-version of the * operation (from Nist), not the
> usual multiplication.

No, it is just the integer multiplication that is done by nerly every
common CPU, so the usual computer arithmetics. That is no crypto foo.

Btw, the GCC translates integer divisions (with constant divisor) to
"multiplications with the inverse element", because multiplications are
faster than divisions on many CPUs.


Lars R.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.