mirror of
https://github.com/emmansun/gmsm.git
synced 2025-05-11 03:26:17 +08:00
Updated 无进位乘法和GHASH (markdown)
parent
12d43bee8a
commit
28eed63f34
@ -40,15 +40,15 @@ $[A_1 : A_0] \cdot [B_1 : B_0] = [C_1:C_0 \oplus C_1 \oplus D_1 \oplus E_1 : D_1
|
||||
* $[D_1:D_0] = [B_0 \oplus C_1 : B_1 \oplus C_0]$
|
||||
* Output: $[D_1 \oplus X_3 : D_0 \oplus X_2]$
|
||||
```asm
|
||||
; Input is in T1:T7
|
||||
vmodqa T3, [W]
|
||||
vpclmulqda T2, T3, T7, 0x01
|
||||
vpshufd T4, T7, 78
|
||||
; Input is in T1:T0
|
||||
vmodqa T3, [W] ; poly
|
||||
vpclmulqda T2, T3, T0, 0x01
|
||||
vpshufd T4, T0, 78
|
||||
vpxor T4, T4, T2
|
||||
vpclmulqda T2, T3, T4, 0x01
|
||||
vpshufd T4, T4, 78
|
||||
vpxor T4, T4, T2
|
||||
vpxor T1, T4 ; result in T1
|
||||
vpxor T1, T1, T4 ; result in T1
|
||||
```
|
||||
|
||||
# 参考
|
||||
|
Loading…
x
Reference in New Issue
Block a user