mcl-wasm
Version:
mcl ; A portable and fast pairing-based cryptography library for Node.js by WebAssembly
42 lines (41 loc) • 2.26 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MCLBN_GT_SIZE = exports.MCLBN_G2_SIZE = exports.MCLBN_G1_SIZE = exports.MCLBN_FR_SIZE = exports.MCLBN_FP_SIZE = exports.MCLBN_COMPILED_TIME_VAR = exports.MCLBN_FR_UNIT_SIZE = exports.MCLBN_FP_UNIT_SIZE = exports.EC_PROJ = exports.IRTF = exports.NIST_P256 = exports.NIST_P224 = exports.NIST_P192 = exports.SECP384R1 = exports.SECP256K1 = exports.SECP224K1 = exports.BLS12_377 = exports.BLS12_381 = exports.BN_SNARK1 = exports.BN462 = exports.BN381_2 = exports.BN381_1 = exports.BN254 = exports.CurveType = void 0;
var CurveType;
(function (CurveType) {
CurveType[CurveType["BN254"] = 0] = "BN254";
CurveType[CurveType["BN_SNARK1"] = 4] = "BN_SNARK1";
CurveType[CurveType["BLS12_381"] = 5] = "BLS12_381";
CurveType[CurveType["BLS12_377"] = 8] = "BLS12_377";
CurveType[CurveType["SECP224K1"] = 101] = "SECP224K1";
CurveType[CurveType["SECP256K1"] = 102] = "SECP256K1";
CurveType[CurveType["SECP384R1"] = 102] = "SECP384R1";
CurveType[CurveType["NIST_P192"] = 105] = "NIST_P192";
CurveType[CurveType["NIST_P224"] = 106] = "NIST_P224";
CurveType[CurveType["NIST_P256"] = 107] = "NIST_P256";
})(CurveType = exports.CurveType || (exports.CurveType = {}));
exports.BN254 = CurveType.BN254;
exports.BN381_1 = 1;
exports.BN381_2 = 2;
exports.BN462 = 3;
exports.BN_SNARK1 = CurveType.BN_SNARK1;
exports.BLS12_381 = CurveType.BLS12_381;
exports.BLS12_377 = CurveType.BLS12_377;
exports.SECP224K1 = CurveType.SECP224K1;
exports.SECP256K1 = CurveType.SECP256K1;
exports.SECP384R1 = 103;
exports.NIST_P192 = CurveType.NIST_P192;
exports.NIST_P224 = CurveType.NIST_P224;
exports.NIST_P256 = CurveType.NIST_P256;
/* MCL_MAP_TO_MODE_HASH_TO_CURVE_07 */
exports.IRTF = 5;
/* flag for G1/G2.getStr */
exports.EC_PROJ = 1024;
exports.MCLBN_FP_UNIT_SIZE = 6;
exports.MCLBN_FR_UNIT_SIZE = 4;
exports.MCLBN_COMPILED_TIME_VAR = exports.MCLBN_FR_UNIT_SIZE * 10 + exports.MCLBN_FP_UNIT_SIZE;
exports.MCLBN_FP_SIZE = exports.MCLBN_FP_UNIT_SIZE * 8;
exports.MCLBN_FR_SIZE = exports.MCLBN_FR_UNIT_SIZE * 8;
exports.MCLBN_G1_SIZE = exports.MCLBN_FP_SIZE * 3;
exports.MCLBN_G2_SIZE = exports.MCLBN_FP_SIZE * 6;
exports.MCLBN_GT_SIZE = exports.MCLBN_FP_SIZE * 12;