@bitgo/sdk-lib-mpc
Advanced tools
Comparing version 8.12.0 to 8.13.0
@@ -6,2 +6,18 @@ # Change Log | ||
# [8.13.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-lib-mpc@8.5.0...@bitgo/sdk-lib-mpc@8.13.0) (2023-09-25) | ||
### Bug Fixes | ||
- **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b)) | ||
- **sdk-lib-mpc:** fix 0 values attack on range proof ([4a689dc](https://github.com/BitGo/BitGoJS/commit/4a689dcfcf0345132e54ddfd3e8a10e2452b0997)) | ||
### Features | ||
- **sdk-core:** add getDerivationPath method for smc wallets ([e0be65f](https://github.com/BitGo/BitGoJS/commit/e0be65f4c8904be313b4f453996f86326d2005e8)) | ||
- **sdk-core:** phase 5 of gg18 signing ([d8ab3df](https://github.com/BitGo/BitGoJS/commit/d8ab3df38c7f0dc445117f68340cd3f17dfc9a68)) | ||
- **sdk-lib-mpc:** convert interface to type ([e1c1065](https://github.com/BitGo/BitGoJS/commit/e1c1065928691a1f9d43522aeafa8751c2424d3e)) | ||
- **sdk-lib-mpc:** move ecdsa hdtree from core ([f0311a8](https://github.com/BitGo/BitGoJS/commit/f0311a8606b1a6aa82309ef7bb9a349782819c28)) | ||
- **sdk-lib-mpc:** move shamir ([42fc946](https://github.com/BitGo/BitGoJS/commit/42fc946c8a5c4a1f7a09e5a9cb6c64a0b266a2a7)) | ||
- **sdk-lib-mpc:** move types to types.ts ([cf2f482](https://github.com/BitGo/BitGoJS/commit/cf2f4821792172b1657fbcecd8886df5bacd817a)) | ||
# [8.12.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-lib-mpc@8.5.0...@bitgo/sdk-lib-mpc@8.12.0) (2023-09-09) | ||
@@ -8,0 +24,0 @@ |
@@ -18,3 +18,5 @@ /// <reference types="node" /> | ||
order(): bigint; | ||
scalarBytes: number; | ||
pointBytes: number; | ||
} | ||
//# sourceMappingURL=ed25519.d.ts.map |
@@ -10,3 +10,9 @@ "use strict"; | ||
const util_1 = require("../util"); | ||
const privateKeySize = 32; | ||
const publicKeySize = 32; | ||
class Ed25519Curve { | ||
constructor() { | ||
this.scalarBytes = privateKeySize; | ||
this.pointBytes = publicKeySize; | ||
} | ||
static async initialize() { | ||
@@ -26,24 +32,24 @@ if (!Ed25519Curve.initialized) { | ||
scalarNegate(s) { | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_scalar_negate(util_1.bigIntToBufferLE(s, 32)))); | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_scalar_negate(util_1.bigIntToBufferLE(s, privateKeySize)))); | ||
} | ||
scalarInvert(s) { | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_scalar_invert(util_1.bigIntToBufferLE(s, 32)))); | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_scalar_invert(util_1.bigIntToBufferLE(s, privateKeySize)))); | ||
} | ||
scalarAdd(x, y) { | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_scalar_add(util_1.bigIntToBufferLE(x, 32), util_1.bigIntToBufferLE(y, 32)))); | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_scalar_add(util_1.bigIntToBufferLE(x, privateKeySize), util_1.bigIntToBufferLE(y, privateKeySize)))); | ||
} | ||
scalarSub(x, y) { | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_scalar_sub(util_1.bigIntToBufferLE(x, 32), util_1.bigIntToBufferLE(y, 32)))); | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_scalar_sub(util_1.bigIntToBufferLE(x, privateKeySize), util_1.bigIntToBufferLE(y, privateKeySize)))); | ||
} | ||
scalarMult(x, y) { | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_scalar_mul(util_1.bigIntToBufferLE(x, 32), util_1.bigIntToBufferLE(y, 32)))); | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_scalar_mul(util_1.bigIntToBufferLE(x, privateKeySize), util_1.bigIntToBufferLE(y, privateKeySize)))); | ||
} | ||
basePointMult(n) { | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_scalarmult_ed25519_base_noclamp(util_1.bigIntToBufferLE(n, 32)))); | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_scalarmult_ed25519_base_noclamp(util_1.bigIntToBufferLE(n, privateKeySize)))); | ||
} | ||
pointAdd(p, q) { | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_add(util_1.bigIntToBufferLE(p, 32), util_1.bigIntToBufferLE(q, 32)))); | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_core_ed25519_add(util_1.bigIntToBufferLE(p, publicKeySize), util_1.bigIntToBufferLE(q, publicKeySize)))); | ||
} | ||
pointMultiply(p, s) { | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_scalarmult_ed25519_noclamp(util_1.bigIntToBufferLE(s, 32), util_1.bigIntToBufferLE(p, 32)))); | ||
return util_1.bigIntFromBufferLE(Buffer.from(libsodium_wrappers_sumo_1.default.crypto_scalarmult_ed25519_noclamp(util_1.bigIntToBufferLE(s, publicKeySize), util_1.bigIntToBufferLE(p, publicKeySize)))); | ||
} | ||
@@ -54,3 +60,3 @@ verify(message, signature, publicKey) { | ||
// Returns the message which was signed if the signature is valid | ||
const result = Buffer.from(libsodium_wrappers_sumo_1.default.crypto_sign_open(signedMessage, util_1.bigIntToBufferLE(publicKey, 32))); | ||
const result = Buffer.from(libsodium_wrappers_sumo_1.default.crypto_sign_open(signedMessage, util_1.bigIntToBufferLE(publicKey, publicKeySize))); | ||
return Buffer.compare(message, result) === 0; | ||
@@ -69,2 +75,2 @@ } | ||
Ed25519Curve.initialized = false; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWQyNTUxOS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jdXJ2ZXMvZWQyNTUxOS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxzRkFBNkM7QUFDN0MsbUNBQXFDO0FBQ3JDLGtDQUErRDtBQUcvRCxNQUFhLFlBQVk7SUFHdkIsTUFBTSxDQUFDLEtBQUssQ0FBQyxVQUFVO1FBQ3JCLElBQUksQ0FBQyxZQUFZLENBQUMsV0FBVyxFQUFFO1lBQzdCLE1BQU0saUNBQU0sQ0FBQyxLQUFLLENBQUM7WUFDbkIsWUFBWSxDQUFDLFdBQVcsR0FBRyxJQUFJLENBQUM7U0FDakM7UUFFRCxPQUFPLElBQUksWUFBWSxFQUFFLENBQUM7SUFDNUIsQ0FBQztJQUVELFlBQVk7UUFDVixPQUFPLHlCQUFrQixDQUN2QixNQUFNLENBQUMsSUFBSSxDQUFDLGlDQUFNLENBQUMsaUNBQWlDLENBQUMseUJBQWtCLENBQUMsb0JBQVcsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FDM0YsQ0FBQztJQUNKLENBQUM7SUFFRCxZQUFZLENBQUMsQ0FBUztRQUNwQixPQUFPLHlCQUFrQixDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsaUNBQU0sQ0FBQyxpQ0FBaUMsQ0FBQyx1QkFBZ0IsQ0FBQyxDQUFDLEVBQ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0tleVNpemUpKVxuICAgICAgKVxuICAgICk7XG4gIH1cblxuICB2ZXJpZnkobWVzc2FnZTogQnVmZmVyLCBzaWduYXR1cmU6IEJ1ZmZlciwgcHVibGljS2V5OiBiaWdpbnQpOiBib29sZWFuIHtcbiAgICBjb25zdCBzaWduZWRNZXNzYWdlID0gQnVmZmVyLmNvbmNhdChbc2lnbmF0dXJlLCBtZXNzYWdlXSk7XG4gICAgdHJ5IHtcbiAgICAgIC8vIFJldHVybnMgdGhlIG1lc3NhZ2Ugd2hpY2ggd2FzIHNpZ25lZCBpZiB0aGUgc2lnbmF0dXJlIGlzIHZhbGlkXG4gICAgICBjb25zdCByZXN1bHQgPSBCdWZmZXIuZnJvbShzb2RpdW0uY3J5cHRvX3NpZ25fb3BlbihzaWduZWRNZXNzYWdlLCBiaWdJbnRUb0J1ZmZlckxFKHB1YmxpY0tleSwgcHVibGljS2V5U2l6ZSkpKTtcbiAgICAgIHJldHVybiBCdWZmZXIuY29tcGFyZShtZXNzYWdlLCByZXN1bHQpID09PSAwO1xuICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAvLyBJbnZhbGlkIHNpZ25hdHVyZSBjYXVzZXMgYW4gZXhjZXB0aW9uXG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9XG5cbiAgb3JkZXIoKTogYmlnaW50IHtcbiAgICByZXR1cm4gQmlnSW50KCcweDEwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMTRkZWY5ZGVhMmY3OWNkNjU4MTI2MzFhNWNmNWQzZWQnKSAqIEJpZ0ludCgnMHgwOCcpO1xuICB9XG5cbiAgc2NhbGFyQnl0ZXMgPSBwcml2YXRlS2V5U2l6ZTtcblxuICBwb2ludEJ5dGVzID0gcHVibGljS2V5U2l6ZTtcbn1cbiJdfQ== |
@@ -16,3 +16,5 @@ /// <reference types="node" /> | ||
order(): bigint; | ||
scalarBytes: number; | ||
pointBytes: number; | ||
} | ||
//# sourceMappingURL=secp256k1.d.ts.map |
@@ -26,3 +26,10 @@ "use strict"; | ||
const order = secp.CURVE.n; | ||
const privateKeySize = 32; | ||
const publicKeySize = 33; | ||
class Secp256k1Curve { | ||
constructor() { | ||
this.scalarBytes = privateKeySize; | ||
// Always use compressed points. | ||
this.pointBytes = publicKeySize; | ||
} | ||
scalarRandom() { | ||
@@ -32,3 +39,3 @@ return util_1.bigIntFromU8ABE(secp.utils.randomPrivateKey()); | ||
scalarAdd(x, y) { | ||
return util_1.bigIntFromU8ABE(secp.utils.privateAdd(x, util_1.bigIntToBufferBE(y, 32))); | ||
return util_1.bigIntFromU8ABE(secp.utils.privateAdd(x, util_1.bigIntToBufferBE(y, privateKeySize))); | ||
} | ||
@@ -52,16 +59,16 @@ scalarSub(x, y) { | ||
pointAdd(a, b) { | ||
const pointA = secp.Point.fromHex(util_1.bigIntToBufferBE(a, 32)); | ||
const pointB = secp.Point.fromHex(util_1.bigIntToBufferBE(b, 32)); | ||
const pointA = secp.Point.fromHex(util_1.bigIntToBufferBE(a, privateKeySize)); | ||
const pointB = secp.Point.fromHex(util_1.bigIntToBufferBE(b, privateKeySize)); | ||
return util_1.bigIntFromU8ABE(pointA.add(pointB).toRawBytes(true)); | ||
} | ||
pointMultiply(p, s) { | ||
const pointA = secp.Point.fromHex(util_1.bigIntToBufferBE(p, 32)); | ||
const pointA = secp.Point.fromHex(util_1.bigIntToBufferBE(p, privateKeySize)); | ||
return util_1.bigIntFromU8ABE(pointA.multiply(s).toRawBytes(true)); | ||
} | ||
basePointMult(n) { | ||
const point = util_1.bigIntToBufferBE(n, 32); | ||
const point = util_1.bigIntToBufferBE(n, privateKeySize); | ||
return util_1.bigIntFromU8ABE(secp.getPublicKey(point, true)); | ||
} | ||
verify(message, signature, publicKey) { | ||
return Buffer.from(secp.recoverPublicKey(message, signature.subarray(1), signature[0], true)).equals(util_1.bigIntToBufferBE(publicKey, 33)); | ||
return Buffer.from(secp.recoverPublicKey(message, signature.subarray(1), signature[0], true)).equals(util_1.bigIntToBufferBE(publicKey, publicKeySize)); | ||
} | ||
@@ -73,2 +80,2 @@ order() { | ||
exports.Secp256k1Curve = Secp256k1Curve; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VjcDI1NmsxLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2N1cnZlcy9zZWNwMjU2azEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLGtDQUE0RDtBQUU1RCx1REFBeUM7QUFFekMsTUFBTSxLQUFLLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7QUFFM0IsTUFBYSxjQUFjO0lBQ3pCLFlBQVk7UUFDVixPQUFPLHNCQUFlLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxnQkFBZ0IsRUFBRSxDQUFDLENBQUM7SUFDeEQsQ0FBQztJQUVELFNBQVMsQ0FBQyxDQUFTLEVBQUUsQ0FBUztRQUM1QixPQUFPLHNCQUFlLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsQ0FBQyxFQUFFLHVCQUFnQixDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDNUUsQ0FBQztJQUVELFNBQVMsQ0FBQyxDQUFTLEVBQUUsQ0FBUztRQUM1QixNQUFNLFFBQVEsR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUM3QyxPQUFPLHNCQUFlLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsQ0FBQyxFQUFFLFFBQVEsQ0FBQyxDQUFDLENBQUM7SUFDN0QsQ0FBQztJQUVELFVBQVUsQ0FBQyxDQUFTLEVBQUUsQ0FBUztRQUM3QixPQ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UHVibGljS2V5KHBvaW50LCB0cnVlKSk7XG4gIH1cblxuICB2ZXJpZnkobWVzc2FnZTogQnVmZmVyLCBzaWduYXR1cmU6IEJ1ZmZlciwgcHVibGljS2V5OiBiaWdpbnQpOiBib29sZWFuIHtcbiAgICByZXR1cm4gQnVmZmVyLmZyb20oc2VjcC5yZWNvdmVyUHVibGljS2V5KG1lc3NhZ2UsIHNpZ25hdHVyZS5zdWJhcnJheSgxKSwgc2lnbmF0dXJlWzBdLCB0cnVlKSkuZXF1YWxzKFxuICAgICAgYmlnSW50VG9CdWZmZXJCRShwdWJsaWNLZXksIHB1YmxpY0tleVNpemUpXG4gICAgKTtcbiAgfVxuXG4gIG9yZGVyKCk6IGJpZ2ludCB7XG4gICAgcmV0dXJuIG9yZGVyO1xuICB9XG5cbiAgc2NhbGFyQnl0ZXMgPSBwcml2YXRlS2V5U2l6ZTtcblxuICAvLyBBbHdheXMgdXNlIGNvbXByZXNzZWQgcG9pbnRzLlxuICBwb2ludEJ5dGVzID0gcHVibGljS2V5U2l6ZTtcbn1cbiJdfQ== |
@@ -33,3 +33,5 @@ /// <reference types="node" /> | ||
order: () => bigint; | ||
scalarBytes: number; | ||
pointBytes: number; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY3VydmVzL3R5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBQdWJsaWNLZXljaGFpbiA9IHtcbiAgLy8gcHVibGljIGtleVxuICBwazogYmlnaW50O1xuICBjaGFpbmNvZGU6IGJpZ2ludDtcbn07XG5cbmV4cG9ydCB0eXBlIFByaXZhdGVLZXljaGFpbiA9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dXJucyB0aGUgcHJvZHVjdCBvZiB0d28gZmllbGQgZWxlbWVudHNcbiAgLy8gbW9kdWxvIHRoZSBvcmRlciBvZiB0aGUgY3VydmUuXG4gIHNjYWxhck11bHQoeDogYmlnaW50LCB5OiBiaWdpbnQpOiBiaWdpbnQ7XG4gIC8vIEZ1bmN0aW9uIHRoYXQgbXVsdGlwbGllcyBhIGdyb3VwIGVsZW1lbnQgYnkgYSBmaWVsZCBlbGVtZW50LlxuICBiYXNlUG9pbnRNdWx0KG46IGJpZ2ludCk6IGJpZ2ludDtcbiAgLy8gRnVuY3Rpb24gdGhhdCBhZGRzIHR3byBncm91cCBlbGVtZW50cy5cbiAgcG9pbnRBZGQocDogYmlnaW50LCBxOiBiaWdpbnQpOiBiaWdpbnQ7XG4gIC8vIE11bHRpcGx5IGEgcG9pbnQgYnkgYSBzY2FsYXIuXG4gIHBvaW50TXVsdGlwbHkocDogYmlnaW50LCBzOiBiaWdpbnQpOiBiaWdpbnQ7XG4gIC8vIEZ1bmN0aW9uIHRoYXQgdmVyaWZpZXMgYSBzaWduYXR1cmUuXG4gIHZlcmlmeShtZXNzYWdlOiBCdWZmZXIsIHNpZ25hdHVyZTogQnVmZmVyLCBwdWJsaWNLZXk6IGJpZ2ludCk6IGJvb2xlYW47XG4gIC8vIG9yZGVyIG9mIHRoZSBjdXJ2ZVxuICBvcmRlcjogKCkgPT4gYmlnaW50O1xuICAvLyB0aGUgc2l6ZSBvZiBzY2FsYXIgb2YgdGhlIGN1cnZlIGluIGJ5dGVzXG4gIHNjYWxhckJ5dGVzOiBudW1iZXI7XG4gIC8vIHRoZSBzaXplIG9mIHBvaW50IG9mIHRoZSBjdXJ2ZSBpbiBieXRlc1xuICBwb2ludEJ5dGVzOiBudW1iZXI7XG59XG4iXX0= |
@@ -1,6 +0,9 @@ | ||
export * from './tss'; | ||
export * from './curves'; | ||
export * from './util'; | ||
export * from './openssl'; | ||
export * from './shamir'; | ||
export * from './tss'; | ||
export * as HashCommitment from './hashCommitment'; | ||
export * as Schnorr from './schnorrProof'; | ||
export * from './types'; | ||
export * from './util'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -9,11 +9,27 @@ "use strict"; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./tss"), exports); | ||
exports.Schnorr = exports.HashCommitment = void 0; | ||
__exportStar(require("./curves"), exports); | ||
__exportStar(require("./util"), exports); | ||
__exportStar(require("./openssl"), exports); | ||
__exportStar(require("./shamir"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsd0NBQXNCO0FBQ3RCLDJDQUF5QjtBQUN6Qix5Q0FBdUI7QUFDdkIsNENBQTBCO0FBQzFCLDJDQUF5QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vdHNzJztcbmV4cG9ydCAqIGZyb20gJy4vY3VydmVzJztcbmV4cG9ydCAqIGZyb20gJy4vdXRpbCc7XG5leHBvcnQgKiBmcm9tICcuL29wZW5zc2wnO1xuZXhwb3J0ICogZnJvbSAnLi9zaGFtaXInO1xuIl19 | ||
__exportStar(require("./tss"), exports); | ||
exports.HashCommitment = __importStar(require("./hashCommitment")); | ||
exports.Schnorr = __importStar(require("./schnorrProof")); | ||
__exportStar(require("./types"), exports); | ||
__exportStar(require("./util"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDJDQUF5QjtBQUN6Qiw0Q0FBMEI7QUFDMUIsMkNBQXlCO0FBQ3pCLHdDQUFzQjtBQUV0QixtRUFBbUQ7QUFDbkQsMERBQTBDO0FBQzFDLDBDQUF3QjtBQUN4Qix5Q0FBdUIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2N1cnZlcyc7XG5leHBvcnQgKiBmcm9tICcuL29wZW5zc2wnO1xuZXhwb3J0ICogZnJvbSAnLi9zaGFtaXInO1xuZXhwb3J0ICogZnJvbSAnLi90c3MnO1xuXG5leHBvcnQgKiBhcyBIYXNoQ29tbWl0bWVudCBmcm9tICcuL2hhc2hDb21taXRtZW50JztcbmV4cG9ydCAqIGFzIFNjaG5vcnIgZnJvbSAnLi9zY2hub3JyUHJvb2YnO1xuZXhwb3J0ICogZnJvbSAnLi90eXBlcyc7XG5leHBvcnQgKiBmcm9tICcuL3V0aWwnO1xuIl19 |
export * as EcdsaTypes from './types'; | ||
export * as EcdsaRangeProof from './rangeproof'; | ||
export * as EcdsaPaillierProof from './paillierproof'; | ||
export * as EcdsaZkVProof from './zkVProof'; | ||
export declare const minModulusBitLength = 3072; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -22,7 +22,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.minModulusBitLength = exports.EcdsaPaillierProof = exports.EcdsaRangeProof = exports.EcdsaTypes = void 0; | ||
exports.minModulusBitLength = exports.EcdsaZkVProof = exports.EcdsaPaillierProof = exports.EcdsaRangeProof = exports.EcdsaTypes = void 0; | ||
exports.EcdsaTypes = __importStar(require("./types")); | ||
exports.EcdsaRangeProof = __importStar(require("./rangeproof")); | ||
exports.EcdsaPaillierProof = __importStar(require("./paillierproof")); | ||
exports.EcdsaZkVProof = __importStar(require("./zkVProof")); | ||
exports.minModulusBitLength = 3072; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdHNzL2VjZHNhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzREFBc0M7QUFDdEMsZ0VBQWdEO0FBQ2hELHNFQUFzRDtBQUV6QyxRQUFBLG1CQUFtQixHQUFHLElBQUksQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGFzIEVjZHNhVHlwZXMgZnJvbSAnLi90eXBlcyc7XG5leHBvcnQgKiBhcyBFY2RzYVJhbmdlUHJvb2YgZnJvbSAnLi9yYW5nZXByb29mJztcbmV4cG9ydCAqIGFzIEVjZHNhUGFpbGxpZXJQcm9vZiBmcm9tICcuL3BhaWxsaWVycHJvb2YnO1xuXG5leHBvcnQgY29uc3QgbWluTW9kdWx1c0JpdExlbmd0aCA9IDMwNzI7XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdHNzL2VjZHNhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzREFBc0M7QUFDdEMsZ0VBQWdEO0FBQ2hELHNFQUFzRDtBQUN0RCw0REFBNEM7QUFFL0IsUUFBQSxtQkFBbUIsR0FBRyxJQUFJLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBhcyBFY2RzYVR5cGVzIGZyb20gJy4vdHlwZXMnO1xuZXhwb3J0ICogYXMgRWNkc2FSYW5nZVByb29mIGZyb20gJy4vcmFuZ2Vwcm9vZic7XG5leHBvcnQgKiBhcyBFY2RzYVBhaWxsaWVyUHJvb2YgZnJvbSAnLi9wYWlsbGllcnByb29mJztcbmV4cG9ydCAqIGFzIEVjZHNhWmtWUHJvb2YgZnJvbSAnLi96a1ZQcm9vZic7XG5cbmV4cG9ydCBjb25zdCBtaW5Nb2R1bHVzQml0TGVuZ3RoID0gMzA3MjtcbiJdfQ== |
@@ -125,3 +125,8 @@ interface NtildeProof<T> { | ||
} | ||
export interface ZkVProof { | ||
Alpha: bigint; | ||
t: bigint; | ||
u: bigint; | ||
} | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -132,2 +132,2 @@ "use strict"; | ||
exports.serializePaillierChallengeWithProofs = serializePaillierChallengeWithProofs; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvdHNzL2VjZHNhL3R5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG9FQUFvRTtBQUNwRSxxQ0FBMEc7QUF5QzFHOzs7R0FHRztBQUNILFNBQWdCLGlCQUFpQixDQUFDLFNBQTJCO0lBQzNELE9BQU87UUFDTCxNQUFNLEVBQUUsa0JBQVcsQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDO1FBQ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mFuZ2VQcm9vZldpdGhDaGVjayB7XG4gIHo6IGJpZ2ludDtcbiAgenBybTogYmlnaW50O1xuICB0OiBiaWdpbnQ7XG4gIHY6IGJpZ2ludDtcbiAgdzogYmlnaW50O1xuICBzOiBiaWdpbnQ7XG4gIHMxOiBiaWdpbnQ7XG4gIHMyOiBiaWdpbnQ7XG4gIHQxOiBiaWdpbnQ7XG4gIHQyOiBiaWdpbnQ7XG4gIHU6IGJpZ2ludDtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBaa1ZQcm9vZiB7XG4gIEFscGhhOiBiaWdpbnQ7XG4gIHQ6IGJpZ2ludDtcbiAgdTogYmlnaW50O1xufVxuIl19 |
@@ -23,5 +23,5 @@ /// <reference types="node" /> | ||
export declare function bigIntToHex(bigint: bigint, hexLength?: number): string; | ||
export declare function bigIntToBufferLE(n: bigint, bytes?: number): Buffer; | ||
export declare function bigIntToBufferLE(n: bigint, minBytes?: number): Buffer; | ||
export declare function bigIntFromBufferLE(buf: Buffer): bigint; | ||
export declare function bigIntToBufferBE(n: bigint, bytes?: number): Buffer; | ||
export declare function bigIntToBufferBE(n: bigint, minBytes?: number): Buffer; | ||
export declare function bigIntFromBufferBE(buf: Buffer): bigint; | ||
@@ -28,0 +28,0 @@ export declare function bigIntFromU8ABE(buf: Uint8Array): bigint; |
@@ -60,8 +60,8 @@ "use strict"; | ||
exports.bigIntToHex = bigIntToHex; | ||
function bigIntToBufferLE(n, bytes) { | ||
function bigIntToBufferLE(n, minBytes) { | ||
let v = n.toString(16); | ||
v = '0'.slice(0, v.length % 2) + v; | ||
const buf = Buffer.from(v, 'hex').reverse(); | ||
if (bytes && buf.length < bytes) { | ||
return Buffer.concat([buf, Buffer.alloc(bytes - buf.length)]); | ||
if (minBytes && buf.length < minBytes) { | ||
return Buffer.concat([buf, Buffer.alloc(minBytes - buf.length)]); | ||
} | ||
@@ -75,8 +75,8 @@ return buf; | ||
exports.bigIntFromBufferLE = bigIntFromBufferLE; | ||
function bigIntToBufferBE(n, bytes) { | ||
function bigIntToBufferBE(n, minBytes) { | ||
let v = n.toString(16); | ||
v = '0'.slice(0, v.length % 2) + v; | ||
const buf = Buffer.from(v, 'hex'); | ||
if (bytes && buf.length < bytes) { | ||
return Buffer.concat([Buffer.alloc(bytes - buf.length), buf]); | ||
if (minBytes && buf.length < minBytes) { | ||
return Buffer.concat([Buffer.alloc(minBytes - buf.length), buf]); | ||
} | ||
@@ -167,2 +167,2 @@ return buf; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLHFEQUE0QztBQUM1Qyw2REFBMEQ7QUFDMUQsdURBQXVDO0FBQ3ZDLG9EQUE0QjtBQUU1Qjs7O0dBR0c7QUFDSCxTQUFnQix3QkFBd0IsQ0FBQyxNQUFnQjtJQUN2RCxPQUFPLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxLQUFLLEVBQUUsRUFBRTtRQUMxQixPQUFPLFdBQVcsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUM1QixDQUFDLENBQUMsQ0FBQztBQUNMLENBQUM7QUFKRCw0REFJQztBQUVEOzs7O0dBSUc7QUFDSCxTQUFnQix3QkFBd0IsQ0FBQyxNQUFnQixFQUFFLFNBQWtCO0lBQzNFLE9BQU8sTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDLEtBQUssRUFBRSxFQUFFO1FBQzFCLE9BQU8sV0FBVyxDQUFDLEtBQUssRUFBRSxTQUFTLENBQUMsQ0FBQztJQUN2QyxDQUFDLENBQUMsQ0FBQztBQUNMLENBQUM7QUFKRCw0REFJQztBQUVELFNBQWdCLFdBQVcsQ0FBQyxHQUFXO0lBQ3JDLCtEQUErRDtJQUMvRCw0REFBNEQ7SUF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G5cbmZ1bmN0aW9uIHNoYTI1NihpbnB1dDogY3J5cHRvLkJpbmFyeUxpa2UpOiBCdWZmZXIge1xuICByZXR1cm4gY3J5cHRvLmNyZWF0ZUhhc2goJ3NoYTI1NicpLnVwZGF0ZShpbnB1dCkuZGlnZXN0KCk7XG59XG4iXX0= |
{ | ||
"name": "@bitgo/sdk-lib-mpc", | ||
"version": "8.12.0", | ||
"version": "8.13.0", | ||
"description": "library functions for BitGo's MPC solution", | ||
@@ -50,3 +50,4 @@ "main": "./dist/src/index.js", | ||
"nyc": "^15.0.0" | ||
} | ||
}, | ||
"gitHead": "f2ccfe835a393cc5b17c8c3d9fe5e5637a8d13eb" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10691610
84
4940
1
1