Update documentation

This commit is contained in:
Daniel Huigens
2021-02-27 00:26:34 +01:00
parent 7f37a8aaca
commit 636c7cf529
79 changed files with 322 additions and 729 deletions

View File

@@ -1,8 +1,15 @@
import BN from 'bn.js';
/**
* @fileoverview
* BigInteger implementation of basic operations
* Wrapper of bn.js library (wwww.github.com/indutny/bn.js)
* @module biginteger/bn
* @private
*/
/**
* @private
*/
export default class BigInteger {
/**

View File

@@ -1,10 +1,17 @@
/* eslint-disable new-cap */
/**
* @fileoverview
* BigInteger implementation of basic operations
* that wraps the native BigInt library.
* Operations are not constant time,
* but we try and limit timing leakage where we can
* @module biginteger/native
* @private
*/
/**
* @private
*/
export default class BigInteger {
/**
@@ -189,7 +196,7 @@ export default class BigInteger {
* Extended Eucleadian algorithm (http://anh.cs.luc.edu/331/notes/xgcd.pdf)
* Given a = this and b, compute (x, y) such that ax + by = gdc(a, b)
* @param {BigInteger} b second operand
* @returns { gcd, x, y: BigInteger }
* @returns {{ gcd, x, y: BigInteger }}
*/
_egcd(b) {
let x = BigInt(0);