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

Fixed GM算法中二次非剩余条件判断 Update readme.md #117

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

niuran
Copy link

@niuran niuran commented Nov 13, 2024

原条件只能保证 x是模p的二次非剩余 或 x是模q的二次非剩余,修改后即可保证x是模p的二次非剩余 且 x是模q的二次非剩余。 原输出样例中p=1009,x = 5,可验证x是模p的二次剩余,解为244和765, pow(244,2,1009)=5,pow(765,2,1009)=5

原条件只能保证 x是模p的二次非剩余 或 x是模q的二次非剩余,修改后即可保证x是模p的二次非剩余 且 x是模q的二次非剩余。
原输出样例中p=1009,x = 5,可验证x是模p的二次剩余,解为244和765, pow(244,2,1009)=5,pow(765,2,1009)=5
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.

1 participant