Last active
April 5, 2020 07:50
-
-
Save nihalpasham/83680cc0016d501099518d5110b9f617 to your computer and use it in GitHub Desktop.
Google pay's -DSSS code sequence
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
| code = [0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, | |
| 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, | |
| 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, | |
| 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, | |
| 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, | |
| 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, | |
| 1, 1, 1, 1, 1, 1, 1] | |
| degree = 7 | |
| # print(u) | |
| for mask in range (0, 127): | |
| for seed in range(1, 127): | |
| wq = [] | |
| seq = np.array(glfsr(degree, mask, seed)) | |
| if np.array_equal(seq, code): | |
| print(seed) | |
| print(mask) | |
| Output-- | |
| >> 80 | |
| >> 120 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment