aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/crypto/openpgp
AgeCommit message (Collapse)Author
2012-01-25build: remove code now in subrepositoriesRuss Cox
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5569064
2012-01-24crypto: rename some FooError to ErrFooBrad Fitzpatrick
Also, add an explicit error type when the right hand side is an unexported function. R=golang-dev, gri, rogpeppe, agl, rsc CC=golang-dev https://golang.org/cl/5564048
2012-01-18crypto/hmac: Add HMAC-SHA224 and HMAC-SHA384/512Luit van Drongelen
First was, apart from adding tests, a single line of code (to add the constructor function). Adding SHA512-based hashing to crypto/hmac required minor rework of the package because of a previously hardcoded block-size in it's implementation. Instead of using a hash.Hash generator function the constructor function now uses a crypto.Hash type, which was extended to expose information about block size. The only standard library package impacted by the change is crypto/tls, for which the fix is included in this patch. It might be useful to extend gofix to include this API change too. R=agl, r, rsc, r CC=golang-dev https://golang.org/cl/5550043
2012-01-11crypto/openpgp: assorted cleanupsAdam Langley
1) Include Szabolcs Nagy's patch which adds serialisation for more signature subpackets. 2) Include Szabolcs Nagy's patch which adds functions for making DSA keys. 3) Make the random io.Reader an argument to the low-level signature functions rather than having them use crypto/rand. 4) Rename crypto/openpgp/error to crypto/openpgp/errors so that it doesn't clash with the new error type. R=bradfitz, r CC=golang-dev https://golang.org/cl/5528044
2012-01-09crypto/openpgp: truncate hashes before checking DSA signatures.Adam Langley
I didn't believe that OpenPGP allowed > SHA-1 with DSA, but it does and so we need to perform hash truncation. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5510044
2011-12-16go/printer, gofmt: fine tuning of line spacingRobert Griesemer
- no empty lines inside empty structs and interfaces - top-level declarations are separated by a blank line if a) they are of different kind (e.g. const vs type); or b) there are documentation comments associated with a declaration (this is new) - applied gofmt -w misc src The actual changes are in go/printer/nodes.go:397-400 (empty structs/interfaces), and go/printer/printer.go:307-309 (extra line break). The remaining changes are cleanups w/o changing the existing functionality. Fixes issue 2570. R=rsc CC=golang-dev https://golang.org/cl/5493057
2011-12-06crypto: allocate less.Adam Langley
The code in hash functions themselves could write directly into the output buffer for a savings of about 50ns. But it's a little ugly so I wasted a copy. R=bradfitz CC=golang-dev https://golang.org/cl/5440111
2011-12-05use new strconv APIRuss Cox
All but 3 cases (in gcimporter.go and hixie.go) are automatic conversions using gofix. No attempt is made to use the new Append functions even though there are definitely opportunities. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5447069
2011-12-01Add a []byte argument to hash.Hash to allow an allocation to be saved.Adam Langley
This is the result of running `gofix -r hashsum` over the tree, changing the hash function implementations by hand and then fixing a couple of instances where gofix didn't catch something. The changed implementations are as simple as possible while still working: I'm not trying to optimise in this CL. R=rsc, cw, rogpeppe CC=golang-dev https://golang.org/cl/5448065
2011-11-30use new time APIRuss Cox
R=bradfitz, gri, r, dsymonds CC=golang-dev https://golang.org/cl/5390042
2011-11-23crypto/openpgp/packet: fix private key checksumAdam Langley
I misinterpreted http://tools.ietf.org/html/rfc4880#section-5.5.3 and implemented the sum of 16-bit values, rather than the 16-bit sum of 8-bit values. Thanks to Szabolcs Nagy for pointing it out. R=bradfitz, r, rsc CC=golang-dev https://golang.org/cl/5372091
2011-11-08renaming_2: gofix -r go1pkgrename src/pkg/[a-l]*Rob Pike
R=rsc CC=golang-dev https://golang.org/cl/5358041
2011-11-03all: rename os.EOF to io.EOF in various non-code contextsVincent Vanackere
R=golang-dev, r CC=golang-dev https://golang.org/cl/5334050
2011-11-02all: sort importsRuss Cox
R=golang-dev, r CC=golang-dev https://golang.org/cl/5319072
2011-11-01src/pkg/[a-m]*: gofix -r error -force=errorRuss Cox
R=golang-dev, iant CC=golang-dev https://golang.org/cl/5322051
2011-10-27crypto/openpgp/error: use Error in names of error impl typesRuss Cox
Will make gofix for error work better. There is no other indication in this file that these are actually error implementations. (They are only used elsewhere.) R=bradfitz CC=golang-dev https://golang.org/cl/5305068
2011-10-13build: fix for new return restrictionRuss Cox
R=golang-dev, r CC=golang-dev https://golang.org/cl/5257057
2011-07-14go/printer: changed max. number of newlines from 3 to 2Robert Griesemer
manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go (cd src/cmd/gofix/testdata; gofmt -w *.in *.out) (cd src/pkg/go/printer; gotest -update) gofmt -w misc src runs all tests R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4715041
2011-07-07crypto/openpgp: fixed dangerous use of for loop variableGideon Jan-Wessel Redelinghuys
In function readSignedMessage a pointer to for loop variable 'key' was incorrectly being assigned to md.SignedBy. Changed so that md.SignedBy is pointing to the 'more correct' memory position. R=golang-dev, r, agl CC=golang-dev https://golang.org/cl/4631088
2011-07-01crypto/openpgp: add ability to reserialize keys.Adam Langley
This changes Signature so that parsed signatures can be reserialized exactly. With this ability we can add Serialize to Entity and also the ability to sign other public keys. R=bradfitz CC=golang-dev https://golang.org/cl/4627084
2011-06-22os.Error API: don't export os.ErrorString, use os.NewError consistentlyRobert Griesemer
This is a core API change. 1) gofix misc src 2) Manual adjustments to the following files under src/pkg: gob/decode.go rpc/client.go os/error.go io/io.go bufio/bufio.go http/request.go websocket/client.go as well as: src/cmd/gofix/testdata/*.go.in (reverted) test/fixedbugs/bug243.go 3) Implemented gofix patch (oserrorstring.go) and test case (oserrorstring_test.go) Compiles and runs all tests. R=r, rsc, gri CC=golang-dev https://golang.org/cl/4607052
2011-06-21crypto/openpgp: add ElGamal support.Adam Langley
R=bradfitz, r CC=golang-dev https://golang.org/cl/4639049
2011-06-17respect goto restrictionsRuss Cox
R=gri CC=golang-dev https://golang.org/cl/4625044
2011-06-13crypto/openpgp: flesh out Encrypt by adding support for signing.Adam Langley
R=bradfitz CC=golang-dev https://golang.org/cl/4572059
2011-06-10crypto/openpgp: build fix (unreviewed)Adam Langley
R=agl CC=golang-dev https://golang.org/cl/4572057
2011-06-10crypto/openpgp: add ability to encrypt messages.Adam Langley
R=bradfitz, r CC=golang-dev https://golang.org/cl/4581051
2011-06-01crypto/openpgp: add support for symmetrically encrypting files.Adam Langley
This mostly adds the infrastructure for writing various forms of packets as well as reading them. Adding symmetric encryption support was simply an easy motivation. There's also one brown-paper-bag fix in here. Previously I had the conditional for the MDC hash check backwards: the code was checking that the hash was *incorrect*. This was neatly counteracted by another bug: it was hashing the ciphertext of the OCFB prefix, not the plaintext. R=bradfitz CC=golang-dev https://golang.org/cl/4564046
2011-05-20crypto/openpgp: add key generation support.Adam Langley
This change adds a function for generating new Entities and inchoate support for reserialising Entities. R=bradfitz, r, bradfitz CC=golang-dev https://golang.org/cl/4551044
2011-05-18pkg: spelling tweaks, A-HRobert Hencke
R=ality, bradfitz, rsc, dsymonds, adg, qyzhai, dchest CC=golang-dev https://golang.org/cl/4536063
2011-05-14pkg: fix incorrect prints found by govetRobert Hencke
Also, clarify some error messages R=golang-dev, r CC=golang-dev https://golang.org/cl/4548042
2011-05-14crypto/openpgp: change PublicKey.Serialize to include the header.Adam Langley
Signature.Serialize already does this and they should be consistent. R=bradfitz CC=golang-dev https://golang.org/cl/4521064
2011-05-09go/printer, gofmt: fix alignment of "=" in const/var declarationsRobert Griesemer
gofmt -w src misc Fixes #1414. R=rsc, r CC=golang-dev https://golang.org/cl/4456054
2011-04-22crypto/rsa: support > 3 primes.Adam Langley
With full multi-prime support we can support version 1 PKCS#1 private keys. This means exporting all the members of rsa.PrivateKey, thus making the API a little messy. However there has already been another request to export this so it seems to be something that's needed. Over time, rsa.GenerateMultiPrimeKey will replace rsa.GenerateKey, but I need to work on the prime balance first because we're no longer generating primes which are a multiples of 8 bits. Fixes #987. R=rsc CC=golang-dev https://golang.org/cl/4378046
2011-04-20src/pkg: make package doc comments consistently start with "Package foo".Nigel Tao
R=rsc CC=golang-dev https://golang.org/cl/4442064
2011-04-19crypto/openpgp: better handling of keyrings.Adam Langley
* Accept armored private key blocks * If an armored block is missing, return an InvalidArgumentError, rather than ignoring it. * If every key in a block is skipped due to being unsupported, return the last unsupported error. * Include the numeric type of unsupported public keys. * Don't assume that the self-signature comes immediately after the user id packet. R=bradfitzgo CC=golang-dev https://golang.org/cl/4434048
2011-04-13bufio: add ReadLineAdam Langley
It matches encoding/line exactly and the tests are copied from there. If we land this, then encoding/line will get marked as deprecated then deleted in time. R=rsc, rog, peterGo CC=golang-dev https://golang.org/cl/4389046
2011-04-12openpgp: Fix improper := shadowingGustavo Niemeyer
R=golang-dev, agl1, jnml CC=golang-dev https://golang.org/cl/4381058
2011-03-25testing: shorten some tests.Rob Pike
These are the top runners. More to come. Also print two digits of timing info under -test.v. R=rsc CC=golang-dev https://golang.org/cl/4317044
2011-03-16crypto/openpgp: add DSA signature support.Adam Langley
R=bradfitzgo, nsz CC=golang-dev https://golang.org/cl/4280041
2011-03-15openpgp: add PublicKey KeyId string accessorsBrad Fitzpatrick
R=agl, agl1 CC=golang-dev https://golang.org/cl/4297041
2011-03-10crypto/openpgp: s/serialise/serialize/Adam Langley
(No code changes, Americanization only.) R=rsc, bradfitzwork CC=golang-dev https://golang.org/cl/4250075
2011-03-10crypto/openpgp: bug fixes and fix misnamed function.Adam Langley
R=rsc, bradfitzwork CC=golang-dev https://golang.org/cl/4244066
2011-02-25crypto/openpgp: fix test printsRob Pike
R=agl, agl1 CC=golang-dev https://golang.org/cl/4255041
2011-02-24crypto/openpgp: add packageAdam Langley
R=bradfitzgo CC=golang-dev https://golang.org/cl/3989052
2011-02-19crypto/openpgp/packet: comment typo fix.Adam Langley
R=rsc CC=golang-dev https://golang.org/cl/4178065
2011-02-18crypto/openpgp/packet: fix testing print (missing arg)Rob Pike
R=agl CC=golang-dev https://golang.org/cl/4173062
2011-02-11crypto/openpgp: minor updates to subpackagesAdam Langley
Now that packet/ is checked in, we can add its Makefile. Also, a couple of updates to error/ and s2k/ for bugfixes and to use the new crypto package. R=bradfitzgo CC=golang-dev https://golang.org/cl/4179043
2011-02-10crypto/openpgp/packet: add remainder of packet types.Adam Langley
(The unittest for Signature may seem a little small, but it's tested by the higher level code.) R=bradfitzgo CC=golang-dev https://golang.org/cl/4173043
2011-02-10crypto/openpgp/packet: four more packet types.Adam Langley
R=bradfitzgo CC=golang-dev https://golang.org/cl/4156044
2011-02-09src/*: fix incorrect prints found by govetRob Pike
R=gri CC=golang-dev https://golang.org/cl/4169044