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

bench-curve25519-dalek #68

Open
burdges opened this issue Nov 22, 2023 · 0 comments
Open

bench-curve25519-dalek #68

burdges opened this issue Nov 22, 2023 · 0 comments
Labels
easy An easy issue that might be good for someone new K-performance Performance optimization P-low Low priority
Milestone

Comments

@burdges
Copy link

burdges commented Nov 22, 2023

We should've some well optimized cryptographic code in the benchmarks.

As symmetric, I'd think blake2s hashing some pre-prepared random data.

As asymmetric, it's simplest to do curve25519-dalek I think. I suppose criterion does not fit VM benchmarks so well, so doing cargo bench maybe annoying. A simpler useful benchmark would be a variable base multi-scalar multiplication. In other words, invoke <EdwardsPoint as VartimeMultiscalarMul>::vartime_multiscalar_mul on some pre-prepared random points and scalars. We could do single scalar multiplications instead, but an MSM maybe gives a more meaningful comparison, thanks to being heavier.

Arkworks curve sound relevant of course, but one thing at a time. As curve25519-dalek is single threaded on all platforms, it's slightly easier to get honest benchmarks, and tells largely the same story. It's possible curve25519-dalek still needs backend features for some VMs, but likely still simpler than similar in arkworks.

@koute koute added this to the PolkaVM 1.0 milestone Jan 30, 2024
@koute koute added P-low Low priority K-performance Performance optimization easy An easy issue that might be good for someone new labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy An easy issue that might be good for someone new K-performance Performance optimization P-low Low priority
Projects
None yet
Development

No branches or pull requests

2 participants