From de42d70f7c520f1d1c3f8e5b22b7612a2ab3d8ac Mon Sep 17 00:00:00 2001 From: Laurent Girod Date: Tue, 7 Apr 2020 15:16:05 +0200 Subject: [PATCH] Correct bug in `bn` submodule. --- petrelic/bn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/petrelic/bn.py b/petrelic/bn.py index 339c1f8..97a1f48 100644 --- a/petrelic/bn.py +++ b/petrelic/bn.py @@ -610,7 +610,7 @@ def __pow__(self, n, modulo=None): if _C.bn_sign(n.bn) == _C.CONST_RLC_NEG: base = base.mod_inverse(modulo) - _C.bn_neg(n.bn) + _C.bn_neg(n.bn, n.bn) if _C.bn_is_zero(n.bn) == 1: return Bn(1)