From d54b4f3baa69ef62ee1252156e9791375204228d Mon Sep 17 00:00:00 2001 From: Dusan Klinec Date: Sun, 19 Aug 2018 02:47:42 +0200 Subject: [PATCH] xmr: bp - memory cleaning --- src/apps/monero/xmr/bulletproof.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/apps/monero/xmr/bulletproof.py b/src/apps/monero/xmr/bulletproof.py index 800fcf184..7bfb06f50 100644 --- a/src/apps/monero/xmr/bulletproof.py +++ b/src/apps/monero/xmr/bulletproof.py @@ -669,6 +669,8 @@ def prove_s1(self, V, A, S, T1, T2, taux, mu, t, x_ip, y, hash_cache, l, r): # Originally: # ip2 = inner_product(self.v_sL, vector_add(hadamard(yN, aR_vpIz), vp2zsq)) hadamard(yN, aR_vpIz, tmp_vct) + self.gc(6) + vector_add(tmp_vct, vp2zsq, tmp_vct) ip2 = inner_product(self.v_sL, tmp_vct) @@ -1040,6 +1042,7 @@ def verify(self, proof): if i != BP_N - 1: sc_mul(yinvpow, yinvpow, yinv) sc_mul(ypow, ypow, y) + self.gc(62) del g_scalar del h_scalar