g10: Fix ECDH, clarifying the format.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 27 Oct 2016 03:59:49 +0000 (12:59 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 27 Oct 2016 04:04:45 +0000 (13:04 +0900)
commitca0ee4e381d0b6a57e4ddc8f4bb2390eb97a2540
tree87cc7058681acb65748ba4fdcc7d3463a527e804
parent6bbd97d6c771b2e2c7cfcff6d5a823f0fb44d443
g10: Fix ECDH, clarifying the format.

* g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Returns error when
it's short.  Clarify the format.  Handle other prefixes correctly.

--
With the scdaemon's change, there is no case NBYTES < SECRET_X_SIZE.
This fixes the break of ECDH with X25519.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
g10/ecdh.c