Граф коммитов

5 Коммитов

Автор SHA1 Сообщение Дата
Andreas Auernhammer ae8bce0030 crypto/{blake2b,blake2s,argon2,chacha20poly1305}: replace CPU feature detection
This change removes package specific CPU-feature detection code and
replaces it with x/sys/cpu.

Fixes golang/go#24843

Change-Id: I150dd7b3aeb8eef428c91f9b1df741ceb8a87a24
Reviewed-on: https://go-review.googlesource.com/110355
Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-04-30 18:12:35 +00:00
Andreas Auernhammer b286ef4198 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>
2017-07-05 21:44:04 +00:00
Adam Langley b2fa06b6af blake2s: fix build constraints
Having a trailing comma before a space doesn't mean that the next option
will be ANDed rather than ORed. This worked with the standard toolchain
because the filenames prevented the incorrect build constraints for
other platforms from being acted on.

Change-Id: Iaee5b60a7496166f23fc36319abe07c7a7ec04e5
Reviewed-on: https://go-review.googlesource.com/32311
Run-TryBot: Adam Langley <agl@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-10-28 19:53:00 +00:00
Austin Clements 814723eff7 blake2s: test all four hashing implementations
This adds use* flags for all arches so a common test can observe what
implementations are supported and test all supported implementations.

Change-Id: Icc9c3c1d15626e95f0446493b7fa3159bbe9567d
Reviewed-on: https://go-review.googlesource.com/31712
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Andreas Auernhammer <aead@mail.de>
2016-10-24 19:19:44 +00:00
Andreas Auernhammer 4428aee3e5 blake2s: new package
Add hash function BLAKE2s defined in RFC 7693.

On amd64/SSE4:
name       time/op
Write64-4    125ns ± 0%
Write1K-4   1.64µs ± 1%
Sum64-4      152ns ± 0%
Sum1K-4     1.67µs ± 1%

name       speed
Write64-4  508MB/s ± 0%
Write1K-4  624MB/s ± 1%
Sum64-4    420MB/s ± 0%
Sum1K-4    612MB/s ± 1%

On amd64/SSSE3:
name       time/op
Write64-4    172ns ± 0%
Write1K-4   2.42µs ± 0%
Sum64-4      172ns ± 0%
Sum1K-4     2.42µs ± 0%

name       speed
Write64-4  370MB/s ± 0%
Write1K-4  423MB/s ± 0%
Sum64-4    370MB/s ± 0%
Sum1K-4    422MB/s ± 0%

Change-Id: I5a17cc32d8f17d43db8b1d879af6ab68b44d630c
Reviewed-on: https://go-review.googlesource.com/30913
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
2016-10-17 17:13:37 +00:00