mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-26 19:57:13 +09:00
Let sodium_init() pick the fastest curve25519 implementation
This commit is contained in:
@@ -24,6 +24,10 @@ int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n,
|
||||
SODIUM_EXPORT
|
||||
int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
int _crypto_scalarmult_curve25519_pick_best_implementation(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "core.h"
|
||||
#include "crypto_generichash.h"
|
||||
#include "crypto_onetimeauth.h"
|
||||
#include "crypto_scalarmult.h"
|
||||
#include "randombytes.h"
|
||||
#include "runtime.h"
|
||||
#include "utils.h"
|
||||
@@ -19,6 +20,7 @@ sodium_init(void)
|
||||
_sodium_alloc_init();
|
||||
_crypto_generichash_blake2b_pick_best_implementation();
|
||||
_crypto_onetimeauth_poly1305_pick_best_implementation();
|
||||
_crypto_scalarmult_curve25519_pick_best_implementation();
|
||||
initialized = 1;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user