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: 		     Ssh0 = #ssh{algorithms = #alg{kex=Kex}}) ->
      %% at server
      Curve = ecdh_curve(Kex),
      case ecdh_validate_public_key(PeerPublic, Curve) of
  	true ->
              {MyPublic, MyPrivate} = generate_key(ecdh, Curve),
  	    K = compute_key(ecdh, PeerPublic, MyPrivate, Curve),
  	    MyPrivHostKey = get_host_key(Ssh0),
  	    MyPubHostKey = extract_public_key(MyPrivHostKey),
  	    H = kex_h(Ssh0, Curve, MyPubHostKey, PeerPublic, MyPublic, K),
  
negative.code: 		  })
      end.
  
  
  %%%----------------------------------------------------------------
  handle_new_keys(#ssh_msg_newkeys{}, Ssh0) ->
  