From 19fa3be65e4a9509497c932f5974c86a2af14019 Mon Sep 17 00:00:00 2001 From: JohnDonavon Date: Thu, 24 Aug 2023 14:18:24 -0700 Subject: [PATCH] fix imports --- src/algorithms/MontgomeryMultiplication.test.ts | 10 +++++----- src/algorithms/MontgomeryMultiplication.ts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/algorithms/MontgomeryMultiplication.test.ts b/src/algorithms/MontgomeryMultiplication.test.ts index 1b5803f..71052da 100644 --- a/src/algorithms/MontgomeryMultiplication.test.ts +++ b/src/algorithms/MontgomeryMultiplication.test.ts @@ -1,13 +1,13 @@ -import { ALEO_FIELD_MODULUS } from "../params/AleoConstants"; +import { FIELD_MODULUS } from "../params/BLS12_377Constants"; import { Montgomery } from "./MontgomeryMultiplication"; describe('Montgomery', () => { it.each([ [BigInt(8), BigInt(7), BigInt(56)], - [ALEO_FIELD_MODULUS, BigInt(0), BigInt(0)], - [ALEO_FIELD_MODULUS, BigInt(2), BigInt(0)], - [ALEO_FIELD_MODULUS, ALEO_FIELD_MODULUS, BigInt(0)], - [ALEO_FIELD_MODULUS + BigInt(2), BigInt(2), BigInt(4)], + [FIELD_MODULUS, BigInt(0), BigInt(0)], + [FIELD_MODULUS, BigInt(2), BigInt(0)], + [FIELD_MODULUS, FIELD_MODULUS, BigInt(0)], + [FIELD_MODULUS + BigInt(2), BigInt(2), BigInt(4)], ])('properly does modulus multiplication', (a: bigint, b: bigint, expected: bigint) => { const result = Montgomery(a, b); expect(result).toEqual(expected); diff --git a/src/algorithms/MontgomeryMultiplication.ts b/src/algorithms/MontgomeryMultiplication.ts index 945b29e..99341b8 100644 --- a/src/algorithms/MontgomeryMultiplication.ts +++ b/src/algorithms/MontgomeryMultiplication.ts @@ -1,9 +1,9 @@ import { - ALEO_FIELD_MODULUS as N, - ALEO_MONTGOMERY_RADIX as R, - ALEO_MONTGOMERY_RINVERSE as R_PRIME, - ALEO_FIELD_MODULUS_NPRIME as N_PRIME -} from "../params/AleoConstants"; + FIELD_MODULUS as N, + MONTGOMERY_RADIX as R, + MONTGOMERY_RINVERSE as R_PRIME, + FIELD_MODULUS_NPRIME as N_PRIME +} from "../params/BLS12_377Constants"; /** * Computes a x b mod AleoFieldModulus using Montgomery multiplication.