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:31:07 EDT (-0400)
  Re: How to break a simple "encryption"?  
From: scott
Date: 8 Jul 2014 05:03:24
Message: <53bbb3dc$1@news.povray.org>
> Can it really be done with just a multiplication?

Yes, because it takes advantage of the fact that on a computer A*B 
actually calculates (A*B)mod(2^N), when N is the number of bits in the 
destination register.

For example, with 8-bit numbers, the inverse of multiply-by-3 is 
multiply-by-171. Note that it only works if the multiplicand is greater 
than 2 and prime. So that narrows down the possible values of SECRET2 in 
the OP quite a lot.


Post a reply to this message

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