From 44fd73a75afa82ec3888a833c12d5cf10c543ad7 Mon Sep 17 00:00:00 2001 From: Fabio Moretti Date: Mon, 22 Feb 2021 13:43:56 +0100 Subject: [PATCH] Add support for secp160r1 courve In addition to change in bn.js PR: https://github.com/indutny/bn.js/pull/267 --- lib/elliptic/curves.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/elliptic/curves.js b/lib/elliptic/curves.js index 6c36e037..f4250609 100644 --- a/lib/elliptic/curves.js +++ b/lib/elliptic/curves.js @@ -204,3 +204,20 @@ defineCurve('secp256k1', { pre, ], }); + +defineCurve('secp160r1', { + type: 'short', + prime: 'r160', + p: 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF', + a: 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC', + b: '1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45', + n: '0100000000000000000001F4C8F927AED3CA752257', + h: '1', + hash: hash.sha256, + + gRed: false, + g: [ + '4A96B5688EF573284664698968C38BB913CBFC82', + '23A628553168947D59DCC912042351377AC5FB32', + ], +});