import Montgomery from '@arithmetic-operations-for/integers-modulo-n-big-endian/src/Montgomery.js'
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 |
|
|
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:
Name | Type | Attribute | Description |
aRmodN | * | ||
bRmodN | * |
Return:
* |
public mul(aRmodN: *, bRmodN: *): * source
Params:
Name | Type | Attribute | Description |
aRmodN | * | ||
bRmodN | * |
Return:
* |
public pow(aRmodN: *, b: *, nonneg: boolean): * source
Params:
Name | Type | Attribute | Description |
aRmodN | * | ||
b | * | ||
nonneg | boolean |
|
Return:
* |
public sub(aRmodN: *, bRmodN: *): * source
Params:
Name | Type | Attribute | Description |
aRmodN | * | ||
bRmodN | * |
Return:
* |
Private Methods
private _powb(aRmodN: *, xbits: *, nonneg: *): * source
Params:
Name | Type | Attribute | Description |
aRmodN | * | ||
xbits | * | ||
nonneg | * |
Return:
* |