Skip to content

Commit

Permalink
Make sodium_crypto_kx() faster when ext/sodium is installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Mar 20, 2019
1 parent f261f50 commit 87125d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Crypto.php
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,8 @@ public static function generichash_update($ctx, $message)
*/
public static function keyExchange($my_sk, $their_pk, $client_pk, $server_pk)
{
return self::generichash(
self::scalarmult($my_sk, $their_pk) .
return ParagonIE_Sodium_Compat::crypto_generichash(
ParagonIE_Sodium_Compat::crypto_scalarmult($my_sk, $their_pk) .
$client_pk .
$server_pk
);
Expand Down

0 comments on commit 87125d5

Please sign in to comment.