herumi / mcl

a portable and fast pairing-based cryptography library
BSD 3-Clause "New" or "Revised" License
450 stars 152 forks source link

mclBnGT_mul is valid or not #90

Closed dandelionzbx closed 3 years ago

dandelionzbx commented 3 years ago

GT is multiplicative subgroup of F_p^12, the following API for C "void mclBnGT_mul(mclBnGT z, const mclBnGT x, const mclBnGT *y)" I think x and y should be elements in GT, however, the specific implementation does not determine that the element belongs to GT, they are in F_p^12. Whether this is valid?

herumi commented 3 years ago

mclBnGT_mul computes z = x * y for x, y in Fp^12, and if x and y in GT, then the computed value z belongs to GT.