From d5a89273167e36177b65c2983a1539b3655cc60a Mon Sep 17 00:00:00 2001 From: therealyingtong Date: Sun, 9 May 2021 13:36:20 +0800 Subject: [PATCH] Remove unnecessary to_base() 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 65e2650..9ce6ba0 100644 --- a/orchard_key_components.py +++ b/orchard_key_components.py @@ -42,7 +42,7 @@ def prf_nf_orchard(nk, rho): return poseidon_hash(nk, rho) def derive_nullifier(nk, rho: Fp, psi: Fp, cm): - scalar = to_base(prf_nf_orchard(nk, rho)) + psi # addition mod p + scalar = prf_nf_orchard(nk, rho) + psi # addition mod p point = NULLIFIER_K_BASE * to_scalar(scalar) + cm return point.extract()