My goal here is to allow read-only access to legacy key material without allowing new V3 keys or signatures.
R=agl
CC=golang-dev
https://golang.org/cl/12746046
Previously curve25519 contained a constant-time, optimised amd64 implementation and
a generic implemenation that used math/big and that was not constant-time.
This change contains a Go port of the public domain, "ref10" implementation from
SUPERCOP. This has the advantage of being faster and constant-time.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13343045
This obviates custom code to emulate a thread-safe connection.
Use this for testing that listeners close if the connection breaks.
R=dave, agl, fullung
CC=golang-dev
https://golang.org/cl/11781043
Supports JPEG images as well as free-form arbitrary subpacket data in
user attributes (RFC 4880, Section 5.12)
R=agl
CC=golang-dev
https://golang.org/cl/12966045
This patch implements the facilities needed to compress data before
encryption as allowed (and recommended) by RFC 4880. The new
functionality is then used to add support for compressing data during
symmetric encryption (openpgp.SymmetricallyEncrypt()).
For now, compression defaults to off. Also, only the ZIP and ZLIB
compression schemes are supported by this patch.
Resulting output tested/verified using GPG.
https://gist.github.com/marete/6189760 is a small program that can be
used to test that the output of various compression/encryption settings
can be read by GPG or other RFC 4880 programs.
Upon review, I will follow this patch with 2 others: a) Add support for compression during public key encryption (openpgp.Encrypt()) b) Enable
compression by default (subject to the restrictions of the "Compression Preferences" section in RFC 4880).
R=golang-dev, agl
CC=golang-dev
https://golang.org/cl/12685044
Previously, if Encrypt decided to use a hash function that wasn't
compiled in then it would panic.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12055043
Paul van Brouwershaven pointed out that it would be better to pass in
the issuing certificate and have the verification be done in the OCSP
package than to expect the caller to deal with the difference between
responses with and without a responder certificate.
R=golang-dev, dayveday, paul
CC=golang-dev
https://golang.org/cl/11220043
Tested using a variety of files encrypted with gpg and the
"--compress-algo BZIP2" gpg option.
R=golang-dev, bradfitz, agl
CC=golang-dev
https://golang.org/cl/10801043
The history buffer would recall previously entered lines: including passwords. With this change, lines entered while echo is disabled are no longer put into the history.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/10853043
Some OCSP responses (notably COMODO's) don't use an intermediate
certificate to sign OCSP responses so this change allowed that.
Additionally, a CreateRequest function is added for creating OCSP
requests.
This change makes one API change: SerialNumber becomes a *big.Int to
match crypto/x509. The original code dates to before encoding/asn1
could cope with big.Ints and using a []byte was a workaround for that.
R=golang-dev
CC=golang-dev
https://golang.org/cl/10402043
* Remove special handling for dynamically allocated
ports. This was a bug in OpenSSH 5.x sshd.
* Run the test with a preselected port number.
* Run TestPortForward only on unix platforms.
R=dave, agl
CC=golang-dev
https://golang.org/cl/10049045
Set maxPacket in forwarded connection, and use the requested port
number as key in forwardList.
R=golang-dev, agl, dave
CC=golang-dev
https://golang.org/cl/9753044
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
I ran go vet over all of go.crypto and removed lots of panic("unreachable") that are no longer needed.
R=golang-dev, r, dgryski
CC=golang-dev
https://golang.org/cl/10113043
Fixesgolang/go#5138.
Fixesgolang/go#4703.
This appears to pass my stress tests with and without the -race detector, but I'd like to see others hit it with their machines.
R=golang-dev, fullung, huin, kardianos, agl
CC=golang-dev
https://golang.org/cl/9929043
Followup CL for 9711043. The order that CombinedOutput returns data captured from stdout/stderr is not specified, so we have to test both variants.
Thanks to fullung for the bug report.
R=fullung, kr
CC=golang-dev
https://golang.org/cl/9921044
If cgo is disabled (such as it appears to be on a subset of builders),
username() panics, and s.cmd is nil; let's not panic while recovering
from a different panic.
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/8820043
Taken from my implementation: https://bitbucket.org/ede/sha3
Performance gain from using less memory and more registers.
benchmark old ns/op new ns/op delta
BenchmarkPermutationFunction 1484 1118 -24.66%
BenchmarkBulkKeccak512 374993 295178 -21.28%
BenchmarkBulkKeccak256 215496 172335 -20.03%
benchmark old MB/s new MB/s speedup
BenchmarkPermutationFunction 134.76 178.80 1.33x
BenchmarkBulkKeccak512 43.69 55.51 1.27x
BenchmarkBulkKeccak256 76.03 95.07 1.25x
R=jcb, agl
CC=golang-dev, nigeltao
https://golang.org/cl/8088044
time); delete some comments that didn't add much and were incorrect
anyway (the test specification was tc, not t).
R=jcb
CC=agl, golang-dev
https://golang.org/cl/7665045
When running the ssh tests several times (e.g. with -cpu 1,2), the
second run would fail because testing globals had been altered. This
change avoids altering the globals since the default worked anyway.
Fixesgolang/go#4715.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7903045
Added a pure Go implementation of SHA3 (Keccak) which implements the hash.Hash interface.
A test file is included with performance benchmarks and standard test vectors.
R=agl, nigeltao
CC=golang-dev
https://golang.org/cl/7760044
The session test previously had a one second timeout for the output of
stty and this was leading to flakiness. This change removes the timeout
since go test has a generic timeout mechanism.
Additionally, the test was looking for "-echo" in the output to test
the value of the echo flag. However, there are also typically "echoe",
"echok" and "echonl" flags, and "-echo" could be a prefix of any of
time. Thus we now also match a trailing space.
R=golang-dev, rsc, extraterrestrial.neighbour
CC=golang-dev
https://golang.org/cl/7579043