anchor.diff:          {?MODULE, From, {send, Data}} ->
               {SendParams_1, SendSeq_1, Result} =
                   encrypt_and_send_chunk(
  -                  SendParams, SendSeq, [?HANDSHAKE_CHUNK, Data]),
  +                  SendParams, SendSeq,
  +                  [?HANDSHAKE_CHUNK, Data], 1 + iolist_size(Data)),
               if
                   Result =:= ok ->
                       reply(From, ok),
  
positive.code:     #key_pair{public = PubKeyA} = KeyPair = get_new_key_pair(),
      case
          gen_tcp:send(
            Socket, encrypt_chunk(Params, Seq, [?REKEY_CHUNK, PubKeyA]))
      of
          ok ->
              SharedSecret = compute_shared_secret(KeyPair, PubKeyB),
  
negative.code: encrypt_and_send_chunk(
    #params{
       socket = Socket, rekey_count = RekeyCount, rekey_msg = RekeyMsg} = Params,
    Seq, Cleartext, Size) when Seq =:= RekeyCount ->
      %%
      cancel_rekey_timer(RekeyMsg),
      case encrypt_and_send_rekey_chunk(Params, Seq) of
          #params{} = Params_1 ->
              Result =
                  gen_tcp:send(
                    Socket, encrypt_chunk(Params, 0, Cleartext, Size)),
              {Params_1, 1, Result};
          SendError ->
              {Params, Seq + 1, SendError}
      end;
  encrypt_and_send_chunk(
    #params{socket = Socket} = Params, Seq, Cleartext, Size) ->
      Result =
          gen_tcp:send(Socket, encrypt_chunk(Params, Seq, Cleartext, Size)),
      {Params, Seq + 1, Result}.
  
  encrypt_and_send_rekey_chunk(
  