This is a follow-up to CL 317169, which dropped go1.12 compatibility,
and made the golang.org/x/crypto/ed25519 package an alias / wrapper for
crypto/ed25519 in stdlib.
This patch updates uses within this repository to use stdlib instead of
depending on the wrapper. With this patch applied, the only remaining
use of the wrapper is in ed25519_test, which appears to be in place to
verify compatibility of the wrapper itself.
Change-Id: I0195396102a75ae20bdd82ca8ab59855c0eb5cea
GitHub-Last-Rev: 24dbec563cbd84bc47bdc7736b0245fc83dd3353
GitHub-Pull-Request: golang/crypto#238
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/448238
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Nicola Murino <nicola.murino@gmail.com>
Reviewed-by: Nicola Murino <nicola.murino@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
audited using ineffassign tool from
github.com/gordonklaus/ineffassign
go generate does not generate any changes
Change-Id: Iabbec9ec1aae39081289d503d79fd7b4caadf17b
GitHub-Last-Rev: acd17cce410e9c68ce3c87b5546261be9153e3ea
GitHub-Pull-Request: golang/crypto#70
Reviewed-on: https://go-review.googlesource.com/c/155942
Reviewed-by: Filippo Valsorda <filippo@golang.org>
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>
This change adds the equivalents of crypto_sign, crypto_sign_open and
crypto_sign_keypair in TweetNaCl and libsodium using the Ed25519 system.
The original NaCl codebase does not contain functions with identical
semantics but its documentation stated the intent of using Ed25519 in
future releases.
Fixesgolang/go#24350
Change-Id: I4c3c86b4875f2f718ad9299c2274b4ad9e11fbeb
Reviewed-on: https://go-review.googlesource.com/100578
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
While package comments shouldn't be novels, this throwaway word was not
sufficient (and wasn't mirrored in the `box` package).
This change attempts to include more reasoning without using too many
words.
Fixes golang/go#17673,golang/go#21139
Change-Id: I7fa11e2cd5b8e2010420cc14d784f9b0c65db6d2
Reviewed-on: https://go-review.googlesource.com/35910
Reviewed-by: Russ Cox <rsc@golang.org>
This matches the implementation in NaCL, so a user can generate
a crypto_auth digest in another language and verify it with Go, or
vice versa.
Fixesgolang/go#20265.
Change-Id: Ice96abb9347a5318a16ced5152ebfa7d9ebdd285
Reviewed-on: https://go-review.googlesource.com/51932
Reviewed-by: Adam Langley <agl@golang.org>
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
These largely follow the pattern laid out in the secretbox example
file. Hopefully they should demonstrate the best ways to use the `box`
primitives.
Change-Id: I99be5f886e6ffe5f859268d6caa282e263eeacd0
Reviewed-on: https://go-review.googlesource.com/44736
Reviewed-by: Adam Langley <agl@golang.org>
Name the example package "secretbox_test" so we use the public
interface for secretbox in examples. This way the code appears the
same way a user would have to type it.
Change-Id: I0487e39927ddae297ea45e09a3fa397779a8e21d
Reviewed-on: https://go-review.googlesource.com/28222
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
I read the docs and wasn't sure how to use the package - what is
the best way to generate a nonce? Do I need to use the same nonce
for encrypting and decrypting the same message? I read through some
code that used this package, and the tests, found the answers I was
looking for, and used them to generate an example, which hopefully
will be helpful to other users of this package.
Change-Id: I24f9682fecb6632f34b4d8d13fed6eb002993677
Reviewed-on: https://go-review.googlesource.com/26810
Reviewed-by: Adam Langley <agl@golang.org>
secretbox is supposed to append to the given slice, like hash.Sum() and
append(). However, I had a complete brain-fart: I've really no idea what
I was thinking of at the time.
R=golang-dev, sfrithjof, rsc
CC=agl, golang-dev
https://golang.org/cl/10099043