Skip to content
This repository was archived by the owner on Sep 28, 2025. It is now read-only.
This repository was archived by the owner on Sep 28, 2025. It is now read-only.

Use num_traits::pow to efficiently compute random mu_k values for prover #27

@cargodog

Description

@cargodog

As of #26, the prover tediously computes the mu_l exponent for each index l in his proof. This could be optimized in future work to use a more efficient exponentiation algorithm (e.g. square and add), compute each mu_l in a single iterative computation, or both.

As it happens, num_traits::pow exists for just this purpose, and would be the ideal solution to this problem. Unfortunately, curve25519-dalek does not implement the necessary num_traits::identities traits. The ideal solution to this problem, would involve implementing num_traits for curve25519-dalek and submitting a patch upstream.

Alternatively, I could consider wrapping the Scalar type into a local Wscalar type, and implement the traits locally. This is not ideal, but may be quicker than pushing changes upstream.

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is neededoptimizationPerformance improvement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions