herumi / bls

288 stars 132 forks source link

Status of blsSetETHmode #67

Closed lgremy closed 3 years ago

lgremy commented 3 years ago

I have a question about the blsSetETHmode function. The name suggests that it has an impact when the BLS_ETH=1 mode is activated, however, the function sets the g_irtfHashAndMap boolean to true which is only used in the toG function, but when BLS_ETH is not defined. Is it possible to clarify the purpose of the function?

herumi commented 3 years ago

Previously blsSetETHmode is used for selecting the draft version of hash-to-curve. But mapToG2 already is frozen, then it does not affect BLS_ETH anymore. Now the option affects selecting mapToG1 defined in the above spec or the older one for backward compatibility (for the BLS signature such that G1 is signature and G2 is public key). So it is misleading naming.