ParagonIE_Sodium_Core32_Curve25519::fe_neg

Advertisement

Summery Summery

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

Syntax Syntax

ParagonIE_Sodium_Core32_Curve25519::fe_neg( ParagonIE_Sodium_Core32_Curve25519_Fe $f )

Description Description

h = -f

Parameters Parameters

$f

(ParagonIE_Sodium_Core32_Curve25519_Fe) (Required)

Return Return

(ParagonIE_Sodium_Core32_Curve25519_Fe)

Source Source

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

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

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.