mirror of
https://github.com/vee1e/Write-ups.git
synced 2026-09-01 11:08:39 +00:00
fixing latex issues
This commit is contained in:
parent
a210391fdf
commit
5a0bc70984
1 changed files with 4 additions and 7 deletions
|
|
@ -56,16 +56,13 @@ So all it boils down to is finding the s value of both the primes and we can bre
|
|||
|
||||
<img src="https://render.githubusercontent.com/render/math?math=P = s .{2^{960}} + (as \mod {2^{64}})*2^{896} + ...... + (a^{14}s \mod 2^{64})*2^{64} + (a^{15}s \mod 2^{64}))">
|
||||
|
||||
So if we can get the s values for both of the primes, we can break the encryption!. Let the primes be $p$ and $q$ and let the s values for them be $s_1$ and $s_2$ respectively.
|
||||
So if we can get the s values for both of the primes, we can break the encryption!. Let the primes be <img src="https://render.githubusercontent.com/render/math?math=p"> and <img src="https://render.githubusercontent.com/render/math?math=q"> and let the s values for them be <img src="https://render.githubusercontent.com/render/math?math=s_1"> and <img src="https://render.githubusercontent.com/render/math?math=s_2"> respectively.
|
||||
|
||||
If we look at the equation for $n$, we can see the 64 MSB bits will be a result of the multiplication of the first term's MSB bits. Similarly the 64 LSB bits will be the result of the product last term's LSB bits. Using these two relation we can basically get the value of $s_1 * s_2$ and then it's just a matter of bruteforcing over it's divisors.
|
||||
|
||||
$$
|
||||
64 LSB \ bits \equiv [(a^{15}s_1 \mod 2^{64})*(a^{15}s_2 \mod 2^{64}) ]\mod 2^{64} \equiv a^{30}s_1s_2 \mod 2^{64}
|
||||
$$
|
||||
$$
|
||||
64 MSB \ bits = s_1*s_2
|
||||
$$
|
||||
<img src="https://render.githubusercontent.com/render/math?math=64 LSB \ bits \equiv [(a^{15}s_1 \mod 2^{64})*(a^{15}s_2 \mod 2^{64}) ]\mod 2^{64} \equiv a^{30}s_1s_2 \mod 2^{64}">
|
||||
|
||||
<img src="https://render.githubusercontent.com/render/math?math=64 MSB \ bits = s_1*s_2">
|
||||
|
||||
So here's the full implementaion in sage:
|
||||
```py
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue