From f3a7a7e2abc9d48448b71ad119b73c699d4469fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B0=D1=81=20=D0=9C=D0=B8=D1=85=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2=20WindowsDesktop?= Date: Sat, 14 Aug 2021 04:11:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D1=81=D1=87=D0=B8=D1=82?= =?UTF-8?q?=D0=B0=D0=BB=20=D0=B4=D0=BE=20W60?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + sha-256.asm | 1729 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 1720 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index f3c7c31..782b392 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ sha-256.dll sha-256.lib sha-256.exp +sha-256.dll diff --git a/sha-256.asm b/sha-256.asm index 6c6acbf..ec9ca38 100644 --- a/sha-256.asm +++ b/sha-256.asm @@ -351,7 +351,7 @@ z3sqrt proc ;вынес вычисление кубического корня mov rax,result ret z3sqrt endp -Wt proc; вынес в отдельную процедуру заполнение Wt. На выходе - заполненные XMM регистры +Wt proc; вынес в отдельную процедуру заполнение Wt. На выходе - заполненные XMM регистры xorps xmm4,xmm4 ;━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ xorps xmm5,xmm5 ; ┃ xorps xmm6,xmm6 ; ┃ @@ -414,9 +414,9 @@ Wt proc; вынес в отдельную процедуру заполнени rol eax,15 and eax,1fffffffh xor ecx,eax ; S0 - pshufd xmm3,xmm3,00111001b ;-2. 15-е слово двигается на младшую позицию XMM + pshufd xmm3,XMM3,00111001b ;-2. 15-е слово двигается на младшую позицию xor rbx,rbx ;в ebx будет xor трёх вращений - movd eax,xmm3 + movd eax,XMM3 bswap eax ror eax,17 xor ebx,eax @@ -442,7 +442,7 @@ Wt proc; вынес в отдельную процедуру заполнени orpd xmm4,xmm15 ;W18--------------------------------------------------------------------------- xor rcx,rcx ;в ecx будет xor трёх вращений - pshufd xmm0,xmm0,01001110b ;-15. 3-е слово двигается на младшую позицию XMM + pshufd xmm0,xmm0,01001110b ;-15. 2-е слово двигается на младшую позицию XMM movd eax,xmm0 bswap eax ror eax,7 @@ -452,10 +452,10 @@ Wt proc; вынес в отдельную процедуру заполнени rol eax,15 and eax,1fffffffh xor ecx,eax ; S0 - pshufd xmm4,xmm4,10010011b ;-2. 16-е слово двигается на младшую позицию XMM + pshufd xmm4,xmm4,10010011b ;-2. 15-е слово двигается на младшую позицию xor rbx,rbx ;в ebx будет xor трёх вращений - movd eax,xmm4 - bswap eax + movd eax,XMM4 + ;bswap eax ror eax,17 xor ebx,eax ror eax,2 @@ -463,21 +463,1730 @@ Wt proc; вынес в отдельную процедуру заполнени rol eax,9 and eax,3fffffh xor ebx,eax ;S1 - pshufd xmm0,xmm0,10010011b ;-16. 2-е слово двигается на младшую позицию XMM + pshufd xmm0,xmm0,10010011b ;-16. 1-е слово двигается на младшую позицию XMM xor rdx,rdx movd eax,xmm0 bswap eax add edx,eax add edx,ecx - pshufd xmm2,xmm2,00111001b ;-7. 11-е слово двигается на младшую позицию XMM + pshufd xmm2,xmm2,00111001b ;-7. 10-е слово двигается на младшую позицию XMM movd eax,xmm2 bswap eax add edx,eax add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 - pshufd xmm4,xmm4,01001110b ;18-е слово двигается на младшую позицию XMM + pshufd xmm4,xmm4,01001110b ;-0 (Rec) ;bswap edx movd xmm15,edx orpd xmm4,xmm15 + ;W19--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + ;pshufd xmm0,xmm0,01001110b ;-15. + movd eax,xmm1 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm4,xmm4,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM4 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm0,xmm0,00111001b ;-16. + xor rdx,rdx + movd eax,xmm0 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM3,XMM3,00111001b ;-7. + movd eax,XMM3 + bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm4,xmm4,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm4,xmm15 + ;W20--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm1,xmm1,00111001b ;-15. + movd eax,xmm1 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm4,xmm4,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM4 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm1,xmm1,10010011b ;-16. + xor rdx,rdx + movd eax,xmm1 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM3,XMM3,00111001b ;-7. + movd eax,XMM3 + bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + ;pshufd xmm4,xmm4,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm5,xmm15 + ;W21--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm1,xmm1,01001110b ;-15. + movd eax,xmm1 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm4,xmm4,00111001b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM4 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm1,xmm1,10010011b ;-16. + xor rdx,rdx + movd eax,xmm1 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM3,XMM3,00111001b ;-7. + movd eax,XMM3 + bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm5,xmm5,00111001b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm5,xmm15 + ;W22--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm1,xmm1,01001110b ;-15. + movd eax,xmm1 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm5,xmm5,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM5 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm1,xmm1,10010011b ;-16. + xor rdx,rdx + movd eax,xmm1 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM3,XMM3,00111001b ;-7. + movd eax,XMM3 + bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm5,xmm5,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm5,xmm15 + ;W23--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm2,xmm2,00111001b ;-15. + movd eax,xmm2 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm5,xmm5,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM5 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm1,xmm1,00111001b ;-16. + xor rdx,rdx + movd eax,xmm1 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM4,XMM4,00111001b ;-7. + movd eax,XMM4 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm5,xmm5,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm5,xmm15 + ;W24--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm2,xmm2,00111001b ;-15. + movd eax,xmm2 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm5,xmm5,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM5 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm2,xmm2,10010011b ;-16. + xor rdx,rdx + movd eax,xmm2 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM4,XMM4,00111001b ;-7. + movd eax,XMM4 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + ;pshufd xmm5,xmm5,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm6,xmm15 + ;W25--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm2,xmm2,01001110b ;-15. + movd eax,xmm2 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm5,xmm5,00111001b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM5 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm2,xmm2,10010011b ;-16. + xor rdx,rdx + movd eax,xmm2 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM4,XMM4,00111001b ;-7. + movd eax,XMM4 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm6,xmm6,00111001b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm6,xmm15 + ;W26--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm2,xmm2,01001110b ;-15. + movd eax,xmm2 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm6,xmm6,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM6 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm2,xmm2,10010011b ;-16. + xor rdx,rdx + movd eax,xmm2 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM4,XMM4,00111001b ;-7. + movd eax,XMM4 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm6,xmm6,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm6,xmm15 + ;W27--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm3,xmm3,00111001b ;-15. + movd eax,xmm3 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm6,xmm6,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM6 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm2,xmm2,00111001b ;-16. + xor rdx,rdx + movd eax,xmm2 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM5,XMM5,00111001b ;-7. + movd eax,XMM5 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm6,xmm6,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm6,xmm15 + ;W28--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm3,xmm3,00111001b ;-15. + movd eax,xmm3 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm6,xmm6,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM6 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm3,xmm3,10010011b ;-16. + xor rdx,rdx + movd eax,xmm3 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM5,XMM5,00111001b ;-7. + movd eax,XMM5 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + ;pshufd xmm6,xmm6,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm7,xmm15 + ;W29--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm3,xmm3,01001110b ;-15. + movd eax,xmm3 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm6,xmm6,00111001b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM6 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm3,xmm3,10010011b ;-16. + xor rdx,rdx + movd eax,xmm3 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM5,XMM5,00111001b ;-7. + movd eax,XMM5 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm7,xmm7,00111001b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm7,xmm15 + ;W30--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm3,xmm3,01001110b ;-15. + movd eax,xmm3 + bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm7,xmm7,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM7 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm3,xmm3,10010011b ;-16. + xor rdx,rdx + movd eax,xmm3 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM5,XMM5,00111001b ;-7. + movd eax,XMM5 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm7,xmm7,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm7,xmm15 + ;W31--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm4,xmm4,00111001b ;-15. + movd eax,xmm4 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm7,xmm7,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM7 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm3,xmm3,00111001b ;-16. + xor rdx,rdx + movd eax,xmm3 + bswap eax + add edx,eax + add edx,ecx + pshufd XMM6,XMM6,00111001b ;-7. + movd eax,XMM6 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm7,xmm7,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm7,xmm15 + ;W32--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm4,xmm4,00111001b ;-15. + movd eax,xmm4 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm7,xmm7,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM7 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm4,xmm4,10010011b ;-16. + xor rdx,rdx + movd eax,xmm4 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM6,XMM6,00111001b ;-7. + movd eax,XMM6 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + ;pshufd xmm6,xmm6,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm8,xmm15 + ;W33--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm4,xmm4,01001110b ;-15. + movd eax,xmm4 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm7,xmm7,00111001b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM7 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm4,xmm4,10010011b ;-16. + xor rdx,rdx + movd eax,xmm4 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM6,XMM6,00111001b ;-7. + movd eax,XMM6 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm8,xmm8,00111001b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm8,xmm15 + ;W34--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm4,xmm4,01001110b ;-15. + movd eax,xmm4 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm8,xmm8,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM8 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm4,xmm4,10010011b ;-16. + xor rdx,rdx + movd eax,xmm4 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM6,XMM6,00111001b ;-7. + movd eax,XMM6 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm8,xmm8,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm8,xmm15 + ;W35--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm5,xmm5,00111001b ;-15. + movd eax,xmm5 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm8,xmm8,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM8 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm4,xmm4,00111001b ;-16. + xor rdx,rdx + movd eax,xmm4 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM7,XMM7,00111001b ;-7. + movd eax,XMM7 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm8,xmm8,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm8,xmm15 + ;W36--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm5,xmm5,00111001b ;-15. + movd eax,xmm5 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm8,xmm8,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM8 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm5,xmm5,10010011b ;-16. + xor rdx,rdx + movd eax,xmm5 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM7,XMM7,00111001b ;-7. + movd eax,XMM7 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + ;pshufd xmm9,xmm9,11100100b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm9,xmm15 + ;W37--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm5,xmm5,01001110b ;-15. + movd eax,xmm5 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm8,xmm8,00111001b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM8 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm5,xmm5,10010011b ;-16. + xor rdx,rdx + movd eax,xmm5 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM7,XMM7,00111001b ;-7. + movd eax,XMM7 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm9,xmm9,00111001b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm9,xmm15 + ;W38--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm5,xmm5,01001110b ;-15. + movd eax,xmm5 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm9,xmm9,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM9 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm5,xmm5,10010011b ;-16. + xor rdx,rdx + movd eax,xmm5 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM7,XMM7,00111001b ;-7. + movd eax,XMM7 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm9,xmm9,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm9,xmm15 + ;W39--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm6,xmm6,00111001b ;-15. + movd eax,xmm6 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm9,xmm9,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM9 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm5,xmm5,00111001b ;-16. + xor rdx,rdx + movd eax,xmm5 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM8,XMM8,00111001b ;-7. + movd eax,XMM8 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm9,xmm9,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm9,xmm15 + ;W40--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm6,xmm6,00111001b ;-15. + movd eax,xmm6 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm9,xmm9,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM9 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm6,xmm6,10010011b ;-16. + xor rdx,rdx + movd eax,xmm6 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM8,XMM8,00111001b ;-7. + movd eax,XMM8 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + ;pshufd xmm10,xmm10,11100100b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm10,xmm15 + ;W41--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm6,xmm6,01001110b ;-15. + movd eax,xmm6 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm9,xmm9,00111001b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM9 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm6,xmm6,10010011b ;-16. + xor rdx,rdx + movd eax,xmm6 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM8,XMM8,00111001b ;-7. + movd eax,XMM8 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm10,xmm10,00111001b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm10,xmm15 + ;W42--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm6,xmm6,01001110b ;-15. + movd eax,xmm6 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm10,xmm10,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM10 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm6,xmm6,10010011b ;-16. + xor rdx,rdx + movd eax,xmm6 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM8,XMM8,00111001b ;-7. + movd eax,XMM8 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm10,xmm10,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm10,xmm15 + ;W43--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm7,xmm7,00111001b ;-15. + movd eax,xmm7 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm10,xmm10,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM10 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm6,xmm6,00111001b ;-16. + xor rdx,rdx + movd eax,xmm6 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM9,XMM9,00111001b ;-7. + movd eax,XMM9 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm10,xmm10,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm10,xmm15 + ;W44--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm7,xmm7,00111001b ;-15. + movd eax,xmm7 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm10,xmm10,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM10 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm7,xmm7,10010011b ;-16. + xor rdx,rdx + movd eax,xmm7 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM9,XMM9,00111001b ;-7. + movd eax,XMM9 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + ;pshufd xmm11,xmm11,11100100b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm11,xmm15 + ;W45--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm7,xmm7,01001110b ;-15. + movd eax,xmm7 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm10,xmm10,00111001b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM10 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm7,xmm7,10010011b ;-16. + xor rdx,rdx + movd eax,xmm7 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM9,XMM9,00111001b ;-7. + movd eax,XMM9 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm11,xmm11,00111001b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm11,xmm15 + ;W46--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm7,xmm7,01001110b ;-15. + movd eax,xmm7 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm11,xmm11,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM11 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm7,xmm7,10010011b ;-16. + xor rdx,rdx + movd eax,xmm7 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM9,XMM9,00111001b ;-7. + movd eax,XMM9 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm11,xmm11,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm11,xmm15 + ;W47--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm8,xmm8,00111001b ;-15. + movd eax,xmm8 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm11,xmm11,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM11 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm7,xmm7,00111001b ;-16. + xor rdx,rdx + movd eax,xmm7 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM10,XMM10,00111001b ;-7. + movd eax,XMM10 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm11,xmm11,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm11,xmm15 + ;W48--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm8,xmm8,00111001b ;-15. + movd eax,xmm8 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm11,xmm11,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM11 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm8,xmm8,10010011b ;-16. + xor rdx,rdx + movd eax,xmm8 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM10,XMM10,00111001b ;-7. + movd eax,XMM10 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + ;pshufd xmm12,xmm12,11100100b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm12,xmm15 + ;W49--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm8,xmm8,01001110b ;-15. + movd eax,xmm8 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm11,xmm11,00111001b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM11 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm8,xmm8,10010011b ;-16. + xor rdx,rdx + movd eax,xmm8 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM10,XMM10,00111001b ;-7. + movd eax,XMM10 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm12,xmm12,00111001b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm12,xmm15 + ;W50--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm8,xmm8,01001110b ;-15. + movd eax,xmm8 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm12,xmm12,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM12 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm8,xmm8,10010011b ;-16. + xor rdx,rdx + movd eax,xmm8 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM10,XMM10,00111001b ;-7. + movd eax,XMM10 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm12,xmm12,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm12,xmm15 + ;W51--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm9,xmm9,00111001b ;-15. + movd eax,xmm9 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm12,xmm12,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM12 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm8,xmm8,00111001b ;-16. + xor rdx,rdx + movd eax,xmm8 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM11,XMM11,00111001b ;-7. + movd eax,XMM11 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm12,xmm12,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm12,xmm15 + ;W52--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm9,xmm9,00111001b ;-15. + movd eax,xmm9 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm12,xmm12,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM12 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm9,xmm9,10010011b ;-16. + xor rdx,rdx + movd eax,xmm9 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM11,XMM11,00111001b ;-7. + movd eax,XMM11 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + ;pshufd xmm13,xmm13,11100100b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm13,xmm15 + ;W53--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm9,xmm9,01001110b ;-15. + movd eax,xmm9 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm12,xmm12,00111001b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM12 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm9,xmm9,10010011b ;-16. + xor rdx,rdx + movd eax,xmm9 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM11,XMM11,00111001b ;-7. + movd eax,XMM11 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm13,xmm13,00111001b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm13,xmm15 + ;W54--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm9,xmm9,01001110b ;-15. + movd eax,xmm9 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm13,xmm13,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM13 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm9,xmm9,10010011b ;-16. + xor rdx,rdx + movd eax,xmm9 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM11,XMM11,00111001b ;-7. + movd eax,XMM11 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm13,xmm13,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm13,xmm15 + ;W55--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm10,xmm10,00111001b ;-15. + movd eax,xmm10 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm13,xmm13,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM13 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm9,xmm9,00111001b ;-16. + xor rdx,rdx + movd eax,xmm9 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM12,XMM12,00111001b ;-7. + movd eax,XMM12 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm13,xmm13,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm13,xmm15 + ;W56--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm10,xmm10,00111001b ;-15. + movd eax,xmm10 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm13,xmm13,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM13 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm10,xmm10,10010011b ;-16. + xor rdx,rdx + movd eax,xmm10 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM12,XMM12,00111001b ;-7. + movd eax,XMM12 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + ;pshufd xmm14,xmm14,11100100b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm14,xmm15 + ;W57--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm10,xmm10,01001110b ;-15. + movd eax,xmm10 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm113,xmm113,00111001b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM113 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm10,xmm10,10010011b ;-16. + xor rdx,rdx + movd eax,xmm10 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM12,XMM12,00111001b ;-7. + movd eax,XMM12 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm14,xmm14,00111001b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm14,xmm15 + ;W58--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm10,xmm10,01001110b ;-15. + movd eax,xmm10 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm14,xmm14,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM14 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm10,xmm10,10010011b ;-16. + xor rdx,rdx + movd eax,xmm10 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM12,XMM12,00111001b ;-7. + movd eax,XMM12 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm14,xmm14,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm14,xmm15 + ;W59--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm11,xmm11,00111001b ;-15. + movd eax,xmm11 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm14,xmm14,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM14 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm10,xmm10,00111001b ;-16. + xor rdx,rdx + movd eax,xmm10 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM13,XMM13,00111001b ;-7. + movd eax,XMM13 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm14,xmm14,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm14,xmm15 + ;W60--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm11,xmm11,00111001b ;-15. + movd eax,xmm11 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm14,xmm14,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM14 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm11,xmm11,10010011b ;-16. + xor rdx,rdx + movd eax,xmm11 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM13,XMM13,00111001b ;-7. + movd eax,XMM13 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + ;pshufd xmm15,xmm15,11100100b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + ;W61---------начать с этого. Нужно заполнить XMM15------------------------------------------------------------------ + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm7,xmm7,01001110b ;-15. + movd eax,xmm7 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm10,xmm10,00111001b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM10 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm7,xmm7,10010011b ;-16. + xor rdx,rdx + movd eax,xmm7 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM9,XMM9,00111001b ;-7. + movd eax,XMM9 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm11,xmm11,00111001b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm11,xmm15 + ;W62--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm7,xmm7,01001110b ;-15. + movd eax,xmm7 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm11,xmm11,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM11 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm7,xmm7,10010011b ;-16. + xor rdx,rdx + movd eax,xmm7 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM9,XMM9,00111001b ;-7. + movd eax,XMM9 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm11,xmm11,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm11,xmm15 + ;W63--------------------------------------------------------------------------- + xor rcx,rcx ;в ecx будет xor трёх вращений + pshufd xmm8,xmm8,00111001b ;-15. + movd eax,xmm8 + ;bswap eax + ror eax,7 + xor ecx,eax + ror eax,11 + xor ecx,eax + rol eax,15 + and eax,1fffffffh + xor ecx,eax ; S0 + pshufd xmm11,xmm11,10010011b ;-2. + xor rbx,rbx ;в ebx будет xor трёх вращений + movd eax,XMM11 + ;bswap eax + ror eax,17 + xor ebx,eax + ror eax,2 + xor ebx,eax + rol eax,9 + and eax,3fffffh + xor ebx,eax ;S1 + pshufd xmm7,xmm7,00111001b ;-16. + xor rdx,rdx + movd eax,xmm7 + ;bswap eax + add edx,eax + add edx,ecx + pshufd XMM10,XMM10,00111001b ;-7. + movd eax,XMM10 + ;bswap eax + add edx,eax + add edx,ebx ;w[i]=w[i-16]+s0+w[i-7]+s1 + pshufd xmm11,xmm11,01001110b ;-0 (Rec) + ;bswap edx + movd xmm15,edx + orpd xmm11,xmm15 ret Wt Endp end \ No newline at end of file