[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
Curve methods common to all curves PHP version 5 and 7
Author: | Jim Wigginton |
Copyright: | 2017 Jim Wigginton |
License: | http://www.opensource.org/licenses/mit-license.html MIT License |
Link: | http://pear.php.net/package/Math_BigInteger |
File Size: | 218 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
randomInteger() X-Ref |
Returns a random integer return: object |
convertInteger(BigInteger $x) X-Ref |
Converts a BigInteger to a \phpseclib3\Math\FiniteField\Integer integer return: object |
getLengthInBytes() X-Ref |
Returns the length, in bytes, of the modulo return: integer |
getLength() X-Ref |
Returns the length, in bits, of the modulo return: integer |
multiplyPoint(array $p, BigInteger $d) X-Ref |
Multiply a point on the curve by a scalar Uses the montgomery ladder technique as described here: https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Montgomery_ladder https://github.com/phpecc/phpecc/issues/16#issuecomment-59176772 return: array |
createRandomMultiplier() X-Ref |
Creates a random scalar multiplier return: BigInteger |
rangeCheck(BigInteger $x) X-Ref |
Performs range check |
setOrder(BigInteger $order) X-Ref |
Sets the Order |
getOrder() X-Ref |
Returns the Order return: \phpseclib3\Math\BigInteger |
setReduction(callable $func) X-Ref |
Use a custom defined modular reduction function return: object |
convertToAffine(array $p) X-Ref |
Returns the affine point return: object[] |
convertToInternal(array $p) X-Ref |
Converts an affine point to a jacobian coordinate return: object[] |
negatePoint(array $p) X-Ref |
Negates a point return: object[] |
multiplyAddPoints(array $points, array $scalars) X-Ref |
Multiply and Add Points return: int[] |