mirror of https://github.com/oxen-io/lokinet
make format crypto/
parent
842fe039bc
commit
595b15d538
File diff suppressed because it is too large
Load Diff
@ -1,40 +1,52 @@
|
||||
{
|
||||
{ 25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605 },
|
||||
{ -12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378 },
|
||||
{ -8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546 }
|
||||
},
|
||||
{
|
||||
{ 15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024 },
|
||||
{ 16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574 },
|
||||
{ 30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357 }
|
||||
},
|
||||
{
|
||||
{ 10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380 },
|
||||
{ 4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306 },
|
||||
{ 19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942 }
|
||||
},
|
||||
{
|
||||
{ 5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766 },
|
||||
{ -30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701 },
|
||||
{ 28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300 }
|
||||
},
|
||||
{
|
||||
{ -22518993, -6692182, 14201702, -8745502, -23510406, 8844726, 18474211, -1361450, -13062696, 13821877 },
|
||||
{ -6455177, -7839871, 3374702, -4740862, -27098617, -10571707, 31655028, -7212327, 18853322, -14220951 },
|
||||
{ 4566830, -12963868, -28974889, -12240689, -7602672, -2830569, -8514358, -10431137, 2207753, -3209784 }
|
||||
},
|
||||
{
|
||||
{ -25154831, -4185821, 29681144, 7868801, -6854661, -9423865, -12437364, -663000, -31111463, -16132436 },
|
||||
{ 25576264, -2703214, 7349804, -11814844, 16472782, 9300885, 3844789, 15725684, 171356, 6466918 },
|
||||
{ 23103977, 13316479, 9739013, -16149481, 817875, -15038942, 8965339, -14088058, -30714912, 16193877 }
|
||||
},
|
||||
{
|
||||
{ -33521811, 3180713, -2394130, 14003687, -16903474, -16270840, 17238398, 4729455, -18074513, 9256800 },
|
||||
{ -25182317, -4174131, 32336398, 5036987, -21236817, 11360617, 22616405, 9761698, -19827198, 630305 },
|
||||
{ -13720693, 2639453, -24237460, -7406481, 9494427, -5774029, -6554551, -15960994, -2449256, -14291300 }
|
||||
},
|
||||
{
|
||||
{ -3151181, -5046075, 9282714, 6866145, -31907062, -863023, -18940575, 15033784, 25105118, -7894876 },
|
||||
{ -24326370, 15950226, -31801215, -14592823, -11662737, -5090925, 1573892, -2625887, 2198790, -15804619 },
|
||||
{ -3099351, 10324967, -2241613, 7453183, -5446979, -2735503, -13812022, -16236442, -32461234, -12290683 }
|
||||
{{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626,
|
||||
-11754271, -6079156, 2047605},
|
||||
{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384,
|
||||
19500929, -15469378},
|
||||
{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919,
|
||||
11864899, -24514362, -4438546}},
|
||||
{{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600,
|
||||
-14772189, 28944400, -1550024},
|
||||
{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577,
|
||||
-11775962, 7689662, 11199574},
|
||||
{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774,
|
||||
10017326, -17749093, -9920357}},
|
||||
{{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885,
|
||||
14515107, -15438304, 10819380},
|
||||
{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668,
|
||||
12483688, -12668491, 5581306},
|
||||
{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350,
|
||||
13850243, -23678021, -15815942}},
|
||||
{{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134,
|
||||
-23952439, -15175766},
|
||||
{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025,
|
||||
16520125, 30598449, 7715701},
|
||||
{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660,
|
||||
1370708, 29794553, -1409300}},
|
||||
{{-22518993, -6692182, 14201702, -8745502, -23510406, 8844726, 18474211,
|
||||
-1361450, -13062696, 13821877},
|
||||
{-6455177, -7839871, 3374702, -4740862, -27098617, -10571707, 31655028,
|
||||
-7212327, 18853322, -14220951},
|
||||
{4566830, -12963868, -28974889, -12240689, -7602672, -2830569, -8514358,
|
||||
-10431137, 2207753, -3209784}},
|
||||
{{-25154831, -4185821, 29681144, 7868801, -6854661, -9423865, -12437364,
|
||||
-663000, -31111463, -16132436},
|
||||
{25576264, -2703214, 7349804, -11814844, 16472782, 9300885, 3844789,
|
||||
15725684, 171356, 6466918},
|
||||
{23103977, 13316479, 9739013, -16149481, 817875, -15038942, 8965339,
|
||||
-14088058, -30714912, 16193877}},
|
||||
{{-33521811, 3180713, -2394130, 14003687, -16903474, -16270840, 17238398,
|
||||
4729455, -18074513, 9256800},
|
||||
{-25182317, -4174131, 32336398, 5036987, -21236817, 11360617, 22616405,
|
||||
9761698, -19827198, 630305},
|
||||
{-13720693, 2639453, -24237460, -7406481, 9494427, -5774029, -6554551,
|
||||
-15960994, -2449256, -14291300}},
|
||||
{
|
||||
{-3151181, -5046075, 9282714, 6866145, -31907062,
|
||||
-863023, -18940575, 15033784, 25105118, -7894876},
|
||||
{-24326370, 15950226, -31801215, -14592823, -11662737,
|
||||
-5090925, 1573892, -2625887, 2198790, -15804619},
|
||||
{
|
||||
-3099351, 10324967, -2241613, 7453183, -5446979, -2735503, -13812022,
|
||||
-16236442, -32461234, -12290683
|
||||
}
|
||||
}
|
||||
|
@ -1,20 +1,18 @@
|
||||
/* 37095705934669439343138083508754565189542113879843219016388785533085940283555 */
|
||||
static const fe25519 d = {
|
||||
-10913610, 13857413, -15372611, 6949391, 114729, -8787816, -6275908, -3247719, -18696448, -12055116
|
||||
};
|
||||
/* 37095705934669439343138083508754565189542113879843219016388785533085940283555
|
||||
*/
|
||||
static const fe25519 d = {-10913610, 13857413, -15372611, 6949391, 114729,
|
||||
-8787816, -6275908, -3247719, -18696448, -12055116};
|
||||
|
||||
/* 2 * d =
|
||||
* 16295367250680780974490674513165176452449235426866156013048779062215315747161
|
||||
*/
|
||||
static const fe25519 d2 = {
|
||||
-21827239, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199 };
|
||||
static const fe25519 d2 = {-21827239, -5839606, -30745221, 13898782, 229458,
|
||||
15978800, -12551817, -6495438, 29715968, 9444199};
|
||||
|
||||
/* sqrt(-1) */
|
||||
static const fe25519 sqrtm1 = {
|
||||
-32595792, -7943725, 9377950, 3500415, 12389472, -272473, -25146209, -2005654, 326686, 11406482
|
||||
};
|
||||
static const fe25519 sqrtm1 = {-32595792, -7943725, 9377950, 3500415,
|
||||
12389472, -272473, -25146209, -2005654,
|
||||
326686, 11406482};
|
||||
|
||||
/* A = 486662 */
|
||||
static const fe25519 curve25519_A = {
|
||||
486662, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
static const fe25519 curve25519_A = {486662, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
|
@ -1,18 +1,17 @@
|
||||
#ifndef sign_ed25519_ref10_H
|
||||
#define sign_ed25519_ref10_H
|
||||
|
||||
void _crypto_sign_ed25519_ref10_hinit(crypto_hash_sha512_state *hs,
|
||||
int prehashed);
|
||||
void
|
||||
_crypto_sign_ed25519_ref10_hinit(crypto_hash_sha512_state *hs, int prehashed);
|
||||
|
||||
int _crypto_sign_ed25519_detached(unsigned char *sig,
|
||||
unsigned long long *siglen_p,
|
||||
const unsigned char *m,
|
||||
unsigned long long mlen,
|
||||
int
|
||||
_crypto_sign_ed25519_detached(unsigned char *sig, unsigned long long *siglen_p,
|
||||
const unsigned char *m, unsigned long long mlen,
|
||||
const unsigned char *sk, int prehashed);
|
||||
|
||||
int _crypto_sign_ed25519_verify_detached(const unsigned char *sig,
|
||||
int
|
||||
_crypto_sign_ed25519_verify_detached(const unsigned char *sig,
|
||||
const unsigned char *m,
|
||||
unsigned long long mlen,
|
||||
const unsigned char *pk,
|
||||
int prehashed);
|
||||
const unsigned char *pk, int prehashed);
|
||||
#endif
|
||||
|
@ -1,12 +1,22 @@
|
||||
|
||||
int crypto_kem_enc_ref(unsigned char *cstr, unsigned char *k, const unsigned char *pk);
|
||||
int
|
||||
crypto_kem_enc_ref(unsigned char *cstr, unsigned char *k,
|
||||
const unsigned char *pk);
|
||||
|
||||
int crypto_kem_dec_ref(unsigned char *k, const unsigned char *cstr, const unsigned char *sk);
|
||||
int
|
||||
crypto_kem_dec_ref(unsigned char *k, const unsigned char *cstr,
|
||||
const unsigned char *sk);
|
||||
|
||||
int crypto_kem_keypair_ref(unsigned char *pk, unsigned char * sk);
|
||||
int
|
||||
crypto_kem_keypair_ref(unsigned char *pk, unsigned char *sk);
|
||||
|
||||
int crypto_kem_enc_avx2(unsigned char *cstr, unsigned char *k, const unsigned char *pk);
|
||||
int
|
||||
crypto_kem_enc_avx2(unsigned char *cstr, unsigned char *k,
|
||||
const unsigned char *pk);
|
||||
|
||||
int crypto_kem_dec_avx2(unsigned char *k, const unsigned char *cstr, const unsigned char *sk);
|
||||
int
|
||||
crypto_kem_dec_avx2(unsigned char *k, const unsigned char *cstr,
|
||||
const unsigned char *sk);
|
||||
|
||||
int crypto_kem_keypair_avx2(unsigned char *pk, unsigned char * sk);
|
||||
int
|
||||
crypto_kem_keypair_avx2(unsigned char *pk, unsigned char *sk);
|
||||
|
@ -1,11 +1,17 @@
|
||||
#ifndef implementations_H
|
||||
#define implementations_H
|
||||
|
||||
int _crypto_generichash_blake2b_pick_best_implementation(void);
|
||||
int _crypto_onetimeauth_poly1305_pick_best_implementation(void);
|
||||
int _crypto_pwhash_argon2_pick_best_implementation(void);
|
||||
int _crypto_scalarmult_curve25519_pick_best_implementation(void);
|
||||
int _crypto_stream_chacha20_pick_best_implementation(void);
|
||||
int _crypto_stream_salsa20_pick_best_implementation(void);
|
||||
int
|
||||
_crypto_generichash_blake2b_pick_best_implementation(void);
|
||||
int
|
||||
_crypto_onetimeauth_poly1305_pick_best_implementation(void);
|
||||
int
|
||||
_crypto_pwhash_argon2_pick_best_implementation(void);
|
||||
int
|
||||
_crypto_scalarmult_curve25519_pick_best_implementation(void);
|
||||
int
|
||||
_crypto_stream_chacha20_pick_best_implementation(void);
|
||||
int
|
||||
_crypto_stream_salsa20_pick_best_implementation(void);
|
||||
|
||||
#endif
|
||||
|
@ -1,7 +1,9 @@
|
||||
#ifndef mutex_H
|
||||
#define mutex_H 1
|
||||
|
||||
extern int sodium_crit_enter(void);
|
||||
extern int sodium_crit_leave(void);
|
||||
extern int
|
||||
sodium_crit_enter(void);
|
||||
extern int
|
||||
sodium_crit_leave(void);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue