Skip to content

skaunov/hash_to_curve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Noir lib is for hashing to a curve bigger than your backend field (currently default seems to be Grumkin). If you want to hash to a smaller curve it would be more reasonable to leverage std library facilities.

Exposes standard interface, consisting of: hash_to_curve, map_to_curve, and hash_to_field.

Currently limited to secp256k1_XMD:SHA-256_SSWU_RO_ with DST shorter than 256.
Other suites and features will be added upon demand.

If [the hasher] in your app is used for other purposes or shared -- pay attention to Domain Separation Variants. [the hasher]: w.r.t. current limitations it's https://noir-lang.org/dev/standard_library/cryptographic_primitives/hashes#sha256

how to use

In your <./Nargo.toml> file, add it to the dependencies section.

[dependencies]
hash_to_curve = { tag = "v0.1.1", git = "https://github.com/skaunov/hash_to_curve" }