GithubHelp home page GithubHelp logo

Hash to scalar about blst HOT 7 CLOSED

supranational avatar supranational commented on May 28, 2024
Hash to scalar

from blst.

Comments (7)

dot-asm avatar dot-asm commented on May 28, 2024

The project's prime objective is to comply with the specific specifications, hash-to-curve and bls-signature. This doesn't mean that everything else is off the table, but it means that anything extra is expected to raise above mere proclamation of a possibility. In other words, is there a specification, application or proposed draft?

from blst.

iancoleman avatar iancoleman commented on May 28, 2024

Not sure that hash to scalar will be formalized in a spec, definitely doesn't look to be soon, so I'll close this issue for now.

The only thing I could find close to a spec is zkcrypto/bls12_381/hash_to_curve/scalar #L20 but this is behind the 'experimental' feature flag so seems some way off being suited for inclusion in blst.

from blst.

dot-asm avatar dot-asm commented on May 28, 2024

Hmmm... Latest hash-to-curve draft added separate test vectors for expand_message_xmd. This effectively puts pressure on blst to export expand_message_xmd. And if it is exported, then you can combine it with blst_scalar_from_be_bytes to hash to scalar, right?

from blst.

iancoleman avatar iancoleman commented on May 28, 2024

I would be happy to see expand_message_xmd exported. This would enable the functionality I'm looking for without explicitly labeling it, but I guess it goes against keeping the api surface small. Seeing that you're looking to macro-ify the api maybe later if hash-to-scalar becomes more explicit then it can be added.

from blst.

dot-asm avatar dot-asm commented on May 28, 2024

There is blst_expand_message_xmd now. Along with expand_message_xmd_SHA256_*.json test vectors. As for bindings, it's available only in Go as private interface for the moment. I reckon it's lesser point to make it public, it's arguably more appropriate to provide a HashTo method. And then make similar arrangements in other cases. Yeah, it contradicts the original assertion that it should raise above mere possibility, but it wasn't isn't actually [a] black-n-white issue. Since blst_expand_message_xmd "barrier" is passed to accommodate dedicated test vectors, there is no reason to be overly rigid about its possible application.

BTW, what's your target language?

from blst.

iancoleman avatar iancoleman commented on May 28, 2024

I'm targeting rust.

I'm working on a fusion of threshold_crypto with blst, progress is in blsttc.

Originally blst was used for cross-compatibility of signatures with zcash chia etc (threshold_crypto used a different hash_g2 based on randchacha). Also for improved performance. But lately I've been working towards replacing bls12_381 crate with blst for Fr, G1, G2 (in this branch, still very WIP).

I want to replace this repeated hashing with hash to scalar.

from blst.

dot-asm avatar dot-asm commented on May 28, 2024

I'm targeting rust.

Now build/refresh.sh is executed. Thanks for the links!

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.