rename storageproofs to por (#74)

This commit is contained in:
Dmitriy Ryajov 2022-04-05 14:44:53 -06:00 committed by GitHub
parent 49c41e27b7
commit 22c6705312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@
## This file may not be copied, modified, or distributed except according to ## This file may not be copied, modified, or distributed except according to
## those terms. ## those terms.
import bls import por
import benchmark import benchmark
import strutils import strutils
@ -16,22 +16,22 @@ const querylen = 22
proc testbls() : bool = proc testbls() : bool =
benchmark "Key generation": benchmark "Key generation":
let (spk, ssk) = bls.keygen() let (spk, ssk) = por.keygen()
benchmark "Auth generation (s=" & $sectorsperblock & ")": benchmark "Auth generation (s=" & $sectorsperblock & ")":
let (tau, authenticators) = bls.setup(ssk, sectorsperblock, "example.txt") let (tau, authenticators) = por.setup(ssk, sectorsperblock, "example.txt")
#echo "Auth: ", authenticators #echo "Auth: ", authenticators
benchmark "Generating challenge (q=" & $querylen & ")": benchmark "Generating challenge (q=" & $querylen & ")":
let q = bls.generateQuery(tau, spk, querylen) let q = por.generateQuery(tau, spk, querylen)
#echo "Generated!" #, " q:", q #echo "Generated!" #, " q:", q
benchmark "Issuing proof": benchmark "Issuing proof":
let (mu, sigma) = bls.generateProof(q, authenticators, spk, sectorsperblock, "example.txt") let (mu, sigma) = por.generateProof(q, authenticators, spk, sectorsperblock, "example.txt")
#echo "Issued!" #, " mu:", mu, " sigma:", sigma #echo "Issued!" #, " mu:", mu, " sigma:", sigma
benchmark "Verifying proof": benchmark "Verifying proof":
result = bls.verifyProof(tau, q, mu, sigma, spk) result = por.verifyProof(tau, q, mu, sigma, spk)
echo "Result: ", result echo "Result: ", result
let r = testbls() let r = testbls()