Comments (3)
我从第三个问题开始回答:
三,首先这个除R的约简是通过不断加上tmp2数组最右(低)字(word)乘P来达成的,一次循环乘两次,虽然都是乘P,但是top half乘的是29 28 29 28 ... 这样位宽表示的P {0x1fffffff, 0xfffffff, 0x7f, 0xffffc00, 0x1fffffff, 0xfffffff, 0x1fffffff, 0xeffffff, 0xfffffff}
,而bottom half是乘的28 29 28 29... 这样位宽表示的P {0xfffffff, 0x1fffffff, 0x7f, 0x1ffff800, 0xfffffff, 0x1fffffff, 0xfffffff, 0x1dffffff, 0xfffffff}
,之所以这样是为了和tmp2中的每个word的位宽保持一致,这样方便把乘法表示成加减和位移运算。
二, 就是x 要乘以 0x1ffff800,而0x1ffff800表示成2^29 - 2^11,这是bottom half中乘以P的第四个word。
一,这里的position是指的bit表示的起始位置,参考方法开始部分的注释。
from gmsm.
我从第三个问题开始回答:
三,首先这个除R的约简是通过不断加上tmp2数组最右(低)字(word)乘P来达成的,一次循环乘两次,虽然都是乘P,但是top half乘的是29 28 29 28 ... 这样位宽表示的P
{0x1fffffff, 0xfffffff, 0x7f, 0xffffc00, 0x1fffffff, 0xfffffff, 0x1fffffff, 0xeffffff, 0xfffffff}
,而bottom half是乘的28 29 28 29... 这样位宽表示的P{0xfffffff, 0x1fffffff, 0x7f, 0x1ffff800, 0xfffffff, 0x1fffffff, 0xfffffff, 0x1dffffff, 0xfffffff}
,之所以这样是为了和tmp2中的每个word的位宽保持一致,这样方便把乘法表示成加减和位移运算。二, 就是x 要乘以 0x1ffff800,而0x1ffff800表示成2^29 - 2^11,这是bottom half中乘以P的第四个word。
感谢回复,基本上原理是懂得,但是一些实现的细节不是很清楚想问一下,方便留下一个联系方式(邮箱或者qq)吗?
from gmsm.
我已在本项目中开放discussions功能。
from gmsm.
Related Issues (20)
- [go1.10] 支持go1.10版本的编译使用 HOT 1
- 关于各类型加密密钥对支持 HOT 9
- 请问 ecdsa.Sign 和sm2.Sign 的区别 HOT 2
- 关于 smx509 模块裁剪 HOT 9
- HashDrbg并发时panic HOT 3
- [sync sdk] crypto/internal/bigmod: switch to saturated limbs HOT 3
- [sync sdk] crypto/internal/bigmod: optimized short exponentiations
- [sync sdk] crypto/x509: properly apply name constrains to roots and intermediates
- sm9/bn256: rewrite asm implementation
- Do we need to use the CSPRNG for SM2 DSA like ECDSA?
- Try ADCX/ADOX together with MULX HOT 1
- CreateCertificate报错 due to bigmod addMulVVW256 non ADX version bug HOT 11
- [SM4] Support AES-NI + AVX HOT 4
- [SM9/BN256] value copy acceleration HOT 1
- [SM9/BN256] 优化扩域上平方运算 HOT 2
- [SM9/BN256] Special square in final exponentiation HOT 1
- [SM9/BN256] Improve gfP marshal/unmarshal performance
- cbc解密出错 HOT 7
- 怎么把java的sm2 密钥 转成 go的密钥格式 HOT 8
- CSR to CRT incompatibility with SM2 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmsm.