blake2s: implement BLAKE2X
This CL implements BLAKE2X, a extensible-output functions (XOF) on top of BLAKE2s. BLAKE2x is described in https://blake2.net/blake2x.pdf Change-Id: I20838811e270f4767b8bd5e239a1fe1fb994fe1c Reviewed-on: https://go-review.googlesource.com/38054 Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
committed by
Adam Langley
parent
51714a8c4a
commit
b286ef4198
@@ -7,10 +7,9 @@
|
||||
package blake2s
|
||||
|
||||
var (
|
||||
useSSE4 = supportSSE4()
|
||||
useSSSE3 = supportSSSE3()
|
||||
useSSE2 = true // Always available on amd64
|
||||
useGeneric = false
|
||||
useSSE4 = supportSSE4()
|
||||
useSSSE3 = supportSSSE3()
|
||||
useSSE2 = true // Always available on amd64
|
||||
)
|
||||
|
||||
//go:noescape
|
||||
@@ -33,7 +32,9 @@ func hashBlocks(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) {
|
||||
hashBlocksSSE4(h, c, flag, blocks)
|
||||
} else if useSSSE3 {
|
||||
hashBlocksSSSE3(h, c, flag, blocks)
|
||||
} else {
|
||||
} else if useSSE2 {
|
||||
hashBlocksSSE2(h, c, flag, blocks)
|
||||
} else {
|
||||
hashBlocksGeneric(h, c, flag, blocks)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user