Skip to content

Check length of bits of NTildej #146

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

Merged
merged 5 commits into from
Oct 19, 2021
Merged

Check length of bits of NTildej #146

merged 5 commits into from
Oct 19, 2021

Conversation

yycen
Copy link
Contributor

@yycen yycen commented Oct 14, 2021

NTildej received from Pj, should be of length 2048. This PR add such length checking.

@yycen yycen requested review from ackratos and FitzLu October 14, 2021 13:11
ackratos
ackratos previously approved these changes Oct 15, 2021
FitzLu
FitzLu previously approved these changes Oct 15, 2021
@yycen yycen dismissed stale reviews from FitzLu and ackratos via cf1d424 October 15, 2021 06:10
@creamwhip
Copy link

Hello friends, you may want to allow some variance in the size of the paillier modulus - it might be 2047, 2046 with some probability and those are still ok

@yycen
Copy link
Contributor Author

yycen commented Oct 16, 2021

Hello friends, you may want to allow some variance in the size of the paillier modulus - it might be 2047, 2046 with some probability and those are still ok

Hello, in our implementation when generating safe primes, we also need the generated value start with "11". So the factor of a paillier modulus >= 2^1023+2^1022. While (2^1023+2^1022)*(2^1023+2^1022)>2^2047, the result paillier modulus should be exactly 2048 bit.

@yycen yycen merged commit 73560da into bnb-chain:master Oct 19, 2021
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

Successfully merging this pull request may close these issues.

4 participants