anchor.diff:          false ->
               select_cipher_suite(ClientCiphers, ServerCiphers)
       end.
  +
  +
  +%% RFC 8446 4.1.3 ServerHello
  +%% A client which receives a cipher suite that was not offered MUST abort the
  +%% handshake with an "illegal_parameter" alert.
  +validate_cipher_suite(Cipher, ClientCiphers) ->
  +    case lists:member(Cipher, ClientCiphers) of
  +        true ->
  +            ok;
  +        false ->
  +            {error, illegal_parameter}
  +    end.
  +
   
   %% RFC 8446 (TLS 1.3)
   %% TLS 1.3 provides two extensions for indicating which signature
  
positive.code: %% for groups not listed in the client's "supported_groups" extension.
  %% Servers MAY check for violations of these rules and abort the
  %% handshake with an "illegal_parameter" alert if one is violated.
  validate_key_share(_ ,[]) ->
      ok;
  validate_key_share([], _) ->
      {error, illegal_parameter};
  validate_key_share([G|ClientGroups], [{_, G, _}|ClientShares]) ->
      validate_key_share(ClientGroups, ClientShares);
  validate_key_share([_|ClientGroups], [_|_] = ClientShares) ->
      validate_key_share(ClientGroups, ClientShares).
  
  
  get_client_public_key([Group|_] = Groups, ClientShares) ->
  
negative.code:         %% Go to state 'start' if server replies with 'HelloRetryRequest'.
          Maybe(maybe_hello_retry_request(ServerHello, State0)),
  
          Maybe(validate_cipher_suite(SelectedCipherSuite, ClientCiphers)),
          Maybe(validate_server_key_share(ClientGroups, ServerKeyShare)),
  
          %% Get server public key
          {SelectedGroup, ServerPublicKey} = get_server_public_key(ServerKeyShare),
  