Update aead/chacha20 again

This commit is contained in:
Frank Denis 2018-04-26 23:51:36 +02:00
parent a3f51cfea9
commit 031c9c45d5
4 changed files with 10 additions and 9 deletions

2
Gopkg.lock generated
View File

@ -23,7 +23,7 @@
branch = "master"
name = "github.com/aead/chacha20"
packages = ["chacha"]
revision = "0a02eb8dd59b95937590a847165c4d0b97032422"
revision = "8457f65383c5be6183d33e992fbf1786d6ab3e76"
[[projects]]
branch = "master"

View File

@ -21,10 +21,10 @@
TEXT ·xorKeyStreamAVX2(SB), 4, $320-80
MOVQ dst_base+0(FP), DI
MOVQ src_base+24(FP), SI
MOVQ src_len+32(FP), CX
MOVQ block+48(FP), BX
MOVQ state+56(FP), AX
MOVQ rounds+64(FP), DX
MOVQ src_len+32(FP), CX
MOVQ SP, R8
ADDQ $32, SP

View File

@ -47,7 +47,7 @@ TEXT ·supportsSSSE3(SB), NOSPLIT, $0-1
#define Dst DI
#define Nonce AX
#define Key BX
#define Rounds CX
#define Rounds DX
// func hChaCha20SSE2(out *[32]byte, nonce *[16]byte, key *[32]byte)
TEXT ·hChaCha20SSE2(SB), 4, $0-12
@ -117,9 +117,9 @@ chacha_loop:
TEXT ·xorKeyStreamSSE2(SB), 4, $0-40
MOVL dst_base+0(FP), Dst
MOVL src_base+12(FP), Src
MOVL src_len+16(FP), Len
MOVL state+28(FP), State
MOVL rounds+32(FP), Rounds
MOVL src_len+16(FP), Len
MOVOU 0*16(State), X0
MOVOU 1*16(State), X1
@ -199,9 +199,9 @@ DONE:
TEXT ·xorKeyStreamSSSE3(SB), 4, $80-40
MOVL dst_base+0(FP), Dst
MOVL src_base+12(FP), Src
MOVL src_len+16(FP), Len
MOVL state+28(FP), Tmp0
MOVL rounds+32(FP), Rounds
MOVL src_len+16(FP), Len
MOVL Stack, Tmp2 // save stack pointer
ADDL $16, Stack // ensure 16 byte stack alignment
@ -211,6 +211,7 @@ TEXT ·xorKeyStreamSSSE3(SB), 4, $80-40
MOVOU 1*16(Tmp0), X1
MOVOU 2*16(Tmp0), X2
MOVOU 3*16(Tmp0), X3
TESTL Len, Len
JZ DONE

View File

@ -49,7 +49,7 @@ TEXT ·supportsAVX2(SB), 4, $0-1
#define Dst DI
#define Nonce AX
#define Key BX
#define Rounds CX
#define Rounds DX
// func initialize(state *[64]byte, key []byte, nonce *[16]byte)
TEXT ·initialize(SB), 4, $0-40
@ -166,10 +166,10 @@ chacha_loop:
TEXT ·xorKeyStreamSSE2(SB), 4, $112-80
MOVQ dst_base+0(FP), Dst
MOVQ src_base+24(FP), Src
MOVQ src_len+32(FP), Len
MOVQ block+48(FP), Buffer
MOVQ state+56(FP), State
MOVQ rounds+64(FP), Rounds
MOVQ src_len+32(FP), Len
MOVOU 0*16(State), X0
MOVOU 1*16(State), X1
@ -462,10 +462,10 @@ DONE:
TEXT ·xorKeyStreamSSSE3(SB), 4, $144-80
MOVQ dst_base+0(FP), Dst
MOVQ src_base+24(FP), Src
MOVQ src_len+32(FP), Len
MOVQ block+48(FP), Buffer
MOVQ state+56(FP), State
MOVQ rounds+64(FP), Rounds
MOVQ src_len+32(FP), Len
MOVOU 0*16(State), X0
MOVOU 1*16(State), X1
@ -773,10 +773,10 @@ DONE:
TEXT ·xorKeyStreamAVX(SB), 4, $144-80
MOVQ dst_base+0(FP), Dst
MOVQ src_base+24(FP), Src
MOVQ src_len+32(FP), Len
MOVQ block+48(FP), Buffer
MOVQ state+56(FP), State
MOVQ rounds+64(FP), Rounds
MOVQ src_len+32(FP), Len
VMOVDQU 0*16(State), X0
VMOVDQU 1*16(State), X1