Created
March 4, 2016 14:22
-
-
Save AndyNovo/74f87f5fb8263f03adaa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s1 = 3904654068 | |
s2 = 897137925 | |
s3 = 4281244274 | |
m = 2**32 | |
M = matrix(Zmod(m), 2, 2, [s1, 1, s2, 1]) | |
abv = M.inverse()*matrix(Zmod(m), 2, 1, [s2, s3]) | |
a = abv[0,0] | |
b = abv[1,0] | |
s4 = (s3*a + b) % m | |
s5 = (a*s4 + b) % m | |
print s5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment