anchor.diff:  		      #ssh{keyex_key = {{MyPublic,MyPrivate}, Curve}} = Ssh0
   		     ) ->
       %% at client
  -    case ecdh_validate_public_key(PeerPublic, Curve) of
  -	true ->
  -	    K = compute_key(ecdh, PeerPublic, MyPrivate, Curve),
  +    try
  +	compute_key(ecdh, PeerPublic, MyPrivate, Curve)
  +    of
  +	K ->
   	    H = kex_h(Ssh0, Curve, PeerPubHostKey, MyPublic, PeerPublic, K), 
   	    case verify_host_key(Ssh0, PeerPubHostKey, H, H_SIG) of
   		ok ->
  
positive.code: 			      description = "Key exchange failed",
  			      language = ""}
  			  })
  	    end;
  
  	false ->
  	    throw({{error,invalid_peer_public_key},
  		   #ssh_msg_disconnect{
  		      code = ?SSH_DISCONNECT_KEY_EXCHANGE_FAILED,
  
negative.code:     	    {ok, SshPacket, Ssh1#ssh{keyex_key = {{MyPublic,MyPrivate},Curve},
  				     shared_secret = K,
  				     exchanged_hash = H,
  				     session_id = sid(Ssh1, H)}}
      catch
  	_:_ ->
  	    throw({{error,invalid_peer_public_key},
  		   #ssh_msg_disconnect{
  		      code = ?SSH_DISCONNECT_KEY_EXCHANGE_FAILED,
  