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

Division operator for GTElement (e1/e2) #438

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lokingdav
Copy link

Currently creating a witness encryption scheme based on BLS signatures. I am using this library. However, I needed the GTElement class to support inversing through divisions. Instead of reimplementing element classes (since r is private in GT), this PR fixed the issue.

I know BLS signature implementation does not use division, but libraries that depend on this might need it. Moreover, my witness encryption library currently depends on my fork, and I want to use the main Chia-Network/bls-signatures instead.

@coveralls-official
Copy link

coveralls-official bot commented Oct 25, 2023

Pull Request Test Coverage Report for Build 6819261096

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 94.677%

Totals Coverage Status
Change from base Build 6614779237: 0.03%
Covered Lines: 1654
Relevant Lines: 1747

💛 - Coveralls

Copy link
Member

@hoffmang9 hoffmang9 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution

@hoffmang9
Copy link
Member

Can you sign your commit?

@hoffmang9
Copy link
Member

image Looks like something is still a bit off.

@lokingdav
Copy link
Author

image Looks like something is still a bit off.

Yeah i noticed and I'm resolving it. Used a different email for this repository

Copy link

github-actions bot commented Jan 9, 2024

'This PR has been flagged as stale due to no activity for over 60
days. It will not be automatically closed, but it has been given
a stale-pr label and should be manually reviewed.'

@emlowe
Copy link
Contributor

emlowe commented May 13, 2024

Apologies for the long delay in looking at this. But I have a question. The included test is odd since division is not normally commutative - so one doesn't expect a test where a/b == b/a

I would expect something like (a*b)/b == a - does this version of division pass that test?

Reading a little more carefully, I see gt1 and gt2 are actually the same element - the test is then a/a == a/a which doesn't seem very useful?

@github-actions github-actions bot removed the stale-pr label May 14, 2024
@lokingdav
Copy link
Author

Hi @emlowe thanks for this message. In fact, I forgot about this PR.

Your observation is correct, which would be a more precise test. The current test works because gt1 and gt2 are both GT generators and are the same. It will make more sense that gt1 and gt2 are different elements. I'll update the test.

Copy link

'This PR has been flagged as stale due to no activity for over 60
days. It will not be automatically closed, but it has been given
a stale-pr label and should be manually reviewed.'

Copy link
Contributor

@emlowe emlowe left a comment

Choose a reason for hiding this comment

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

I'm not sure it's correct to call "multiplication of the inverse" a division operation

@github-actions github-actions bot removed the stale-pr label Oct 19, 2024
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.

3 participants