]> Cypherpunks repositories - gostls13.git/commit
crypto/openpgp: add support for symmetrically encrypting files.
authorAdam Langley <agl@golang.org>
Wed, 1 Jun 2011 19:23:22 +0000 (15:23 -0400)
committerAdam Langley <agl@golang.org>
Wed, 1 Jun 2011 19:23:22 +0000 (15:23 -0400)
commite0cca45fcb52825e2e21325bc7e5230bafcce088
treefb57b386f7896836593e23c4c7e7182605da29f9
parent2899535de5a343b645ebaddca4147e34d764b8a5
crypto/openpgp: add support for symmetrically encrypting files.

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
12 files changed:
src/pkg/crypto/cipher/ocfb.go
src/pkg/crypto/openpgp/packet/literal.go
src/pkg/crypto/openpgp/packet/packet.go
src/pkg/crypto/openpgp/packet/packet_test.go
src/pkg/crypto/openpgp/packet/symmetric_key_encrypted.go
src/pkg/crypto/openpgp/packet/symmetric_key_encrypted_test.go
src/pkg/crypto/openpgp/packet/symmetrically_encrypted.go
src/pkg/crypto/openpgp/packet/symmetrically_encrypted_test.go
src/pkg/crypto/openpgp/s2k/s2k.go
src/pkg/crypto/openpgp/s2k/s2k_test.go
src/pkg/crypto/openpgp/write.go
src/pkg/crypto/openpgp/write_test.go