-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems in mcl_field #177
Comments
(1)有一些历史原因, (2)是的,这是一个 bug。 这一类问题理论上升到 C++20 后会自动发现,因为 parse string 默认在编译期执行,括号-变量不匹配编译过不了。。 (3)这里的 T_ 是 mcl 库内部的类型,不方便自己添加字段。在 SPI 模式里面,instance 都通过 factory 创建,用户不会直接接触 MclField class,问题不大 (4) @xfap 会解答 (5)是的,一个编码规范问题,mcl 之前是实验性集成,正式代码会放在 1和5 需等下一次 repo sync (很遗憾没有赶上今天的 repo sync 班车) |
(4) 是因为T_代表了几种有限域,Fp,Fp^2, Fp^6, Fp^12,其中仅有Fp才提供了Rand接口,其中各个有限域的BaseFp = Fp,因此需要通过BaseFp::Rand(),以及扩域degree去实现对应有限域的随机抽取。 @maths644311798 |
在最近更新(#178)之后,mcl_field.cc中有段代码
我不确定枚举类 |
@maths644311798 你好,
构造函数中 BTW, 目前MclField主要是为了mcl pairing(yacl/crypto/base/pairing/mcl/...)使用,尚不推荐单独直接使用。 |
The problems are mainly about mcl_field in yacl/crypto/base/field.
(1)
class Field
is defined in crypto/base/field/ field_spi.h.class GaloisField
is defined in /math/galois_field/gf_spi.h. Why not combine the two definitions (classes) into one?(2) In crypto/base/field/mcl/mcl_field.cc,
Should the fmt sentence be
fmt::format("<MclField F_{}^{}>", Mpz2Mp(T_::BaseFp::getOp().mp),degree_);
?(3)
Why does this template need “degree_”? I doubt if this parameter is provided by some interface of T_.
(4) In mcl_field.cc,
Can we use
T_:: setByCSPRNG();
instead ofT_:: BaseFp:: setByCSPRNG();
?(5) In mcl_field.cc,
Are the two files "mcl_field.h" the same?
The text was updated successfully, but these errors were encountered: