Finish refactoring ephemeral key exchange.

This was more of a test refactor than anything, but at least we know it
works now.