Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code problem in coppersmith.sage #1

Open
swLai opened this issue Jan 23, 2019 · 2 comments
Open

code problem in coppersmith.sage #1

swLai opened this issue Jan 23, 2019 · 2 comments

Comments

@swLai
Copy link

swLai commented Jan 23, 2019

Thanks for sharing the work!

I have a little question about the code at line 99 in coppersmith.sage, which represents the formulae at page 9 below in (Wong, 2015).

I mean, in (Wong, 2015), g_ij = x^j * N^i * f^(m-i), but the code here is composed as g_ij = x^j * modulus^(m-i) * f^i... Would the results be different if I change the code here?

@mimoo
Copy link
Owner

mimoo commented Jan 23, 2019

honestly, I wrote this such a long time ago that I don't know. But it used to work so I wouldn't change things around :)

@swLai
Copy link
Author

swLai commented Jan 23, 2019

That makes sense, since LLL will always manifest the same shortest vector in a given lattice space as long as the original setup basis achieved certain conditions. So, the case here just gave an excellent example: Even though we did not take the suggested formulae, we can still get correct results as long as B is full rank, etc.
———
Another question is that, code line 131 states that, the wanted root should make the result achieve: gcd(result, modulus) >= N^beta.

That makes me interpret it as:
b should be greater than or equal to N^beta (b is subject to beta)

Since beta=1 in this experiment, b must represent the modulus,N, due to Coppersmith’s statement: b|N.

[The questions is: Does gcd(result, modulus) still represent b when beta < 1 ?]

Not sure am I wrong or not, but my opinion is that: To accommodate all possibilities, beta should, alternatively, be subject to b, which gives a sense of how to choose proper beta in order to produce X, m, t, epsilon.

For example, since b|N, b has to be p, q or N. And, in general RSA system, p, q ~ N^(1/2), we can choose beta based on this:
b ~ N^(1/2) >= N^beta —-> beta \in (0, 1/2]

And, the condition is: gcd(result, N) = gcd(kb, N) != 1 (b and N are not relative prime, then the root is a correct one)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants