Tobias Klauser
cd7d49e622
all: add //go:build lines to assembly files
...
For golang/go#41184
Change-Id: Ica67fdbf2745ad2eef63dbb9ef70136e9e6fd348
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/319469
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2021-05-13 12:29:33 +00:00
Russ Cox
5ea612d1eb
all: go fmt ./...
...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).
Not strictly necessary but will avoid spurious changes
as files are edited.
Part of //go:build change (#41184 ).
See https://golang.org/design/draft-gobuild
Change-Id: I70526bf588bf4078887e567795867ece785d666b
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/294415
Trust: Russ Cox <rsc@golang.org >
Run-TryBot: Russ Cox <rsc@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2021-02-20 03:31:48 +00:00
Russ Cox
042588c79f
salsa20/salsa: fix amd64 assembly not to smash SP
...
For golang/go#44269 .
Change-Id: Ica352261d696317addbdd422d4cde5bf07fef839
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/292050
Trust: Russ Cox <rsc@golang.org >
Trust: Jason A. Donenfeld <Jason@zx2c4.com >
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com >
2021-02-18 14:52:05 +00:00
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
Filippo Valsorda
b7391e95e5
salsa20/salsa: fix keystream loop in amd64 assembly when overflowing 32-bit counter
...
Fixes golang/go#30965
Change-Id: I83a804d555c048e0124c35f95c9e611b2c5bdb01
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/436856
Reviewed-by: Adam Langley <agl@google.com >
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/168406
Reviewed-by: Filippo Valsorda <filippo@golang.org >
Run-TryBot: Filippo Valsorda <filippo@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2019-03-20 22:39:03 +00:00
Filippo Valsorda
37a17fe027
internal/subtle: add Any/InexactOverlap (new package) and apply them across packages
...
AnyOverlap and InexactOverlap implement checks for the aliasing
requirements defined by the crypto/cipher interfaces. Apply them to all
implementations as the actual requirement could be architecture-dependent
and user code should not rely on undefined behavior.
Updates golang/go#21624
Change-Id: I465de02fb3fec4e0c6f1fdee1ef6ae7ed5abff10
Reviewed-on: https://go-review.googlesource.com/112236
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-06-13 22:47:33 +00:00
Filippo Valsorda
1258d06b9d
salsa20: panic when len(out) < len(in) following cipher.Stream
...
Change-Id: I5c8d603cc3ec844b8d44e51b3138bcf16e95c7fc
Reviewed-on: https://go-review.googlesource.com/112235
Reviewed-by: Adam Langley <agl@golang.org >
Run-TryBot: Filippo Valsorda <filippo@golang.org >
2018-05-09 19:27:45 +00:00
Filippo Valsorda
74b34b9dd6
all: make overlap rules wording consistent
...
Updates golang/go#21279
Change-Id: I686835c644f52e3d5ea2b7e6431ef096d188c19d
Reviewed-on: https://go-review.googlesource.com/61133
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-09-11 15:03:43 +00:00
Wei Congrui
358f15eacb
salsa20/salsa: fix out of bounds write
...
Fixes golang/go#21104
Change-Id: I59054f9e2beed8a0c7efd513eb84795dc0308353
Reviewed-on: https://go-review.googlesource.com/52391
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2017-08-02 16:21:30 +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
Austin Clements
1705134e1b
salsa20/salsa: eliminate unnecessary "callee save" prologue/epilogue
...
SP offsets were adjusted to fill in the now unused callee save area
using the following Python script:
import sys, re
def adj(m):
delta = int(m.group(1))
if delta >= 408:
delta -= (408 - 352)
return "%d(SP)" % delta
sys.stdout.write(re.sub(r"(\d+)\(SP\)", adj, sys.stdin.read()))
Change-Id: I06675a75d89e5834f804df595868fe4bb8976719
Reviewed-on: https://go-review.googlesource.com/31587
Run-TryBot: Austin Clements <austin@google.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Cherry Zhang <cherryyz@google.com >
Reviewed-by: Adam Langley <agl@golang.org >
2016-10-21 19:51:17 +00:00
Austin Clements
a0819bbd36
salsa20/salsa: hide SP alignment from spadj
...
The spadj computation in the assembler can't handle SP alignment code
and will just get confused by how it's currently written. Do the
alignment in a scratch register to hide it from the assembler.
Change-Id: I8857f428d96717db29e3a56050f2381bd86807c6
Reviewed-on: https://go-review.googlesource.com/31586
Run-TryBot: Austin Clements <austin@google.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Cherry Zhang <cherryyz@google.com >
Reviewed-by: Adam Langley <agl@golang.org >
2016-10-21 19:51:15 +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
Adam Langley
396847505b
go.crypto/salsa: fix typo in comment and move TODO out of package comment.
...
Thanks to Frithjof Schulze for noticing.
R=goland-dev, r
CC=golang-dev
https://golang.org/cl/11033044
2013-07-16 19:34:54 -04:00
Shenghou Ma
bf5456312c
go.crypto/{curve25519,poly1305,salsa20/salsa}: add //go:noescape annotation
...
R=golang-dev, rsc, agl
CC=golang-dev
https://golang.org/cl/7319045
2013-02-19 19:15:01 +08:00
Ian Lance Taylor
6779fad1d0
go.crypto: add and adjust +build lines for 386 and gccgo
...
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6827061
2012-11-07 22:50:39 -08:00
Dave Cheney
4ce1924ebb
go.crypto: various: fix appengine compatibility
...
Fixes golang/go#4102 .
R=russross, minux.ma, rsc, agl
CC=golang-dev
https://golang.org/cl/6623053
2012-10-09 13:15:42 +11:00
Russ Cox
750c6a9860
go.crypto: match asm variable names to Go func declarations
...
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6544048
2012-09-21 00:36:01 -04:00
Dmitry Chestnykh
815dd50d91
go.crypto/salsa20: add salsa.Core208.
...
R=golang-dev, agl, r
CC=golang-dev
https://golang.org/cl/6530044
2012-09-18 13:46:45 -04:00
Adam Langley
62fc357018
go.crypto/salsa20: add package.
...
Package salsa20 implements the Salsa20 stream cipher as specified in
http://cr.yp.to/snuffle/spec.pdf .
(Reference implementation by dchest.)
R=golang-dev, dchest
CC=golang-dev
https://golang.org/cl/6496083
2012-09-08 10:41:44 -04:00