From e12a3eb7c974c623ebfaf0e2b0c0a9c93d2c1e74 Mon Sep 17 00:00:00 2001 From: cathugger Date: Tue, 2 Nov 2021 17:07:30 +0000 Subject: [PATCH] apparently this check was always wrong lmao --- worker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker.c b/worker.c index 818413c..7f8cb03 100644 --- a/worker.c +++ b/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_scalarmult_base(&point,&secret[SKPREFIX_SIZE]); ge_p3_tobytes(testpk,&point); - if (!memcmp(testpk,pubonion,PUBLIC_LEN)) + if (memcmp(testpk,&pubonion[PKPREFIX_SIZE],PUBLIC_LEN) != 0) abort(); #endif