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 <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2021-10-22 15:47:41 +02:00 committed by Dmitriy Ryajov
parent 9265c594c1
commit 8158ecf892
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4

View File

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