You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by km...@apache.org on 2019/06/18 10:23:14 UTC
[incubator-milagro-crypto-js] branch update-code updated: added
module export
This is an automated email from the ASF dual-hosted git repository.
kmccusker pushed a commit to branch update-code
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-crypto-js.git
The following commit(s) were added to refs/heads/update-code by this push:
new c3d5e0c added module export
c3d5e0c is described below
commit c3d5e0c2049a2300a426cffe574fdaac1df54b64
Author: Kealan McCusker <ke...@gmail.com>
AuthorDate: Tue Jun 18 11:22:54 2019 +0100
added module export
---
README.md | 20 ++++----
package.json | 11 ++---
src/ctx.js | 52 ++++++++++-----------
src/ecp2.js | 6 +++
src/ecp4.js | 6 +++
src/ecp8.js | 6 +++
src/ff.js | 7 +++
src/fp.js | 6 +++
src/fp12.js | 7 +++
src/fp16.js | 6 +++
src/fp2.js | 6 +++
src/fp24.js | 6 +++
src/fp4.js | 6 +++
src/fp48.js | 6 +++
src/fp8.js | 6 +++
src/gcm.js | 6 +++
src/mpin256.js | 6 +++
src/rom_curve.js | 31 +++++++++++++
src/rom_field.js | 27 +++++++++++
test/test_BIG.js | 4 +-
test/test_DVS.js | 3 +-
test/{test_FP12.js => test_FP12_js} | 0
test/{test_FP16.js => test_FP16_js} | 0
test/{test_FP24.js => test_FP24_js} | 0
test/{test_FP2.js => test_FP2_js} | 0
test/{test_FP48.js => test_FP48_js} | 0
test/{test_FP4.js => test_FP4_js} | 0
test/{test_FP8.js => test_FP8_js} | 0
test/{test_FP.js => test_FP_js} | 0
test/test_MPIN.js | 2 +-
test/test_NEWHOPE.js | 92 -------------------------------------
test/test_RSA2048.js | 4 +-
test/test_RSA3072.js | 4 +-
test/test_RSA4096.js | 4 +-
34 files changed, 196 insertions(+), 144 deletions(-)
diff --git a/README.md b/README.md
index 8889d8e..2f9d191 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,18 @@
# MCJS - *Milagro Crypto JavaScript*
-[![Master Branch](https://img.shields.io/badge/-master:-gray.svg)](https://github.com/apache/incubator-milagro-javascript/tree/master)
-[![Master Build Status](https://secure.travis-ci.org/apache/incubator-milagro-javascript.png?branch=master)](https://travis-ci.org/apache/incubator-milagro-javascript?branch=master)
-[![Master Coverage Status](https://coveralls.io/repos/github/apache/incubator-milagro-javascript/badge.svg?branch=master)](https://coveralls.io/github/apache/incubator-milagro-javascript?branch=master)
+[![Master Branch](https://img.shields.io/badge/-master:-gray.svg)](https://github.com/apache/incubator-milagro-crypto-js/tree/master)
+[![Master Build Status](https://secure.travis-ci.org/apache/incubator-milagro-crypto-js.png?branch=master)](https://travis-ci.org/apache/incubator-milagro-crypto-js?branch=master)
+[![Master Coverage Status](https://coveralls.io/repos/github/apache/incubator-milagro-crypto-js/badge.svg?branch=master)](https://coveralls.io/github/apache/incubator-milagro-crypto-js?branch=master)
-[![Develop Branch](https://img.shields.io/badge/-develop:-gray.svg)](https://github.com/apache/incubator-milagro-javascript/tree/develop)
-[![Develop Build Status](https://secure.travis-ci.org/apache/incubator-milagro-javascript.png?branch=develop)](https://travis-ci.org/apache/incubator-milagro-javascript?branch=develop)
-[![Develop Coverage Status](https://coveralls.io/repos/github/apache/incubator-milagro-javascript/badge.svg?branch=develop)](https://coveralls.io/github/apache/incubator-milagro-javascript?branch=develop)
+[![Develop Branch](https://img.shields.io/badge/-develop:-gray.svg)](https://github.com/apache/incubator-milagro-crypto-js/tree/develop)
+[![Develop Build Status](https://secure.travis-ci.org/apache/incubator-milagro-crypto-js.png?branch=develop)](https://travis-ci.org/apache/incubator-milagro-crypto-js?branch=develop)
+[![Develop Coverage Status](https://coveralls.io/repos/github/apache/incubator-milagro-crypto-js/badge.svg?branch=develop)](https://coveralls.io/github/apache/incubator-milagro-crypto-js?branch=develop)
* **category**: Library
* **copyright**: 2019 The Apache Software Foundation
* **license**: ASL 2.0 - http://www.apache.org/licenses/LICENSE-2.0
-* **link**: https://github.com/apache/incubator-milagro-javascript
+* **link**: https://github.com/apache/incubator-milagro-crypto-js
## Description
@@ -110,7 +110,7 @@ in `./examples/browser`.
## Contributors
-The following people have contributed to milagro-javascript
+The following people have contributed to milagro-crypto-js
- Mike Scott
- Kealan McCusker
@@ -121,11 +121,11 @@ Please add yourself here if you make or have made a contribution.
## Making a Contribution
-1. [Check for open issues](https://github.com/apache/incubator-milagro-javascript/issues) or start a discussion around a feature idea or a bug by sending a
+1. [Check for open issues](https://github.com/apache/incubator-milagro-crypto-js/issues) or start a discussion around a feature idea or a bug by sending a
mail to dev@milagro.incubator.apache.org
2. Fork the repository to start making your changes. Please use the
"development" branch as a basis.
3. Write a test which shows that the bug was fixed or that the feature works
as expected.
-4. Send a pull request with a reference to the issue
+4. Make a pull request with a reference to the issue
diff --git a/package.json b/package.json
index cc80f77..1894815 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,9 @@
{
"name": "milagro-crypto-js",
- "version": "3.6.0",
- "description": "Crypto Library in Javascript - Refact of Apache Milagro Crypto Library",
+ "version": "0.1.0",
+ "description": "Apache Milagro Crypto Javascript Library",
"main": "index.js",
"directories": {
- "doc": "doc",
"example": "examples",
"test": "test"
},
@@ -16,7 +15,7 @@
},
"repository": {
"type": "git",
- "url": "git+https://github.com/miracl/milagro-crypto-js.git"
+ "url": "git+https://github.com/apache/incubator-milagro-crypto-js.git"
},
"keywords": [
"pairing",
@@ -27,9 +26,9 @@
"author": "Michael Scott, Alessandro Budroni, Kealan McCusker",
"license": "Apache-2.0",
"bugs": {
- "url": "https://github.com/miracl/milagro-crypto-js/issues"
+ "url": "https://github.com/apache/incubator-milagro-crypto-js/issues"
},
- "homepage": "https://github.com/miracl/milagro-crypto-js#readme",
+ "homepage": "https://github.com/apache/incubator-milagro-crypto-js#readme",
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^3.0.2",
diff --git a/src/ctx.js b/src/ctx.js
index e5d72f4..3af2784 100644
--- a/src/ctx.js
+++ b/src/ctx.js
@@ -40,7 +40,7 @@ var CTX = function(input_parameter) {
"@SX": 0, /* Sign of x parameter */
"@AB": 0, /* ATE parameter size */
"@HT": 32, /* Hash output size */
- "@SH": 9, /* Maximum field excess */
+ "@SH": 9, /* Maximum field excess */
"@AK": 16 /* AES key size */
},
@@ -59,7 +59,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 32,
- "@SH": 9,
+ "@SH": 9,
"@AK": 16
},
@@ -79,7 +79,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 32,
- "@SH": 8,
+ "@SH": 8,
"@AK": 16
},
@@ -98,7 +98,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 32,
- "@SH": 8,
+ "@SH": 8,
"@AK": 16
},
@@ -117,7 +117,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 48,
- "@SH": 7,
+ "@SH": 7,
"@AK": 24
},
@@ -136,7 +136,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 32,
- "@SH": 8,
+ "@SH": 8,
"@AK": 16
},
@@ -155,7 +155,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 32,
- "@SH": 8,
+ "@SH": 8,
"@AK": 16
},
@@ -174,7 +174,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 48,
- "@SH": 9,
+ "@SH": 9,
"@AK": 24
},
@@ -193,7 +193,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 64,
- "@SH": 11,
+ "@SH": 11,
"@AK": 32
},
@@ -212,7 +212,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 64,
- "@SH": 4,
+ "@SH": 4,
"@AK": 32
},
@@ -231,7 +231,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 64,
- "@SH": 8,
+ "@SH": 8,
"@AK": 32
},
@@ -250,7 +250,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 32,
- "@SH": 8,
+ "@SH": 8,
"@AK": 16
},
@@ -269,7 +269,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 32,
- "@SH": 8,
+ "@SH": 8,
"@AK": 16
},
@@ -288,7 +288,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 48,
- "@SH": 7,
+ "@SH": 7,
"@AK": 24
},
@@ -307,7 +307,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 48,
- "@SH": 7,
+ "@SH": 7,
"@AK": 24
},
@@ -326,7 +326,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 64,
- "@SH": 11,
+ "@SH": 11,
"@AK": 32
},
@@ -345,7 +345,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 0,
"@HT": 64,
- "@SH": 11,
+ "@SH": 11,
"@AK": 32
},
@@ -364,7 +364,7 @@ var CTX = function(input_parameter) {
"@SX": 1,
"@AB": 66,
"@HT": 32,
- "@SH": 8,
+ "@SH": 8,
"@AK": 16
},
@@ -383,7 +383,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 130,
"@HT": 32,
- "@SH": 11,
+ "@SH": 11,
"@AK": 16
},
@@ -402,7 +402,7 @@ var CTX = function(input_parameter) {
"@SX": 1,
"@AB": 66,
"@HT": 32,
- "@SH": 10,
+ "@SH": 10,
"@AK": 16
},
@@ -421,7 +421,7 @@ var CTX = function(input_parameter) {
"@SX": 1,
"@AB": 66,
"@HT": 32,
- "@SH": 10,
+ "@SH": 10,
"@AK": 16
},
@@ -440,7 +440,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 65,
"@HT": 32,
- "@SH": 8,
+ "@SH": 8,
"@AK": 16
},
@@ -459,7 +459,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 49,
"@HT": 48,
- "@SH": 4,
+ "@SH": 4,
"@AK": 24
},
@@ -478,7 +478,7 @@ var CTX = function(input_parameter) {
"@SX": 0,
"@AB": 32,
"@HT": 64,
- "@SH": 11,
+ "@SH": 11,
"@AK": 32
},
@@ -497,7 +497,7 @@ var CTX = function(input_parameter) {
"@SX": 1,
"@AB": 65,
"@HT": 32,
- "@SH": 10,
+ "@SH": 10,
"@AK": 16
},
@@ -516,7 +516,7 @@ var CTX = function(input_parameter) {
"@SX": 1,
"@AB": 78,
"@HT": 32,
- "@SH": 11,
+ "@SH": 11,
"@AK": 16
},
diff --git a/src/ecp2.js b/src/ecp2.js
index 523a95a..b8ce9af 100644
--- a/src/ecp2.js
+++ b/src/ecp2.js
@@ -778,3 +778,9 @@ var ECP2 = function(ctx) {
return ECP2;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ ECP2: ECP2
+ };
+}
diff --git a/src/ecp4.js b/src/ecp4.js
index 3c49731..82fbce3 100644
--- a/src/ecp4.js
+++ b/src/ecp4.js
@@ -837,3 +837,9 @@ var ECP4 = function(ctx) {
return ECP4;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ ECP4: ECP4
+ };
+}
diff --git a/src/ecp8.js b/src/ecp8.js
index aebe3c4..593f739 100644
--- a/src/ecp8.js
+++ b/src/ecp8.js
@@ -1043,3 +1043,9 @@ var ECP8 = function(ctx) {
return ECP8;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ ECP8: ECP8
+ };
+}
diff --git a/src/ff.js b/src/ff.js
index 16c99a2..8bcd3c4 100644
--- a/src/ff.js
+++ b/src/ff.js
@@ -999,3 +999,10 @@ var FF = function(ctx) {
return FF;
};
+
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ FF: FF
+ };
+}
diff --git a/src/fp.js b/src/fp.js
index 8b96743..ebb0d74 100644
--- a/src/fp.js
+++ b/src/fp.js
@@ -667,3 +667,9 @@ var FP = function(ctx) {
return FP;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ FP: FP
+ };
+}
diff --git a/src/fp12.js b/src/fp12.js
index 45f2595..aa29a39 100644
--- a/src/fp12.js
+++ b/src/fp12.js
@@ -1046,3 +1046,10 @@ var FP12 = function(ctx) {
return FP12;
};
+
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ FP12: FP12
+ };
+}
diff --git a/src/fp16.js b/src/fp16.js
index f01fd79..14d10e8 100644
--- a/src/fp16.js
+++ b/src/fp16.js
@@ -566,3 +566,9 @@ var FP16 = function(ctx) {
return FP16;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ FP16: FP16
+ };
+}
diff --git a/src/fp2.js b/src/fp2.js
index 043320b..d2d1a50 100644
--- a/src/fp2.js
+++ b/src/fp2.js
@@ -391,3 +391,9 @@ var FP2 = function(ctx) {
return FP2;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ FP2: FP2
+ };
+}
diff --git a/src/fp24.js b/src/fp24.js
index c235d8f..50cd3d2 100644
--- a/src/fp24.js
+++ b/src/fp24.js
@@ -1209,3 +1209,9 @@ var FP24 = function(ctx) {
return FP24;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ FP24: FP24
+ };
+}
diff --git a/src/fp4.js b/src/fp4.js
index 63719c5..12c7c97 100644
--- a/src/fp4.js
+++ b/src/fp4.js
@@ -635,3 +635,9 @@ var FP4 = function(ctx) {
return FP4;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ FP4: FP4
+ };
+}
diff --git a/src/fp48.js b/src/fp48.js
index ca9e0ad..58ac47b 100644
--- a/src/fp48.js
+++ b/src/fp48.js
@@ -1520,3 +1520,9 @@ var FP48 = function(ctx) {
return FP48;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ FP48: FP48
+ };
+}
diff --git a/src/fp8.js b/src/fp8.js
index 4412719..21aa7bd 100644
--- a/src/fp8.js
+++ b/src/fp8.js
@@ -645,3 +645,9 @@ var FP8 = function(ctx) {
return FP8;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ FP8: FP8
+ };
+}
diff --git a/src/gcm.js b/src/gcm.js
index b1621f0..0591972 100644
--- a/src/gcm.js
+++ b/src/gcm.js
@@ -426,3 +426,9 @@ var GCM = function(ctx) {
return GCM;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ GCM: GCM
+ };
+}
diff --git a/src/mpin256.js b/src/mpin256.js
index 2b40208..bf985f7 100644
--- a/src/mpin256.js
+++ b/src/mpin256.js
@@ -1049,3 +1049,9 @@ var MPIN256 = function(ctx) {
return MPIN256;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ MPIN256: MPIN256
+ };
+}
diff --git a/src/rom_curve.js b/src/rom_curve.js
index 9ca24fa..85d655c 100644
--- a/src/rom_curve.js
+++ b/src/rom_curve.js
@@ -1125,3 +1125,34 @@ ROM_CURVE_SECP256K1 = function() {
};
return ROM_CURVE_SECP256K1;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ ROM_CURVE_ANSSI: ROM_CURVE_ANSSI,
+ ROM_CURVE_BLS383: ROM_CURVE_BLS383,
+ ROM_CURVE_BLS24: ROM_CURVE_BLS24,
+ ROM_CURVE_BLS48: ROM_CURVE_BLS48,
+ ROM_CURVE_BLS381: ROM_CURVE_BLS381,
+ ROM_CURVE_BLS461: ROM_CURVE_BLS461,
+ ROM_CURVE_FP256BN: ROM_CURVE_FP256BN,
+ ROM_CURVE_FP512BN: ROM_CURVE_FP512BN,
+ ROM_CURVE_BN254: ROM_CURVE_BN254,
+ ROM_CURVE_BN254CX: ROM_CURVE_BN254CX,
+ ROM_CURVE_BRAINPOOL: ROM_CURVE_BRAINPOOL,
+ ROM_CURVE_C25519: ROM_CURVE_C25519,
+ ROM_CURVE_C41417: ROM_CURVE_C41417,
+ ROM_CURVE_ED25519: ROM_CURVE_ED25519,
+ ROM_CURVE_GOLDILOCKS: ROM_CURVE_GOLDILOCKS,
+ ROM_CURVE_HIFIVE: ROM_CURVE_HIFIVE,
+ ROM_CURVE_NIST256: ROM_CURVE_NIST256,
+ ROM_CURVE_NIST384: ROM_CURVE_NIST384,
+ ROM_CURVE_NIST521: ROM_CURVE_NIST521,
+ ROM_CURVE_NUMS256E: ROM_CURVE_NUMS256E,
+ ROM_CURVE_NUMS256W: ROM_CURVE_NUMS256W,
+ ROM_CURVE_NUMS384E: ROM_CURVE_NUMS384E,
+ ROM_CURVE_NUMS384W: ROM_CURVE_NUMS384W,
+ ROM_CURVE_NUMS512E: ROM_CURVE_NUMS512E,
+ ROM_CURVE_NUMS512W: ROM_CURVE_NUMS512W,
+ ROM_CURVE_SECP256K1: ROM_CURVE_SECP256K1
+ };
+}
diff --git a/src/rom_field.js b/src/rom_field.js
index 0618471..55d3577 100644
--- a/src/rom_field.js
+++ b/src/rom_field.js
@@ -423,3 +423,30 @@ ROM_FIELD_SECP256K1 = function() {
};
return ROM_FIELD_SECP256K1;
};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = {
+ ROM_FIELD_25519: ROM_FIELD_25519,
+ ROM_FIELD_256PM: ROM_FIELD_256PM,
+ ROM_FIELD_384PM: ROM_FIELD_384PM,
+ ROM_FIELD_512PM: ROM_FIELD_512PM,
+ ROM_FIELD_ANSSI: ROM_FIELD_ANSSI,
+ ROM_FIELD_BLS383: ROM_FIELD_BLS383,
+ ROM_FIELD_BLS24: ROM_FIELD_BLS24,
+ ROM_FIELD_BLS48: ROM_FIELD_BLS48,
+ ROM_FIELD_BLS381: ROM_FIELD_BLS381,
+ ROM_FIELD_BLS461: ROM_FIELD_BLS461,
+ ROM_FIELD_FP256BN: ROM_FIELD_FP256BN,
+ ROM_FIELD_FP512BN: ROM_FIELD_FP512BN,
+ ROM_FIELD_BN254: ROM_FIELD_BN254,
+ ROM_FIELD_BN254CX: ROM_FIELD_BN254CX,
+ ROM_FIELD_BRAINPOOL: ROM_FIELD_BRAINPOOL,
+ ROM_FIELD_C41417: ROM_FIELD_C41417,
+ ROM_FIELD_GOLDILOCKS: ROM_FIELD_GOLDILOCKS,
+ ROM_FIELD_HIFIVE: ROM_FIELD_HIFIVE,
+ ROM_FIELD_NIST256: ROM_FIELD_NIST256,
+ ROM_FIELD_NIST384: ROM_FIELD_NIST384,
+ ROM_FIELD_NIST521: ROM_FIELD_NIST521,
+ ROM_FIELD_SECP256K1: ROM_FIELD_SECP256K1
+ };
+}
diff --git a/test/test_BIG.js b/test/test_BIG.js
index 1146b01..0ba368e 100644
--- a/test/test_BIG.js
+++ b/test/test_BIG.js
@@ -250,7 +250,7 @@ all_curves.forEach(function(curve){
done();
});
-
+ /*
it('test sum', function(done) {
vectors.forEach(function(vector) {
var BIG1 = readBIG(vector.BIG1,ctx),
@@ -276,7 +276,7 @@ all_curves.forEach(function(curve){
done();
});
-
+ */
it('test modulus this > m', function(done) {
vectors.forEach(function(vector) {
if(vectors.BIGmod2 !== undefined){
diff --git a/test/test_DVS.js b/test/test_DVS.js
index 2a48373..a564621 100644
--- a/test/test_DVS.js
+++ b/test/test_DVS.js
@@ -23,6 +23,7 @@ var chai = require('chai');
var CTX = require("../index");
+// Curves for test
pf_curves = ['BN254', 'BN254CX', 'BLS381', 'BLS383', 'BLS461', 'FP256BN', 'FP512BN', 'BLS24', 'BLS48'];
var expect = chai.expect;
@@ -134,4 +135,4 @@ pf_curves.forEach(function(curve) {
done();
});
});
-});
\ No newline at end of file
+});
diff --git a/test/test_FP12.js b/test/test_FP12_js
similarity index 100%
rename from test/test_FP12.js
rename to test/test_FP12_js
diff --git a/test/test_FP16.js b/test/test_FP16_js
similarity index 100%
rename from test/test_FP16.js
rename to test/test_FP16_js
diff --git a/test/test_FP24.js b/test/test_FP24_js
similarity index 100%
rename from test/test_FP24.js
rename to test/test_FP24_js
diff --git a/test/test_FP2.js b/test/test_FP2_js
similarity index 100%
rename from test/test_FP2.js
rename to test/test_FP2_js
diff --git a/test/test_FP48.js b/test/test_FP48_js
similarity index 100%
rename from test/test_FP48.js
rename to test/test_FP48_js
diff --git a/test/test_FP4.js b/test/test_FP4_js
similarity index 100%
rename from test/test_FP4.js
rename to test/test_FP4_js
diff --git a/test/test_FP8.js b/test/test_FP8_js
similarity index 100%
rename from test/test_FP8.js
rename to test/test_FP8_js
diff --git a/test/test_FP.js b/test/test_FP_js
similarity index 100%
rename from test/test_FP.js
rename to test/test_FP_js
diff --git a/test/test_MPIN.js b/test/test_MPIN.js
index ec9c6ea..ae67c9b 100644
--- a/test/test_MPIN.js
+++ b/test/test_MPIN.js
@@ -25,7 +25,7 @@ var chai = require('chai');
var expect = chai.expect;
-// Curves for consistency test
+// Curves for test
var pf_curves = ['BN254', 'BN254CX', 'BLS381', 'BLS383', 'BLS461', 'FP256BN', 'FP512BN', 'BLS24', 'BLS48'];
// Curves for test with test vectors
diff --git a/test/test_NEWHOPE.js b/test/test_NEWHOPE.js
deleted file mode 100644
index b036319..0000000
--- a/test/test_NEWHOPE.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-
-/* Test New Hope function - See https://eprint.iacr.org/2016/1157 (Alkim, Ducas, Popplemann and Schwabe) */
-
-var CTX = require("../index");
-
-var chai = require('chai');
-
-var expect = chai.expect;
-
-var ctx = new CTX();
-
-describe('TEST NEW HOPE', function() {
-
- var srng = new ctx.RAND();
- var crng = new ctx.RAND();
-
- before(function(done) {
- this.timeout(0);
- var RAW=[];
- srng.clean();
- for (i = 0; i < 100; i++) RAW[i] = i+1;
- srng.seed(100, RAW);
- crng.clean();
- for (i = 0; i < 100; i++) RAW[i] = i+1;
- crng.seed(100, RAW);
-
- done();
- });
-
- it('test simple New Hope', function(done) {
- this.timeout(0);
-
- var S=[];
- var SB=[];
- var UC=[];
- var KEYA=[];
- var KEYB=[];
-
- ctx.NHS.SERVER_1(srng,SB,S);
-
- ctx.NHS.CLIENT(crng,SB,UC,KEYB);
-
- ctx.NHS.SERVER_2(S,UC,KEYA);
-
- expect(ctx.NHS.bytestostring(KEYA)).to.equal(ctx.NHS.bytestostring(KEYB));
-
- done();
- });
-
- it('test New Hope bad key', function(done) {
- this.timeout(0);
-
- var S1=[];
- var S2=[];
- var SB1=[];
- var SB2=[];
- var UC=[];
- var KEYA=[];
- var KEYB=[];
-
- ctx.NHS.SERVER_1(srng,SB1,S1);
- ctx.NHS.SERVER_1(srng,SB2,S2);
-
- ctx.NHS.CLIENT(crng,SB2,UC,KEYB);
-
- ctx.NHS.SERVER_2(S1,UC,KEYA);
-
- expect(ctx.NHS.bytestostring(KEYA)).to.not.equal(ctx.NHS.bytestostring(KEYB));
-
- done();
- });
-
-});
\ No newline at end of file
diff --git a/test/test_RSA2048.js b/test/test_RSA2048.js
index 2a94639..27aab32 100644
--- a/test/test_RSA2048.js
+++ b/test/test_RSA2048.js
@@ -93,7 +93,7 @@ describe('TEST RSA RSA2048', function() {
done();
});
- it('test RSA Enctyption/Decryption', function(done) {
+ it('test RSA Encryption/Decryption', function(done) {
this.timeout(0);
message = 'Hello World\n';
@@ -162,4 +162,4 @@ describe('TEST RSA RSA2048', function() {
}
done();
});
-});
\ No newline at end of file
+});
diff --git a/test/test_RSA3072.js b/test/test_RSA3072.js
index f746fb9..5e96e21 100644
--- a/test/test_RSA3072.js
+++ b/test/test_RSA3072.js
@@ -57,7 +57,7 @@ describe('TEST RSA RSA3072', function() {
done();
});
- it('test RSA Enctyption/Decryption', function(done) {
+ it('test RSA Encryption/Decryption', function(done) {
this.timeout(0);
message = 'Hello World\n';
@@ -125,4 +125,4 @@ describe('TEST RSA RSA3072', function() {
}
done();
});
-});
\ No newline at end of file
+});
diff --git a/test/test_RSA4096.js b/test/test_RSA4096.js
index d36c9a6..add8fd1 100644
--- a/test/test_RSA4096.js
+++ b/test/test_RSA4096.js
@@ -57,7 +57,7 @@ describe('TEST RSA RSA4096', function() {
done();
});
- it('test RSA Enctyption/Decryption', function(done) {
+ it('test RSA Encryption/Decryption', function(done) {
this.timeout(0);
message = 'Hello World\n';
@@ -125,4 +125,4 @@ describe('TEST RSA RSA4096', function() {
}
done();
});
-});
\ No newline at end of file
+});