otr: support signaling the end of a conversation.

The explicit OTR termination signal tells the peer that they should
discard their session keys and, more importantly, tells them that
*you* have done so and therefore cannot decrypt future messages.

R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/6430043
otr: fix compilation

R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/6446054
bn256: add package

Package bn256 implements a particular bilinear group at the 128-bit
security level.

R=golang-dev, remyoudompheng, r, r, akumar
CC=golang-dev
http://codereview.appspot.com/6402052
go.crypto/ssh: never send more data than maxpacket

RFC 4254 s5.2 is clear that a client must never send a data
packet larger than the value of maximum packet supplied by the
remote side during channel setup. The client was not honoring
this value, in fact it wasn't even recording it.

Thanks to Albert Strasheim for the bug report.

R=agl, fullung
CC=golang-dev
http://codereview.appspot.com/6448128
go.crypto/curve25519: fix incorrect build tag

The build tag was incorrect. CL 6458091 exposed the mistake.

R=golang-dev, dsymonds, r
CC=golang-dev
http://codereview.appspot.com/6460067
go.crypto/ssh: cosmetic: move remaining channel code into channel.go

This CL scratches an itch by moving the remaining channel related code
into channel.go.

R=agl
CC=golang-dev
http://codereview.appspot.com/6454126
openpgp: support 3DES encrypted private keys.

It appears that CentOS (and so I presume Fedora/RHEL too) default to
encrypting private keys with 3DES so it looks like we need to support
that.

Fixes issue 3940.

R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/6446121
go.crypto/ssh: improve channel max packet handling

This proposal moves the check for max packet into
channel.writePacket. Callers should be aware they cannot
pass a buffer larger than max packet. This is only a
concern to chanWriter.Write and appropriate guards are
already in place.

There was some max packet handling in transport.go but it was
incorrect. This has been removed.

This proposal also cleans up session_test.go.

R=gustav.paul, agl, fullung, huin
CC=golang-dev
http://codereview.appspot.com/6460075
go.crypto/ssh: fix misplaced defer

Fixes issue 3972.

R=golang-dev, agl, r
CC=golang-dev
http://codereview.appspot.com/6448166
go.crypto/ssh: prevent channel writes after Close

Fixes issue 3810.

This change introduces an atomic boolean to guard the close
of the clientChan. Previously the client code was quite
lax with the ordering of the close messages and could allow
window adjustment or EOF messages to leak after Close had
been signaled.

Consolidating the changes to the serverChan will be handled
in a following CL.

R=agl, kardianos, gustav.paul
CC=golang-dev
http://codereview.appspot.com/6405064
go.crypto/ssh: prevent server from sending more than maxPacket

Fixes issue 4003.

R=agl, dave, agl
CC=golang-dev
http://codereview.appspot.com/6483052

Committer: Dave Cheney <dave@cheney.net>
go.crypto/ssh: fix test failure on windows

Use a handler that does not attempt to send a status message
as the failing test closes the connection abruptly.

Also, check the err response on all shell.ReadLine operations.

R=agl, minux.ma, kardianos
CC=golang-dev
http://codereview.appspot.com/6487043
go.crypto/ssh: improve test reliability

Fixes issue 3989.

Tested for several hours on an 8 core ec2 instance with
random GOMAXPROC values.

Also, rolls server_test.go into session_test using the
existing dial() framework.

R=fullung, agl, kardianos
CC=golang-dev
http://codereview.appspot.com/6475063