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.
|
// Sanity check that the public key matches the private one.
|
||||||
ge_p3 ALIGN(16) point;
|
ge_p3 ALIGN(16) point;
|
||||||
u8 testpk[PUBLIC_LEN];
|
u8 testpk[PUBLIC_LEN];
|
||||||
ge_scalarmult_base(&point, secret);
|
ge_scalarmult_base(&point,secret);
|
||||||
ge_p3_tobytes(testpk, &point);
|
ge_p3_tobytes(testpk,&point);
|
||||||
if (!memcmp(testpk, pubonion, PUBLIC_LEN))
|
if (!memcmp(testpk,pubonion,PUBLIC_LEN))
|
||||||
abort();
|
abort();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ void *worker_batch(void *task)
|
||||||
sname = makesname();
|
sname = makesname();
|
||||||
|
|
||||||
initseed:
|
initseed:
|
||||||
|
|
||||||
#ifdef STATISTICS
|
#ifdef STATISTICS
|
||||||
++st->numrestart.v;
|
++st->numrestart.v;
|
||||||
#endif
|
#endif
|
||||||
|
@ -114,8 +115,11 @@ initseed:
|
||||||
|
|
||||||
end:
|
end:
|
||||||
free(sname);
|
free(sname);
|
||||||
|
|
||||||
POSTFILTER
|
POSTFILTER
|
||||||
|
|
||||||
sodium_memzero(secret,sizeof(secret));
|
sodium_memzero(secret,sizeof(secret));
|
||||||
sodium_memzero(seed,sizeof(seed));
|
sodium_memzero(seed,sizeof(seed));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ void *worker_batch_pass(void *task)
|
||||||
sname = makesname();
|
sname = makesname();
|
||||||
|
|
||||||
initseed:
|
initseed:
|
||||||
|
|
||||||
#ifdef STATISTICS
|
#ifdef STATISTICS
|
||||||
++st->numrestart.v;
|
++st->numrestart.v;
|
||||||
#endif
|
#endif
|
||||||
|
@ -191,9 +192,12 @@ initseed:
|
||||||
|
|
||||||
end:
|
end:
|
||||||
free(sname);
|
free(sname);
|
||||||
|
|
||||||
POSTFILTER
|
POSTFILTER
|
||||||
|
|
||||||
sodium_memzero(secret,sizeof(secret));
|
sodium_memzero(secret,sizeof(secret));
|
||||||
sodium_memzero(seed,sizeof(seed));
|
sodium_memzero(seed,sizeof(seed));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif // PASSPHRASE
|
#endif // PASSPHRASE
|
||||||
|
|
|
@ -33,6 +33,7 @@ void *worker_fast(void *task)
|
||||||
sname = makesname();
|
sname = makesname();
|
||||||
|
|
||||||
initseed:
|
initseed:
|
||||||
|
|
||||||
#ifdef STATISTICS
|
#ifdef STATISTICS
|
||||||
++st->numrestart.v;
|
++st->numrestart.v;
|
||||||
#endif
|
#endif
|
||||||
|
@ -96,8 +97,11 @@ initseed:
|
||||||
|
|
||||||
end:
|
end:
|
||||||
free(sname);
|
free(sname);
|
||||||
|
|
||||||
POSTFILTER
|
POSTFILTER
|
||||||
|
|
||||||
sodium_memzero(secret,sizeof(secret));
|
sodium_memzero(secret,sizeof(secret));
|
||||||
sodium_memzero(seed,sizeof(seed));
|
sodium_memzero(seed,sizeof(seed));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ void *worker_fast_pass(void *task)
|
||||||
sname = makesname();
|
sname = makesname();
|
||||||
|
|
||||||
initseed:
|
initseed:
|
||||||
|
|
||||||
#ifdef STATISTICS
|
#ifdef STATISTICS
|
||||||
++st->numrestart.v;
|
++st->numrestart.v;
|
||||||
#endif
|
#endif
|
||||||
|
@ -104,9 +105,12 @@ initseed:
|
||||||
|
|
||||||
end:
|
end:
|
||||||
free(sname);
|
free(sname);
|
||||||
|
|
||||||
POSTFILTER
|
POSTFILTER
|
||||||
|
|
||||||
sodium_memzero(secret,sizeof(secret));
|
sodium_memzero(secret,sizeof(secret));
|
||||||
sodium_memzero(seed,sizeof(seed));
|
sodium_memzero(seed,sizeof(seed));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif // PASSPHRASE
|
#endif // PASSPHRASE
|
||||||
|
|
|
@ -33,6 +33,7 @@ void *worker_slow(void *task)
|
||||||
initseed:
|
initseed:
|
||||||
randombytes(seed,sizeof(seed));
|
randombytes(seed,sizeof(seed));
|
||||||
ed25519_seckey_expand(sk,seed);
|
ed25519_seckey_expand(sk,seed);
|
||||||
|
|
||||||
#ifdef STATISTICS
|
#ifdef STATISTICS
|
||||||
++st->numrestart.v;
|
++st->numrestart.v;
|
||||||
#endif
|
#endif
|
||||||
|
@ -83,8 +84,11 @@ next:
|
||||||
|
|
||||||
end:
|
end:
|
||||||
free(sname);
|
free(sname);
|
||||||
|
|
||||||
POSTFILTER
|
POSTFILTER
|
||||||
|
|
||||||
sodium_memzero(secret,sizeof(secret));
|
sodium_memzero(secret,sizeof(secret));
|
||||||
sodium_memzero(seed,sizeof(seed));
|
sodium_memzero(seed,sizeof(seed));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue