mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-04-18 21:12:02 +00:00
idk
This commit is contained in:
parent
7dea621e41
commit
f1c56e7480
6 changed files with 23 additions and 3 deletions
6
worker.c
6
worker.c
|
@ -98,9 +98,9 @@ static void onionready(char *sname,const u8 *secret,const u8 *pubonion)
|
|||
// Sanity check that the public key matches the private one.
|
||||
ge_p3 ALIGN(16) point;
|
||||
u8 testpk[PUBLIC_LEN];
|
||||
ge_scalarmult_base(&point, secret);
|
||||
ge_p3_tobytes(testpk, &point);
|
||||
if (!memcmp(testpk, pubonion, PUBLIC_LEN))
|
||||
ge_scalarmult_base(&point,secret);
|
||||
ge_p3_tobytes(testpk,&point);
|
||||
if (!memcmp(testpk,pubonion,PUBLIC_LEN))
|
||||
abort();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ void *worker_batch(void *task)
|
|||
sname = makesname();
|
||||
|
||||
initseed:
|
||||
|
||||
#ifdef STATISTICS
|
||||
++st->numrestart.v;
|
||||
#endif
|
||||
|
@ -114,8 +115,11 @@ initseed:
|
|||
|
||||
end:
|
||||
free(sname);
|
||||
|
||||
POSTFILTER
|
||||
|
||||
sodium_memzero(secret,sizeof(secret));
|
||||
sodium_memzero(seed,sizeof(seed));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ void *worker_batch_pass(void *task)
|
|||
sname = makesname();
|
||||
|
||||
initseed:
|
||||
|
||||
#ifdef STATISTICS
|
||||
++st->numrestart.v;
|
||||
#endif
|
||||
|
@ -191,9 +192,12 @@ initseed:
|
|||
|
||||
end:
|
||||
free(sname);
|
||||
|
||||
POSTFILTER
|
||||
|
||||
sodium_memzero(secret,sizeof(secret));
|
||||
sodium_memzero(seed,sizeof(seed));
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif // PASSPHRASE
|
||||
|
|
|
@ -33,6 +33,7 @@ void *worker_fast(void *task)
|
|||
sname = makesname();
|
||||
|
||||
initseed:
|
||||
|
||||
#ifdef STATISTICS
|
||||
++st->numrestart.v;
|
||||
#endif
|
||||
|
@ -96,8 +97,11 @@ initseed:
|
|||
|
||||
end:
|
||||
free(sname);
|
||||
|
||||
POSTFILTER
|
||||
|
||||
sodium_memzero(secret,sizeof(secret));
|
||||
sodium_memzero(seed,sizeof(seed));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ void *worker_fast_pass(void *task)
|
|||
sname = makesname();
|
||||
|
||||
initseed:
|
||||
|
||||
#ifdef STATISTICS
|
||||
++st->numrestart.v;
|
||||
#endif
|
||||
|
@ -104,9 +105,12 @@ initseed:
|
|||
|
||||
end:
|
||||
free(sname);
|
||||
|
||||
POSTFILTER
|
||||
|
||||
sodium_memzero(secret,sizeof(secret));
|
||||
sodium_memzero(seed,sizeof(seed));
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif // PASSPHRASE
|
||||
|
|
|
@ -33,6 +33,7 @@ void *worker_slow(void *task)
|
|||
initseed:
|
||||
randombytes(seed,sizeof(seed));
|
||||
ed25519_seckey_expand(sk,seed);
|
||||
|
||||
#ifdef STATISTICS
|
||||
++st->numrestart.v;
|
||||
#endif
|
||||
|
@ -83,8 +84,11 @@ next:
|
|||
|
||||
end:
|
||||
free(sname);
|
||||
|
||||
POSTFILTER
|
||||
|
||||
sodium_memzero(secret,sizeof(secret));
|
||||
sodium_memzero(seed,sizeof(seed));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue