From 8158ecf89299f76b92e11d30307ef13f845263c3 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Fri, 22 Oct 2021 15:47:41 +0200 Subject: [PATCH] generateAuthenticator: remove unused ubase parameter from naive impl No need to have the same interface on the two implementations, so we can remove this parameter. Signed-off-by: Csaba Kiraly --- dagger/storageproofs/bls.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dagger/storageproofs/bls.nim b/dagger/storageproofs/bls.nim index cbbb4806..be32ce32 100644 --- a/dagger/storageproofs/bls.nim +++ b/dagger/storageproofs/bls.nim @@ -177,7 +177,7 @@ proc hashToG1(msg: string): blst_p1 = proc hashNameI(name: openArray[byte], i: int64): blst_p1 = return hashToG1($name & $i) -proc generateAuthenticatorNaive(i: int64, s: int64, t: TauZero, ubase: openArray[blst_scalar], f: File, ssk: SecretKey): blst_p1 = +proc generateAuthenticatorNaive(i: int64, s: int64, t: TauZero, f: File, ssk: SecretKey): blst_p1 = var sum: blst_p1 for j in 0 ..< s: @@ -207,7 +207,7 @@ proc generateAuthenticatorOpt(i: int64, s: int64, t: TauZero, ubase: openArray[b result.blst_p1_mult(result, ssk.key, 255) proc generateAuthenticator(i: int64, s: int64, t: TauZero, ubase: openArray[blst_scalar], f: File, ssk: SecretKey): blst_p1 = - # let a = generateAuthenticatorNaive(i, s, t, ubase, f, ssk) + # let a = generateAuthenticatorNaive(i, s, t, f, ssk) let b = generateAuthenticatorOpt(i, s, t, ubase, f, ssk) # doAssert(a.blst_p1_is_equal(b).bool) return b