From 6e72ad03843e7e57df09968a15b39e8658a0d407 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Mon, 25 Sep 2023 09:53:07 +0800 Subject: [PATCH] =?UTF-8?q?Updated=20SM3=E4=B8=AD=E7=9A=84FF2=E5=92=8CGG2?= =?UTF-8?q?=E5=87=BD=E6=95=B0=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SM3中的FF2和GG2函数.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SM3中的FF2和GG2函数.md b/SM3中的FF2和GG2函数.md index d5588f3..a651346 100644 --- a/SM3中的FF2和GG2函数.md +++ b/SM3中的FF2和GG2函数.md @@ -7,7 +7,7 @@ $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,其等价公式相比原来的公式,因其简单,具有一点点性能优势(不明显),也可以省一个寄存器,还有就是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)),有些老机器不支持。 原公式: ```asm MOVL f, y3; \