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

Question: blinding mechanism #1

Open
rriemann opened this issue Aug 20, 2017 · 3 comments
Open

Question: blinding mechanism #1

rriemann opened this issue Aug 20, 2017 · 3 comments

Comments

@rriemann
Copy link

Hello!

n = key.params['n'].to_i
r = (rand*(n-1)).to_i

Don't you have to use here 2**n instead of n?

All the best,
Robert

@Inversion-des
Copy link
Member

According to https://en.wikipedia.org/wiki/Blind_signature#Blind_RSA_signatures.5B2.5D:235
We just looking for "random value r, such that r is relatively prime to N".

So r = (rand*(2**n-1)).to_i will just change the starting point of search for gcd.
Is it important? Do you have any formulas/docs for this approach?

I think I just used this search from some other implementation, so it can be not ideal, but it works.

@rriemann
Copy link
Author

From the one-time pad cipher scheme, we learn, that if the ciphertext shall provide no information on the message, than the random secret must be of the same size (entropy) like the message.

We increase the secret (key) lengths to make signing more robust in face of brute force attacks and I think also the random secret should be as large as the key in order to safeguard from this kind of attacks.

What has been your source?

@Inversion-des
Copy link
Member

Ok, makes sense. Thank you for the explanation!
I really do not have any good source for that formula, just reused one from someone else's implementation.

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

No branches or pull requests

2 participants