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

7 Коммитов

Автор SHA1 Сообщение Дата
Tamir Duberstein be400aefbc all: build tags: appengine,!gccgo => purego,gc
appengine is obsolete and superseded by purego, and gc is a more
precise tag for files that use gc-syntax assembly.

Change-Id: I716f59de772ebeee4adf4d2a432edf300122cef0
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/269920
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-12-03 16:30:18 +00:00
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
Mark Rushakoff 85f98707c9 argon2: fix typo and code formatting in comments
Change-Id: I31fde79e91dd2f19a688bd62ac421d564634d5b3
GitHub-Last-Rev: caab01d661
GitHub-Pull-Request: golang/crypto#33
Reviewed-on: https://go-review.googlesource.com/97798
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-03-06 22:39:34 +00:00
Andreas Auernhammer d9133f5469 argon2: add Argon2id and update parameter recommendations
This change exports the Argon2 variant Argon2id and improves documenation.
The following parameter recommendations are added:
 - Argon2i:
   time=3 and max. memory for non-interactive scenarios as recommended by the
   RFC draft https://tools.ietf.org/html/draft-irtf-cfrg-argon2-03#section-9.3
 - Argon2id:
   time=2 and memory=64MB for interactive scenarios as used by libsodium >= 1.0.9
   https://download.libsodium.org/doc/password_hashing/the_argon2i_function.html

   time=1 and max. memory for non-interactive scenarios as recommended by the
   RFC draft linked above.

Fixes golang/go#23602

Change-Id: Ia4d537e6126e5aff1243f2b5579df6bc8edb851a
Reviewed-on: https://go-review.googlesource.com/91935
Reviewed-by: Adam Langley <agl@golang.org>
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-02-06 19:08:13 +00:00
Alex Vaghin a660000891 argon2: add missing amd64 tags
The change fixes argon2_test build failure which currently
reads as follows when built with gccgo:

./argon2/blamka_ref.go:9:1: error: redefinition of 'processBlock'
 func processBlock(out, in1, in2 *block) {
 ^
./argon2/blamka_amd64.go:53:1: note: previous definition of 'processBlock' was here
 func processBlock(out, in1, in2 *block) {
 ^
./argon2/blamka_ref.go:13:1: error: redefinition of 'processBlockXOR'
 func processBlockXOR(out, in1, in2 *block) {
 ^
./argon2/blamka_amd64.go:57:1: note: previous definition of 'processBlockXOR' was here
 func processBlockXOR(out, in1, in2 *block) {
 ^

Change-Id: I5c1d7360a2a91a2ac27273a5c1da2a139b1537a7
Reviewed-on: https://go-review.googlesource.com/88455
Run-TryBot: Alex Vaghin <ddos@google.com>
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
2018-01-19 16:59:57 +00:00
Andreas Auernhammer 2b4b18b6aa argon2: fix incorrect key derivation if parallelism > 1
This change fixes an incorrect key derivation if the
degree of parallelism is greater than 1.

This change adds additional test vectors generated by the
https://github.com/P-H-C/phc-winner-argon2 CLI.

Fixes golang/go#23200

Change-Id: I8add8382b9e9ebbf9a70493050867c9af4ed6aa7
Reviewed-on: https://go-review.googlesource.com/85055
Reviewed-by: Adam Langley <agl@golang.org>
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-12-31 21:46:28 +00:00
Andreas Auernhammer 625c6a7b44 argon2: add new package implementing the Argon2 PBKDF family
This CL adds the package argon2. The argon2 package implements
the Argon2 PBKDF family (Argon2i, Argon2d, Argon2id).

Argon2 is memory-hard key derivation function and is specified
at https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf
It can be used to derive cryptographic keys with high entropy from low
entropy passwords.

Fixes golang/go#19896

Change-Id: I5b099682a8e3d7569ad18400cebddefc99a7e22f
Reviewed-on: https://go-review.googlesource.com/82575
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
2017-12-18 18:31:08 +00:00