GithubHelp home page GithubHelp logo

Comments (9)

huitseeker avatar huitseeker commented on August 24, 2024 1

This implementation in arkworks shows a promising 12-15% performance improvement for Scott checks over the Bowe checks (also implemented by @simonmasson in a prior PR).

from blst.

dot-asm avatar dot-asm commented on August 24, 2024 1

I get +19% on G1 group check and just +6% on G2. But I'm a little but confused about the G1 check, because there seems to be an additional criterion for the β value. I mean besides it being a cubic root of unity. Because the one we have in src/e1.c doesn't work, its square does... Or inverse if you wish... [Just in case, which is also cubic root.]

+19% is somewhat surprising. Indeed, both checks rely on ~128-bit scalar multiplication, with the new check's addition chain being just 7% shorter. Well, the original test performs additional operations, with them the difference between the amounts of point operations is 10%, still far from 19%... On the other hand, +6% on G2 is in alignment with the difference in amount of point operations...

As for "early out" optimization. I reckon it makes less sense to implement it, because the probability of hitting a point that would be caught in it by chance is [astronomically] low, while those who try to exhaust your computational resources can easily bypass it.

from blst.

dot-asm avatar dot-asm commented on August 24, 2024 1

the probability of hitting a point that would be caught in it is [astronomically] low, while those who try to exhaust your computational resources can easily bypass it.

Just in case to clarify. The only cause for the amount of the group check failures that you would care about is that somebody is messing with you. If they simply pick points at random and throw at you, the probability of them picking one that would be caught early on is low. So that you would waste practically as much computational resources as if the "early out" check was not performed. But if you have one, it would cost them nothing to avoid it and make you pay the full price irregardless.

from blst.

dot-asm avatar dot-asm commented on August 24, 2024 1

"+" means that the results were improved, in other words Scott's checks are faster. "Nothing else to say" refers rather to the no-early-out thing. If you wonder if the code is committed, then yes, in November, 9th.

from blst.

yelhousni avatar yelhousni commented on August 24, 2024 1

So it seems there was an error in Scott preprint for G2 membership test proof. However, the result is still correct (more on that here: https://eprint.iacr.org/2022/352.pdf).

from blst.

dot-asm avatar dot-asm commented on August 24, 2024

One should keep in mind that reported improvement coefficients are relative to the scalar multiplication by the curve order. And blst doesn't do group checks by multiplication by the curve order. This is not to say that the suggested method can't be faster, but one is unlikely to be able to describe the speedup as considerable in the context. But it will looked into, for sure.

BTW, suggestion for G1 rather targets new protocols, not existing ones. And I reckon that it's not given that it would be suitable for every application. At least I fail to see how would it prevent signature malleability... Or what am I missing?

from blst.

dot-asm avatar dot-asm commented on August 24, 2024

Well, there is nothing else to say I suppose....

from blst.

huitseeker avatar huitseeker commented on August 24, 2024

I'm sorry, I must have misread your comment @dot-asm : did your "+x%" mean that your benchmarking revealed that the Scott & al checks where slower than the Bowe checks?

from blst.

huitseeker avatar huitseeker commented on August 24, 2024

This is awesome! I simply missed b546b01 and a381953. Thanks a lot for your work!

from blst.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.