From 04587ac9baab907c77ae1829f37be22cc683884c Mon Sep 17 00:00:00 2001 From: therealyingtong Date: Sun, 9 May 2021 13:39:27 +0800 Subject: [PATCH] Fix Scalar typecasting Co-authored-by: Daira Hopwood --- orchard_key_components.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchard_key_components.py b/orchard_key_components.py index 9ce6ba0..1952f24 100644 --- a/orchard_key_components.py +++ b/orchard_key_components.py @@ -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() #