Skip to content

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

Merged
jakinyele merged 2 commits intoJHUISI:devfrom
yueryang:dev
Feb 3, 2025
Merged

Fix Issue #313 and optimize based on Issue #312#314
jakinyele merged 2 commits intoJHUISI:devfrom
yueryang:dev

Conversation

@yueryang
Copy link
Copy Markdown
Contributor

@yueryang yueryang commented Feb 1, 2025

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 #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``.
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``.
Copy link
Copy Markdown
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!

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