Fix Scalar typecasting

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
therealyingtong 2021-05-09 13:39:27 +08:00
parent d5a8927316
commit 04587ac9ba
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ def prf_nf_orchard(nk, rho):
def derive_nullifier(nk, rho: Fp, psi: Fp, cm):
scalar = prf_nf_orchard(nk, rho) + psi # addition mod p
point = NULLIFIER_K_BASE * to_scalar(scalar) + cm
point = NULLIFIER_K_BASE * Scalar(scalar.s) + cm
return point.extract()
#