From 31c9ca2d2aea2afef3f84e80913e850102aa194d Mon Sep 17 00:00:00 2001 From: Dusan Klinec Date: Fri, 24 Aug 2018 20:58:06 +0200 Subject: [PATCH] xmr: bp - mem clean --- src/apps/monero/xmr/bulletproof.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/apps/monero/xmr/bulletproof.py b/src/apps/monero/xmr/bulletproof.py index f810c0ecb..7668242d5 100644 --- a/src/apps/monero/xmr/bulletproof.py +++ b/src/apps/monero/xmr/bulletproof.py @@ -1226,6 +1226,8 @@ def _prove_batch_main(self, V, gamma, aL, aR, hash_cache, logM, logN, M, N): hadamard(r0, yMN, dst=r0) vector_add(r0, zero_twos, dst=r0) del (zero_twos) + self.gc(16) + r1 = hadamard(yMN, sR) del (yMN, sR) self.gc(16) @@ -1273,9 +1275,12 @@ def _prove_batch_main(self, V, gamma, aL, aR, hash_cache, logM, logN, M, N): # PAPER LINES 54-57 l = vector_add(l0, vector_scalar(l1, x), l0) + del (l1, sL) + self.gc(19) + r = vector_add(r0, vector_scalar(r1, x), r0) t = inner_product(l, r) - del (l1, r1, sL) + del (r1) self.gc(19) # PAPER LINES 32-33