mirror of
https://github.com/emmansun/gmsm.git
synced 2025-05-12 03:56:17 +08:00
Updated SM3中的FF2和GG2函数 (markdown)
parent
513c49ecb5
commit
2311d983a4
@ -6,6 +6,7 @@ $GG2(X, Y, Z) = (X \land Y) \lor (\lnot X \land Z)$
|
|||||||
$FF2(X, Y, Z) = (X \land Y) \bigoplus (X \land Z) \bigoplus (Y \land Z)$
|
$FF2(X, Y, Z) = (X \land Y) \bigoplus (X \land Z) \bigoplus (Y \land Z)$
|
||||||
$GG2(X, Y, Z) = (Y \bigoplus Z) \land X \bigoplus Z$
|
$GG2(X, Y, Z) = (Y \bigoplus Z) \land X \bigoplus Z$
|
||||||
|
|
||||||
|
GG2等价公式初次见于[Intel® Integrated Performance Primitives Cryptography](https://github.com/intel/ipp-crypto)
|
||||||
# 应用
|
# 应用
|
||||||
特别是GG2,其等价公式相比原来的公式,因其简单,具有一点点性能优势(不明显),也可以省一个寄存器,还有就是ANDN指令属于[BMI1](https://en.wikipedia.org/wiki/X86_Bit_manipulation_instruction_set#BMI1_(Bit_Manipulation_Instruction_Set_1)),有些老机器不支持。
|
特别是GG2,其等价公式相比原来的公式,因其简单,具有一点点性能优势(不明显),也可以省一个寄存器,还有就是ANDN指令属于[BMI1](https://en.wikipedia.org/wiki/X86_Bit_manipulation_instruction_set#BMI1_(Bit_Manipulation_Instruction_Set_1)),有些老机器不支持。
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user