Home Manual Reference Source
public class | source

Montgomery

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

M: *

public

N: *

public

R: *

public

R2: *

public

R3: *

public

b: *

public

k: *

Method Summary

Public Methods
public

add(aRmodN: *, bRmodN: *): *

public

from(x: *): *

public

inv(aRmodN: *): *

public

mul(aRmodN: *, bRmodN: *): *

public

one(): *

public

out(aRmodN: *): *

public

pow(aRmodN: *, b: *, nonneg: boolean): *

public

pown(aRmodN: *, x: *): *

public

sub(aRmodN: *, bRmodN: *): *

public

zero(): *

Private Methods
private

_powb(aRmodN: *, xbits: *, nonneg: *): *

Public Constructors

public constructor() source

Public Members

public M: * source

public N: * source

public R: * source

public R2: * source

public R3: * source

public b: * source

public k: * source

Public Methods

public add(aRmodN: *, bRmodN: *): * source

Params:

NameTypeAttributeDescription
aRmodN *
bRmodN *

Return:

*

public from(x: *): * source

Params:

NameTypeAttributeDescription
x *

Return:

*

public inv(aRmodN: *): * source

Params:

NameTypeAttributeDescription
aRmodN *

Return:

*

public mul(aRmodN: *, bRmodN: *): * source

Params:

NameTypeAttributeDescription
aRmodN *
bRmodN *

Return:

*

public one(): * source

Return:

*

public out(aRmodN: *): * source

Params:

NameTypeAttributeDescription
aRmodN *

Return:

*

public pow(aRmodN: *, b: *, nonneg: boolean): * source

Params:

NameTypeAttributeDescription
aRmodN *
b *
nonneg boolean
  • optional
  • default: true

Return:

*

public pown(aRmodN: *, x: *): * source

Params:

NameTypeAttributeDescription
aRmodN *
x *

Return:

*

public sub(aRmodN: *, bRmodN: *): * source

Params:

NameTypeAttributeDescription
aRmodN *
bRmodN *

Return:

*

public zero(): * source

Return:

*

Private Methods

private _powb(aRmodN: *, xbits: *, nonneg: *): * source

Params:

NameTypeAttributeDescription
aRmodN *
xbits *
nonneg *

Return:

*