Commit Graph
6 Commits
Author SHA1 Message Date
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
Brian Gitonga Marete 690e22b80a openpgp: Implement compressed data packets & add support for compressing data during symmetric encryption.
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
2013-08-15 12:04:10 -04:00
Adam Langley f23aef828f go.crypto/openpgp: test that hashes are compiled in before using them.
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
2013-08-05 14:22:57 -04:00
Adam Langley eb19e229bd go.crypto/openpgp: don't select expired keys.
When selecting keys for encryption, don't select keys that have
expired.

Fixes golang/go#5808.

R=bradfitz
CC=golang-dev
https://golang.org/cl/10847043
2013-07-22 18:23:28 -04:00
Adam Langley 54eafe1dea openpgp: eliminate implicit rand.Reader and time.Now
Fixes golang/go#2501.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5653067
2012-02-20 10:48:21 -05:00
Russ Cox 470549d502 go.crypto: initial code
Manual edits to README.
Moved from main Go repository, deleted Makefiles, ran gofix -r go1rename.

Tested with: go test code.google.com/p/go.crypto/...

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5564059
2012-01-25 15:31:12 -05:00