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

Fix Issue #313 and optimize based on Issue #312 #314

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

BatchClayderman
Copy link
Contributor

Issue #313

  • Fix the multiple GT element generation issue.
  • Modify the original recursive logic to a simpler if-else logic.
  • Pre-generate the __gt when the object is instantiated, without having to check whether __gt has been generated every time a random GT element is required to be generated.
  • No seeds will be passed to the imported random function to generate different random elements when multiple elements are required to be generated even though a seed is specified to call the random method of the PairingGroup class.

Issue #312

  • Optimize the / 8 to >> 3.

There should be two commits in this pull request. If the official thinks adding seed1 and seed2 in the construction function of the PairingGroup class can destroy the consistency with constructors of other classes, please kindly refer to the first commit, or remove the two parameters in the construction function directly.


Tested on Ubuntu 24.04.1 LTS:

38483c971df32f2ff04f0364d34f19d

Thank you so much for offering this opportunity.

Issue JHUISI#313
- Fix the multiple GT element generation issue. 
- Modify the original recursive logic to a simpler ``if-else`` logic. 
- Pre-generate the ``__gt`` when the object is instantiated, without having to check whether ``__gt`` has been generated every time a random GT element is required to be generated. 
- No seeds will be passed to the imported ``random`` function to generate different random elements when multiple elements are required to be generated even though a seed is specified to call the ``random`` method of the ``PairingGroup`` class. 

Issue JHUISI#312
- Optimize the ``/ 8`` to ``>> 3``.
Issue JHUISI#313
- Fix the multiple GT element generation issue. 
- Modify the original recursive logic to a simpler ``if-else`` logic. 
- Pre-generate the ``__gt`` when the object is instantiated, without having to check whether ``__gt`` has been generated every time a random GT element is required to be generated. 
- No seeds will be passed to the imported ``random`` function to generate different random elements when multiple elements are required to be generated even though a seed is specified to call the ``random`` method of the ``PairingGroup`` class. 

Issue JHUISI#312
- Optimize the ``/ 8`` to ``>> 3``.
Copy link
Member

@jakinyele jakinyele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you for your contribution @BatchClayderman!

@jakinyele jakinyele merged commit 413a9c6 into JHUISI:dev Feb 3, 2025
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.

2 participants