mirror of
https://github.com/emmansun/gmsm.git
synced 2025-05-11 03:26:17 +08:00
Updated SM9实现及优化 (markdown)
parent
e35a0675b1
commit
acdd3b03ec
@ -6,7 +6,7 @@
|
||||
|
||||
第二步:以bn256项目为基础,基于SM9参数实现1-2-4-12塔式扩域。gfP和gfP2比较简单,改造程度不大,主要是添加测试,确保正确性。接着实现gfP4,gfP12,基础算法加、减、乘、平方相对容易,共轭Conjucate和Frobenius运算花了相对多一点时间。
|
||||
|
||||
第三步:参考sm9_alg.c和bn256,实现Pairing,这一步花了最多的时间,特别是乘扭曲线(mulLine)的正确实现以及除数处理。那时候的实现是这样的:[bn_pair.go](
|
||||
第三步:参考sm9_alg.c和bn256,实现Pairing,这一步花了最多的时间,特别是乘扭曲线(mulLine)的正确实现以及除数处理(主要是理论基础差)。那时候的实现是这样的:[bn_pair.go](
|
||||
https://github.com/emmansun/gmsm/blob/7254c055d7a353094a4d3b2c95d17505d2e8e82b/sm9/bn_pair.go)。第三步做完,基础已完成。
|
||||
* https://github.com/emmansun/gmsm/discussions/120
|
||||
* https://github.com/emmansun/gmsm/discussions/119
|
||||
@ -45,8 +45,8 @@ Go语言相对简单,但是为了简单,编译器做了很多额外的操作
|
||||
也就是Set操作的汇编实现,同时也尽量减少Set操作(这个“优化”导致了实现的复杂性、影响了代码的可维护性,可能不值得)。
|
||||
|
||||
## 下一步
|
||||
参考《New software speed records for
|
||||
cryptographic pairings》使用浮点运算和SIMD实现?
|
||||
* 参考《New software speed records for cryptographic pairings》使用浮点运算和SIMD实现?
|
||||
* [High-Speed Software Implementation of the Optimal Ate Pairing over Barreto–Naehrig Curves](https://eprint.iacr.org/2010/354.pdf),平方扩域上的运算优化,不过由于他的p选择,有其特殊性。
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user