bug in genECDHsharedsecret