| 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>
|
|
Also, remove the legacy import annotations.
Fixes golang/go#68147
Change-Id: Ibfcc9322f27224c0ba92ea42cd56912a7d8783fd
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/594256
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
|
|
Gofmt to update doc comments to the new formatting.
For golang/go#51082.
Change-Id: I076031b6613691eefbb0f21739366e3fd2011ec9
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/399356
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
|
|
This CL simplifies the smix implementation.
It:
- replaces the manual byte-int conversion
with functionality from encoding/binary.
- pre-computes the range `r * 32` as `R`.
Change-Id: Ife4920089c011fec82b234fb56df33e94204e0f8
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/253357
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
|
|
This makes code more readable and idiomatic. No change in benchmarks.
Updates golang/go#31456
Change-Id: I010bbff33580350019ce2b0ff13847261905d32f
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/174137
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
|
|
Change-Id: I62cbcfcd0be5f6a74d93b85b24ff7607533bb239
GitHub-Last-Rev: 9967869e706e9fe7d13964bb32b30a44ba640869
GitHub-Pull-Request: golang/crypto#64
Reviewed-on: https://go-review.googlesource.com/c/145240
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
|
|
Change-Id: I6eb5db30df9bc1c4b3c4124c9cdd3d504d33ad9d
GitHub-Last-Rev: 1f585c4bf946a3241f8c38e1e954c4e5f8dc4713
GitHub-Pull-Request: golang/crypto#43
Reviewed-on: https://go-review.googlesource.com/110120
Reviewed-by: Brad Fitzpatrick <bradfitz@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>
|
|
Many websites now support HTTPS that may not at the time the code was
committed; let's use the HTTPS links where we can.
Change-Id: I7099dfa0dbb213294e65b4387f343d6e8f955b97
Reviewed-on: https://go-review.googlesource.com/47131
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
|
|
Fixes golang/go#17046
Change-Id: I7fa7e0b700212992125de32524801048b56ac5d1
Reviewed-on: https://go-review.googlesource.com/28952
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
|
|
Change-Id: I33240faf1b8620d0cd600de661928d8e422ebdbc
Reviewed-on: https://go-review.googlesource.com/1235
Reviewed-by: Andrew Gerrand <adg@golang.org>
|
|
LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/167190043
|
|
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, dave
CC=golang-dev
https://golang.org/cl/6948057
|
|
R=golang-dev, agl, r
CC=golang-dev
https://golang.org/cl/6535043
|