ParagonIE_Sodium_Core_Curve25519::fe_neg

Advertisement

Summery Summery

Get the negative values for each piece of the field element.

Syntax Syntax

ParagonIE_Sodium_Core_Curve25519::fe_neg( ParagonIE_Sodium_Core_Curve25519_Fe $f )

Description Description

h = -f

Parameters Parameters

$f

(Required)

Return Return

(ParagonIE_Sodium_Core_Curve25519_Fe)

Source Source

File: wp-includes/sodium_compat/src/Core/Curve25519.php

    public static function fe_neg(ParagonIE_Sodium_Core_Curve25519_Fe $f)
    {
        $h = new ParagonIE_Sodium_Core_Curve25519_Fe();
        for ($i = 0; $i < 10; ++$i) {
            $h[$i] = -$f[$i];
        }
        return $h;
    }

Advertisement

Advertisement

Leave a Reply