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

Passing non-positive-integer secparam in PairingGroup construction #312

Closed
YiYistudy opened this issue Dec 31, 2024 · 1 comment
Closed

Comments

@YiYistudy
Copy link

Hi, guys.
Recently, I have been confused about the secparam in the class PairingGroup.
I knew that the security parameter ($\lambda$) can decide the security level of a system in theory.
However, when I passed different values like -1, 0.5, 7, 512, and 1024 to create a PairingGroup object, I found there seemed to be no differences in time or communication costs in cryptography schemes.
Moreover, I have searched the secparam in codes related to PairingGroup and only found messageSize involves the variable secparam.
Thus, I am confused about the role the Python parameter secparam plays in the class PairingGroup and whether it makes sense to pass values like -1, 0.5, and 7 both in theoretical cryptography schemes and practical Python charm library-related implementations.
By the way, if the secparam is limited to positive integers in __init__, it may be better to use >> 3 instead of / 8 in messageSize.
Thanks & regards.

BatchClayderman added a commit to BatchClayderman/charm that referenced this issue Feb 1, 2025
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``.
BatchClayderman added a commit to BatchClayderman/charm that referenced this issue Feb 1, 2025
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``.
jakinyele pushed a commit that referenced this issue Feb 3, 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``.
jakinyele pushed a commit that referenced this issue Feb 3, 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``.
@jakinyele
Copy link
Member

Fixed in the merged PR - #313

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

No branches or pull requests

2 participants