mirror of
https://github.com/emmansun/gmsm.git
synced 2025-05-11 03:26:17 +08:00
Updated SM3中的FF2和GG2函数 (markdown)
parent
513c49ecb5
commit
2311d983a4
@ -4,8 +4,9 @@ $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)$
|
||||
$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)),有些老机器不支持。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user