class Curve448 extends Montgomery (View source)

## Properties

 protected object[] \$doubles Doubles from  Base protected BigInteger \$order The Order from  Montgomery protected PrimeField \$factory Prime Field Integer factory from  Montgomery protected object \$a Cofficient for x from  Montgomery protected object \$a24 Constant used for point doubling from  Montgomery protected object \$zero The Number Zero from  Montgomery protected object \$one The Number One from  Montgomery protected object \$p Base Point from  Montgomery protected BigInteger \$modulo The modulo from  Montgomery

## Methods

object
randomInteger()

Returns a random integer

from  Base
object
convertInteger(BigInteger \$x)

Converts a BigInteger to a FiniteField integer

from  Base
int
getLengthInBytes()

Returns the length, in bytes, of the modulo

from  Base
int
getLength()

Returns the length, in bits, of the modulo

from  Base
array
multiplyPoint(array \$p, Integer \$d)

Multiply a point on the curve by a scalar

FiniteField
createRandomMultiplier()

Creates a random scalar multiplier

from  Base
setOrder(BigInteger \$order)

Sets the Order

from  Base
getOrder()

Returns the Order

from  Base
object
setReduction(callable \$func)

Use a custom defined modular reduction function

from  Base
object[]
convertToAffine(array \$p)

Returns the affine point

object[]
convertToInternal(array \$p)

Converts an affine point to an XZ coordinate

object[]
negatePoint(array \$p)

Negates a point

from  Base
int[]

from  Base
setModulo(BigInteger \$modulo)

Sets the modulo

setCoefficients(BigInteger \$a)

Set coefficients a

PrimeInteger[]
setBasePoint(BigInteger|PrimeInteger \$x, BigInteger|PrimeInteger \$y)

Set x and y coordinates for the base point

array
getBasePoint()

Retrieve the base point as an array

__construct()

No description

## Details

### in Base at line 63``` object randomInteger() ```

Returns a random integer

 object

### in Base at line 73``` object convertInteger(BigInteger \$x) ```

Converts a BigInteger to a FiniteField integer

#### Parameters

 BigInteger \$x

 object

### in Base at line 83``` int getLengthInBytes() ```

Returns the length, in bytes, of the modulo

 int

### in Base at line 93``` int getLength() ```

Returns the length, in bits, of the modulo

 int

### at line 58``` array multiplyPoint(array \$p, Integer \$d) ```

Multiply a point on the curve by a scalar

Modifies the scalar as described at https://tools.ietf.org/html/rfc7748#page-8

#### Parameters

 array \$p Integer \$d

 array

### in Base at line 130``` FiniteField createRandomMultiplier() ```

Creates a random scalar multiplier

#### Return Value

 FiniteField

### in Base at line 144``` setOrder(BigInteger \$order) ```

Sets the Order

#### Parameters

 BigInteger \$order

### in Base at line 154``` BigInteger getOrder() ```

Returns the Order

### in Base at line 164``` object setReduction(callable \$func) ```

Use a custom defined modular reduction function

#### Parameters

 callable \$func

 object

### in Montgomery at line 277``` object[] convertToAffine(array \$p) ```

Returns the affine point

#### Parameters

 array \$p

#### Return Value

 object[]

### in Montgomery at line 257``` object[] convertToInternal(array \$p) ```

Converts an affine point to an XZ coordinate

From https://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html

XZ coordinates represent x y as X Z satsfying the following equations:

x=X/Z

#### Parameters

 array \$p

#### Return Value

 object[]

### in Base at line 194``` object[] negatePoint(array \$p) ```

Negates a point

#### Parameters

 array \$p

#### Return Value

 object[]

### in Base at line 211``` int[] multiplyAddPoints(array \$points, array \$scalars) ```

#### Parameters

 array \$points array \$scalars

 int[]

### in Montgomery at line 104``` setModulo(BigInteger \$modulo) ```

Sets the modulo

#### Parameters

 BigInteger \$modulo

### in Montgomery at line 115``` setCoefficients(BigInteger \$a) ```

Set coefficients a

#### Parameters

 BigInteger \$a

### in Montgomery at line 133``` PrimeInteger[] setBasePoint(BigInteger|PrimeInteger \$x, BigInteger|PrimeInteger \$y) ```

Set x and y coordinates for the base point

#### Parameters

 BigInteger|PrimeInteger \$x BigInteger|PrimeInteger \$y

#### Return Value

 PrimeInteger[]

### in Montgomery at line 155``` array getBasePoint() ```

Retrieve the base point as an array

 array