/**
* @internal You should not use this directly from another application
*
* @param ParagonIE_Sodium_Core32_Curve25519_Fe $Z
* @return ParagonIE_Sodium_Core32_Curve25519_Fe
* @throws SodiumException
* @throws TypeError
*/
public static function fe_invert(ParagonIE_Sodium_Core32_Curve25519_Fe
$Z) { $z =
clone $Z;
$t0 = self::
fe_sq($z);
$t1 = self::
fe_sq($t0);
$t1 = self::
fe_sq($t1);
$t1 = self::
fe_mul($z,
$t1);
$t0 = self::
fe_mul($t0,
$t1);
$t2 = self::
fe_sq($t0);
$t1 = self::
fe_mul($t1,
$t2);
$t2 = self::
fe_sq($t1);
for ($i = 1;
$i < 5; ++
$i) { $t2 = self::
fe_sq($t2);
} $t1 = self::
fe_mul($t2,
$t1);