renaming pos.nim to rsa.nim

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2021-10-22 17:26:53 +02:00 committed by Dmitriy Ryajov
parent 680c0a54b6
commit 36a4fbdbe5
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
2 changed files with 6 additions and 6 deletions

View File

@ -7,27 +7,27 @@
## This file may not be copied, modified, or distributed except according to
## those terms.
import pos
import rsa
import random
proc testrsa() : bool =
let (spk, ssk) = pos.rsaKeygen()
let (spk, ssk) = rsa.rsaKeygen()
echo "Key generated!"
let (tau, authenticators) = pos.st(ssk, "example.txt")
let (tau, authenticators) = rsa.st(ssk, "example.txt")
echo "Signed!"
echo "Auth: ", authenticators
echo "Generating challenge..."
let q = pos.generateQuery(tau, spk)
let q = rsa.generateQuery(tau, spk)
echo "Generated!", " q:", q
echo "Issuing proof..."
let (mu, sigma) = pos.generateProof(q, authenticators, spk, "example.txt")
let (mu, sigma) = rsa.generateProof(q, authenticators, spk, "example.txt")
echo "Issued!", " mu:", mu, " sigma:", sigma
echo "Verifying proof..."
result = pos.verifyProof(tau, q, mu, sigma, spk)
result = rsa.verifyProof(tau, q, mu, sigma, spk)
echo "Result: ", result
randomize()