Giter VIP home page Giter VIP logo

Comments (10)

dfaranha avatar dfaranha commented on August 18, 2024

Looks like it, even though it's just one field multiplication. :)

from relic.

mlvl36667 avatar mlvl36667 commented on August 18, 2024

Also, what about using y = g(x)^{(p+1)/4} instead of taking the square root for BLS12-381? Which approach is better?

from relic.

dfaranha avatar dfaranha commented on August 18, 2024

That's exactly what square root computes in case of the BLS12 prime (or any prime = 3 mod 4). :)

For faster hashing, there should be an update in a few weeks implementing https://eprint.iacr.org/2022/759, so stay tuned!

from relic.

mlvl36667 avatar mlvl36667 commented on August 18, 2024

I know that they're equivalent, I'm just wondering which one is more expensive to calculate. Thank you for the article, I'll have a look.

from relic.

dfaranha avatar dfaranha commented on August 18, 2024

Sorry if my comment was not clear. In RELIC, fp_srt() extracts the square root exactly by computing the exponentiation.

from relic.

mlvl36667 avatar mlvl36667 commented on August 18, 2024

Thanks. Now I see. I should have look at it myself though...

from relic.

mlvl36667 avatar mlvl36667 commented on August 18, 2024

There is one more thing I don't understand. In "Fast and simple constant-time hashing to the BLS12-381 elliptic curve" the second square root is avoided by calculating y as t^3*alpha, but in your implementation you calculate two square roots. Can you explain me the reason?

from relic.

dfaranha avatar dfaranha commented on August 18, 2024

We did not have a fast squaredness test at the time, but now we have a pretty good one (upcoming paper on CCS'23 -- built upon ideas from https://eprint.iacr.org/2021/1271).

There is quite a bit of movement happening in the hashing part, including a new function and an attempt to make this one faster/constant-time: 5bd2b8b

from relic.

mlvl36667 avatar mlvl36667 commented on August 18, 2024

Sounds good. I'll have a look at it. Thank you for clarifying.

from relic.

dfaranha avatar dfaranha commented on August 18, 2024

I just merged a large patch with many new hash-to-curve algorithms for the various cases. Some polish is still pending for automatic selection, but the basics are there.

from relic.

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.