This commit is contained in:
cathugger
2021-11-02 17:32:10 +02:00
parent 7dea621e41
commit f1c56e7480
6 changed files with 23 additions and 3 deletions

View File

@@ -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