tag:blogger.com,1999:blog-9099779.post407391129334209951..comments2019-11-08T16:04:06.240+01:00Comments on StalkR's Blog: Write-up Codegate 2010 #17 - Crypto, Linear Congruential Generators and Vernam Cipher, the power of XORStalkRhttp://www.blogger.com/profile/15113480981262771031noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-9099779.post-76069797411805438792010-10-19T12:22:14.224+02:002010-10-19T12:22:14.224+02:00Hello, indeed very good comment I didn't speci...Hello, indeed very good comment I didn't specify that and these numbers may come from nowhere.<br /><br />According to Wikipedia (http://en.wikipedia.org/wiki/Linear_congruential_generator):<br />"The period of a general LCG is at most m, and for some choices of a much less than that. Provided that c is nonzero, the LCG will have a full period for all seed values if and only if:[2]<br /> 1. c and m are relatively prime,<br /> 2. a-1 is divisible by all prime factors of m,<br /> 3. a-1 is a multiple of 4 if m is a multiple of 4."<br /><br />So I just chose an LCG verifying this so it has full period m. If I recall correctly, it worked for any other LCG parameters you give that also verified this property. Except those with low m.<br /><br />It would be great to have the server source or binary to be sure how it was checked :)StalkRhttps://www.blogger.com/profile/15113480981262771031noreply@blogger.comtag:blogger.com,1999:blog-9099779.post-65007229510578260192010-10-19T11:15:10.393+02:002010-10-19T11:15:10.393+02:00how can you know "a=65 c=7 m=256" ??how can you know "a=65 c=7 m=256" ??Janehttp://twitter.com/_wooo_noreply@blogger.com