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

15 Коммитов

Автор SHA1 Сообщение Дата
Filippo Valsorda a6a393ffd6 all: bump go.mod version and drop compatibility shims
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>
2024-06-26 15:12:35 +00:00
Russ Cox 7b82a4e95d all: gofmt
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>
2022-04-11 22:02:26 +00:00
Andreas Auernhammer 513c2a44f6 scrypt: use encoding/binary to simplify smix
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>
2021-03-17 15:28:58 +00:00
Udalov Max a29dc8fdc7 scrypt: use math.bits rotate functions instead of ad-hoc implementation
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>
2019-04-26 14:53:43 +00:00
Igor Zhilianin 45a5f77698 all: fix typos
Change-Id: I62cbcfcd0be5f6a74d93b85b24ff7607533bb239
GitHub-Last-Rev: 9967869e70
GitHub-Pull-Request: golang/crypto#64
Reviewed-on: https://go-review.googlesource.com/c/145240
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-29 02:12:03 +00:00
Filip Haglund 1f94bef427 scrypt: update example to match recommendation two lines below
Change-Id: I6eb5db30df9bc1c4b3c4124c9cdd3d504d33ad9d
GitHub-Last-Rev: 1f585c4bf9
GitHub-Pull-Request: golang/crypto#43
Reviewed-on: https://go-review.googlesource.com/110120
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-05-03 21:59:45 +00:00
Kevin Burke 9419663f5a scrypt: add missing license header
Change-Id: I17daa73c1957ed276ee32419248f321e018f5091
Reviewed-on: https://go-review.googlesource.com/67316
Reviewed-by: Kevin Burke <kev@inburke.com>
2017-09-30 17:46:04 +00:00
Kevin Burke 34d0413e1b scrypt: update recommended parameters for 2017
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>
2017-09-30 16:10:57 +00:00
Kevin Burke 5ef0053f77 all: use HTTPS for links that support it
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>
2017-06-29 04:21:55 +00:00
Sam Whited aa2481cbfe scrypt: fix broken example in documentation
Fixes golang/go#17046

Change-Id: I7fa7e0b700212992125de32524801048b56ac5d1
Reviewed-on: https://go-review.googlesource.com/28952
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-09-10 03:01:29 +00:00
David Symonds 1fbbd62cfe crypto: add import comments.
Change-Id: I33240faf1b8620d0cd600de661928d8e422ebdbc
Reviewed-on: https://go-review.googlesource.com/1235
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-09 23:26:36 +00:00
Andrew Gerrand a73c6bbfc5 go.crypto: use golang.org/x/... import paths
LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/167190043
2014-11-10 08:50:25 +11:00
Dmitry Chestnykh 97488752ad scrypt: 2x faster.
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
2013-01-17 11:42:30 -05:00
Mikio Hara eeef66c528 go.crypto: gofmt -w -s
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/6948057
2012-12-15 14:19:17 +09:00
Dmitry Chestnykh 6ba10a7acb go.crypto/scrypt: add package
R=golang-dev, agl, r
CC=golang-dev
https://golang.org/cl/6535043
2012-09-18 16:59:45 -04:00