//! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
//! SPDX-License-Identifier: GPL-3.0-or-later
-import { FieldElement, fe, fe_mul, fe_sq, fe_sq_n } from './fe'
+import { FieldElement, fe, fe_0, fe_mul, fe_sq, fe_sq_n } from './fe'
const a = fe()
const b = fe()
const c = fe()
const t = fe()
+function clear (): void {
+ fe_0(a)
+ fe_0(b)
+ fe_0(c)
+ fe_0(t)
+}
+
/**
* Holds z¹¹ in `t` for final multiplication step of inversion.
*/
fe_pow22501(out, z)
fe_sq_n(out, out, 5)
fe_mul(out, t, out)
+ clear()
}
/**
fe_pow22501(t, z)
fe_sq_n(t, t, 2)
fe_mul(z, t, z)
+ clear()
}