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

Special square, pow u in final exponentiation #36

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

emmansun
Copy link
Contributor

for details, pls refer #35

gfp12.go Outdated Show resolved Hide resolved
func (e *gfP12) SpecialSquare(a *gfP12) *gfP12 {
tmp := &gfP12{}

f02 := &tmp.y.x
Copy link
Contributor

Choose a reason for hiding this comment

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

Let' make clear what is the isomorphism.

gfp12.go Show resolved Hide resolved
gfp12.go Outdated
// easy part of the final exponentiation. Used in the hard part
// of the final exponentiation. Function uses formulas in
// Granger/Scott (PKC2010).
func (e *gfP12) SpecialSquare(a *gfP12) *gfP12 {
Copy link
Contributor

Choose a reason for hiding this comment

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

it can be renamed to SquareCyclotomic or something more shorter. Similarly for the exponentiation by u

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed to SquareCyclo6

gfp12_test.go Outdated
got := &gfP12{}
expected := &gfP12{}

got.SpecialSquare(in)
Copy link
Contributor

Choose a reason for hiding this comment

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

add some warning, since this test assume the input is in the cyclotomic subgroup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added requirement for input

@bwesterb
Copy link
Member

bwesterb commented Jul 17, 2023

Thanks for this. For ease of review, could you add more explicitly to each function what it does; what it assumes; and why it works.

@emmansun
Copy link
Contributor Author

Thanks for this. For ease of review, could you add more explicitly to each function what it does; what it assumes; and why it works.

Hi @armfazh @bwesterb , i had tried my best to add more comments for all new added functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants