(EC)DH memory handling fixes.

Submitted by: Adam Langley
4 files changed