Skip to content

Optimised sqrt variants #543

@mmagician

Description

@mmagician

Currently there are three sqrt algorithms implemented in arkworks:

For even extension fields:

For odd extension fields:

  • Tonelli-Shanks which works for all fieds no matter the modulus
  • Specialized Shanks algorithm for case where modulus is 3 mod 4

To be still implemented are the remaining specialized algorithms for odd extension fields. See Figure 1 here for the algorithm taxonomy.

Odd extension fields:

  • 1 mod 16 (Tonelli Shanks)
  • 3 mod 4 (Shanks)
  • 9 mod 16
  • 5 mod 8

Also linking an issue for fields with high 2-adicity: #40, which might require some refactoring to incorporate addition chains.

Preliminary work was done here.

Metadata

Metadata

Assignees

Labels

T-featureType: new featuresT-performanceType: performance improvements

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions