[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/ -> KoblitzPrime.php (summary)

Generalized Koblitz Curves over y^2 = x^3 + b. According to http://www.secg.org/SEC2-Ver-1.0.pdf Koblitz curves are over the GF(2**m) finite field. Both the $a$ and $b$ coefficients are either 0 or 1. However, SEC2 generalizes the definition to include curves over GF(P) "which possess an efficiently computable endomorphism".

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: 335 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

KoblitzPrime:: (6 methods):
  multiplyAddPoints()
  doublePointHelper()
  jacobianDoublePoint()
  jacobianDoublePointMixed()
  verifyPoint()
  extendedGCD()


Class: KoblitzPrime  - X-Ref

Curves over y^2 = x^3 + b

multiplyAddPoints(array $points, array $scalars)   X-Ref
Multiply and Add Points

Uses a efficiently computable endomorphism to achieve a slight speedup

Adapted from:
https://github.com/indutny/elliptic/blob/725bd91/lib/elliptic/curve/short.js#L219

return: int[]

doublePointHelper(array $p)   X-Ref
Returns the numerator and denominator of the slope

return: FiniteField[]

jacobianDoublePoint(array $p)   X-Ref
Doubles a jacobian coordinate on the curve

See http://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#doubling-dbl-2009-l

return: FiniteField[]

jacobianDoublePointMixed(array $p)   X-Ref
Doubles a "fresh" jacobian coordinate on the curve

See http://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#doubling-mdbl-2007-bl

return: FiniteField[]

verifyPoint(array $p)   X-Ref
Tests whether or not the x / y values satisfy the equation

return: boolean

extendedGCD(BigInteger $u, BigInteger $v)   X-Ref
Calculates the parameters needed from the Euclidean algorithm as discussed at
http://diamond.boisestate.edu/~liljanab/MATH308/GuideToECC.pdf#page=148

return: BigInteger[]
param: BigInteger $u
param: BigInteger $v