supranational / blst

Multilingual BLS12-381 signature library
Apache License 2.0
458 stars 175 forks source link

Missing implementations for sqr{,x}_n_mul_mont_384x #170

Closed jtraglia closed 1 year ago

jtraglia commented 1 year ago

A minor question/issue I found a while ago. I can't find the implementations for sqr_n_mul_mont_384x and sqrx_n_mul_mont_384x. Are these implemented? If not, should they be?

These symbols are referenced in these two places:

https://github.com/supranational/blst/blob/5358144578b7b8b38e9b8d1da4f085057bbf1125/src/vect.h#L159-L160

https://github.com/supranational/blst/blob/b4ebf88014251f1cfefeb6cf1cd4df7c40dc568f/src/vect.h#L150

dot-asm commented 1 year ago

Are these implemented?

No.

If not, should they be?

No. It's just a remnant of an intention. I mean originally it was considered, but then it turned out that it's unnecessary. Because sqr_n_mul is an exponentiation assistant and there is no need to do the exponentiation in Fp2. The operations that would require it can be reduced to exponentiation in Fp, which is faster. I'll clean it up... Thanks!

jtraglia commented 1 year ago

Okay thanks!