anchor.diff:                    AeadCipher, Key1B, IV1B, {AAD, Ciphertext, Tag})
               of
                   <<R2B:RLen/binary, R3B:RLen/binary, PubKeyB/binary>> ->
  -                    SharedSecret =
  -                        crypto:compute_key(
  -                          PublicKeyType, PubKeyB, PrivKey, PublicKeyParams),
  +                    SharedSecret = compute_shared_secret(KeyPair, PubKeyB),
                       %%
                       {Key2A, IV2A} =
                           hmac_key_iv(
                             HmacAlgo, SharedSecret, [R2A, R3B], KeyLen, IVLen),
                       SendParams =
                           Params#params{
  -                          shared_secret = SharedSecret,
  +                          rekey_key = PubKeyB,
                             key = Key2A, iv = IV2A},
                       %%
                       StartCleartext = [R2B, R3B, <<RekeyInterval:32>>],
  
positive.code:                           HmacAlgo, SharedSecret, [R2B, R3A], KeyLen, IVLen),
                      RecvParams =
                          Params#params{
                            shared_secret = SharedSecret,
                            key = Key2B, iv = IV2B},
                      %%
                      {SendParams, RecvParams, StartMsg}
  
negative.code:          dist_handle,
           hmac_algorithm = sha256,
           aead_cipher = aes_gcm,
           rekey_key,
           iv = 12,
           key = 16,
           tag_len = 16,
           rekey_interval = 262144
          }).
  
  params(Socket) ->
      #params{socket = Socket}.
  
  
  -record(key_pair,
          {type = ecdh,
           %% The curve choice greatly affects setup time,
           %% we really want an Edwards curve but that would
  