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

Possibility of magnitude restrictions on group element field values #159

Open
peterdettman opened this issue Dec 12, 2014 · 3 comments
Open

Comments

@peterdettman
Copy link
Contributor

The group operations seem to generally assume input x,y,z can be multiplied directly i.e. there is an implicit mag 8 requirement, which could be worth adding verification for. In some group operations (broadly speaking those where special z values are in play, either gej_add_ge or coz) the input field values are normalized, usually to ensure that they are mag 6 or so (I am presupposing zero tests for h/i replacing u?/s? equality checks), but it varies. In practice the group ops don't produce higher than 6 mag anyway, so there's some waste here (and some performance-neutral jiggling might lower the output mags).

So I'm proposing to i) add pre/post verification for the current mag 8 assumptions, then ii) explore whether tightening the requirements can improve performance. At this stage, I'm only envisaging a simple global requirement, not op-specific bounds.

Thoughts?

@peterdettman
Copy link
Contributor Author

I should add that of course the mag 8 requirement is enforced by the field, but part ii) will be confusing if it is not explicit in the group code.

@sipa
Copy link
Contributor

sipa commented Dec 30, 2014

I'm fine with adding a requirement that all field elements inside _ge, _gej or _coz structs have a stronger normalization requirements than strictly necessary for field, if that means we can get rid of some explicit normalization steps.

@peterdettman
Copy link
Contributor Author

Great, I'll put something together once #159 goes through.

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