ExEcc.BLS.HashToCurve (ExEcc v0.1.0)

View Source

Summary

Functions

Clear Cofactor via Multiplication

Clear Cofactor via Multiplication

Hash To Base Field for FQ2. https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-09#section-5.3 Returns a tuple of count FQ2 elements. Implicitly uses SHA256.

Map To Curve for G1

Map To Curve for G2

Functions

clear_cofactor_g1(p)

Clear Cofactor via Multiplication

Ensure a point falls in the correct subgroup of the curve.

clear_cofactor_g2(p)

Clear Cofactor via Multiplication

Ensure a point falls in the correct sub group of the curve.

hash_to_field_fq2(message, count, dst, hash_function)

Hash To Base Field for FQ2. https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-09#section-5.3 Returns a tuple of count FQ2 elements. Implicitly uses SHA256.

hash_to_field_fq(message, count, dst, hash_function)

Hash To Base Field for FQ

Convert a message to a point in the finite field as defined here: https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-09#section-5.3

hash_to_g1(message, dst, hash_function)

Convert a message to a point on G1 as defined here: https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-09#section-6.6.3

The idea is to first hash into FQ and then use SSWU to map the result into G1.

Contents and inputs follow the ciphersuite BLS12381G1_XMD:SHA-256_SSWU_RO_ defined here: https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-09#section-8.8.1

hash_to_g2(message, dst, hash_function)

Convert a message to a point on G2 as defined here: https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-09#section-6.6.3

The idea is to first hash into FQ2 and then use SSWU to map the result into G2.

Contents and inputs follow the ciphersuite BLS12381G2_XMD:SHA-256_SSWU_RO_ defined here: https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-09#section-8.8.2

map_to_curve_g1(u)

Map To Curve for G1

First, convert FQ point to a point on the 11-Isogeny curve. SWU Map: https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-09#section-6.6.3

Second, map 11-Isogeny curve to BLS12-381-G1 curve. 11-Isogeny Map: https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-09#name-11-isogeny-map-for-bls12-38

map_to_curve_g2(u)

Map To Curve for G2

First, convert FQ2 point to a point on the 3-Isogeny curve. SWU Map: https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-09#section-6.6.3

Second, map 3-Isogeny curve to BLS12-381-G2 curve. 3-Isogeny Map: https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-09#appendix-C.3