Question: Need help with a Cryptology / Cryptography problem using Python: (Linear Congruential Generator) I've implemented one of the fifteen linear congruential operator (with parameters m,

Need help with a Cryptology / Cryptography problem using Python:

(Linear Congruential Generator)

I've implemented one of the fifteen linear congruential operator (with parameters m, a, b) from https://en.wikipedia.org/wiki/Linear_congruential_generator, and run it for some intial seed s, see below for sample code in Python (hiding the actual parameters used). I simplified the system in always returning all of s, rather than just some of its bits (as would be done in the real system).

Need help with a Cryptology / Cryptography problem using Python: (Linear Congruential

Here's the sequence of values I get when I run gen(10): 29803012144720, 224690132215835, 4520194479498, 186909703350221, 12084869079124, 280008518876111, 237908866003246, 61283845112993, 77857653661336, 117859047675587,

Generator) I've implemented one of the fifteen linear congruential operator (with parameters

Figure out which of the systems I used by determining the values of m, a, and b (you don't have to find the initial s).

Hint: you need high-precision integer arithmetic. You can do this in Python, all you need is to be able to calculate modular inverses x-1 mod m. To do this, you can use a mathematical calculator such as Wolfram Alpha (avoid other web calculators; they generally don't have sufficient precision, since Javascript/PHP don't). In Wolfram alpha, use powermod(x,-1,m) to calculate the inverse of x modulo m, e.g. the inverse of 123123 with respect to 2^64 (http://www.wolframalpha.com/input/?i=powermod(123123,-1,2%5E64)). Wolfram Alpha allows you to write arbitrarily complex expressions, including, in particular, modular arithmetic (http://www.wolframalpha.com/input/?i=100*powermod(123123,-1,2%5E64)+mod+2%5E64)

Hint: first step would be to determine m so you can apply the method to break the linear congruential operator. There's really only one guess that's reasonable. If you can't determine which m is right, you may have to try several.

Eile Edit Format Run Options Windows Help Im def gen (k) global s for i in range (k) (sta b) mi print (s end Ln: 6 Col: 11 Eile Edit Format Run Options Windows Help Im def gen (k) global s for i in range (k) (sta b) mi print (s end Ln: 6 Col: 11

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!