Classic protocol and crypto cleanups.

How about key, then ?
Nothing outside this block refers to it again, and it appears to be allocated at the start of this block.  I see no sign of a deallocation.