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

Duplicated mul_by_nonresidue function in Bn256 field extensions #90

Closed
davidnevadoc opened this issue Sep 14, 2023 · 1 comment
Closed

Comments

@davidnevadoc
Copy link
Contributor

davidnevadoc commented Sep 14, 2023

The extensions of Bn256 base field Fq2 and Fq6 are constructed choosing a quadratic/cubic non-residue in their respective base field. Each of these extensions implement the function multiply_by_nonresidue, which multiplies an element by a non-residue element of the extension field.

However, these extensions each have another function that is identical:

The remaining extension, Fq12, does not seem to have such duplicated function.
These functions are not used anywhere, I think they are just duplicates and should be removed for clarity.

Edit:
Moreover, the following comments should be corrected:

/// Multiply by cubic nonresidue v.

This v is the non-residue used for the quadratic extension [Fq12 : Fq6]. It is a quadritic, not cubic, non-residue.
The same applies for:
/// Multiply this element by quadratic nonresidue 9 + u.

This should be cubic, not quadriatic.

@davidnevadoc davidnevadoc changed the title Duplicated mul_by_nonresidue in Bn256 Duplicated mul_by_nonresidue function in Bn256 field extensions Sep 14, 2023
@davidnevadoc
Copy link
Contributor Author

Solved in #99

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

1 participant