Summery Summery
Subtract two field elements.
Syntax Syntax
Description Description
h = f – g
Preconditions: |f| bounded by 1.1_2^25,1.1_2^24,1.1_2^25,1.1_2^24,etc. |g| bounded by 1.1_2^25,1.1_2^24,1.1_2^25,1.1_2^24,etc.
Postconditions: |h| bounded by 1.1_2^26,1.1_2^25,1.1_2^26,1.1_2^25,etc.
Parameters Parameters
- $f
-
(Required)
- $g
-
(Required)
Return Return
Source Source
File: wp-includes/sodium_compat/src/Core/Curve25519.php
public static function fe_sub(ParagonIE_Sodium_Core_Curve25519_Fe $f, ParagonIE_Sodium_Core_Curve25519_Fe $g) { return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( array( (int) ($f[0] - $g[0]), (int) ($f[1] - $g[1]), (int) ($f[2] - $g[2]), (int) ($f[3] - $g[3]), (int) ($f[4] - $g[4]), (int) ($f[5] - $g[5]), (int) ($f[6] - $g[6]), (int) ($f[7] - $g[7]), (int) ($f[8] - $g[8]), (int) ($f[9] - $g[9]) ) ); }