| Age | Commit message (Collapse) | Author |
|
Providing 0 as argument for r or p results in a panic:
panic: runtime error: integer divide by zero
Providing negative values for r or p returns a misleading error:
scrypt: parameters are too large
This change avoids the panic and introduces a new error
that is returned when r or p are <= 0:
scrypt: parameters must be > 0
Change-Id: I68987b27d1eedd66644d2ec9436cba364fc1d46d
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/731780
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
|
|
Previously we documented recommended parameters for scrypt from 2009,
which was eight years ago. Update those parameters and also provide
some guidance to users for configuring those settings in 2017. On my
late 2015 Macbook Pro, the scrypt benchmark with N=1<<15, r=8, p=1
completes in 91 milliseconds.
Add an Example with a salt.
Fixes golang/go#22082.
Change-Id: I23e3920db67583c9fce093768a32e67ab9c979f5
Reviewed-on: https://go-review.googlesource.com/67070
Reviewed-by: Adam Langley <agl@golang.org>
|
|
Work on uint32 slices instead of bytes.
Replace usage of Salsa20/8 from salsa package with
the specialized version.
benchmark old ns/op new ns/op delta
BenchmarkKey 266430525 126657130 -52.46%
R=agl
CC=golang-dev
https://golang.org/cl/7139050
|
|
R=golang-dev, agl, r
CC=golang-dev
https://golang.org/cl/6535043
|