emmansun / gmsm

ShangMi (SM) cipher suites for golang (Go语言商用密码软件)

Home Page:https://emmansun.github.io/gmsm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sm3: optimize SIMD message schedule

emmansun opened this issue · comments

尽量减少使用指令

原来是类似于sha256,第一次生成两个word,第二次再生成两个word,最后拼接。
现在是第一次生成一个word,第二次生成四个word,无需拼接。

按理最新的sm3 avx2版本不应该和sha256的avx2实现有百分之十几的性能差距啊。(主要差距来自于消息压缩过程中的加法操作数量)