Yet another ecdhe PR

This is continuation of #57 and #82.  Sigh.