344 Commits
Author SHA1 Message Date
zeekay 948c36e3b0 add the licence this fork inherits
This repository was public with no LICENSE file. It is a fork, so the grant is
the upstream's: MIT, with the upstream copyright retained as MIT requires.
2026-08-20 10:34:43 -07:00
zeekayandHanzo Dev 4e83bca557 ci: canonical pair — hanzo.yml + forge caller
github.com has no runner for hanzo-build-linux-amd64, so a caller under
.github/workflows is a gate that can never be scheduled. This is the ~7-line
caller on the plane that can (git.hanzo.ai git-runner fleet), pinned @v1.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-06 02:35:40 -07:00
Fedor Indutny 7b86a52e65 6.6.1 v6.6.1 2024-11-12 19:39:30 -08:00
Nikita SkovorodaandGitHub 33e82b60d4 Merge commit from fork 2024-11-12 19:38:49 -08:00
Fedor Indutny 3613d015ae 6.6.0 v6.6.0 2024-10-25 20:13:25 -07:00
Fedor IndutnyandGitHub 594982a992 fix: signature verification due to leading zeros
According to FIPS 186-5, section 6.4.2 ECDSA Signature
Verification Algorithm, the hash of the message must be adjusted
based on the order n of the base point of the elliptic curve:

    If log2(n) ≥ hashlen, set E = H. Otherwise, set E equal to
    the leftmost log2(n) bits of H.

Unfortunately because elliptic converts messages to BN instances the
reported `byteLength()` for the message can be incorrect if the message
has 8 or more leading zero bits.

Here we fix it by:

1. Counting leading zeroes in hex strings provided as messages
2. Counting all array entries in Array-like (e.g. Buffer)
   messages
3. Providing an `msgBitLength` option to both `.sign`/`.verify` to let
   user override the behavior

Original PR: https://github.com/indutny/elliptic/pull/322
Credit: @Markus-MS
2024-10-25 20:13:12 -07:00
Fedor Indutny a50121db0b 6.5.7 v6.5.7 2024-08-13 19:22:19 -07:00
Markus SchiffermüllerandGitHub 83869005e9 lib: DER signature decoding correction 2024-08-13 19:21:52 -07:00
Fedor Indutny be25de886a 6.5.6 v6.5.6 2024-07-16 19:23:47 -07:00
Markus-MSandGitHub 55d6003bd4 Merge commit from fork 2024-07-16 19:22:53 -07:00
Fedor Indutny 91ef5c9e7d 6.5.5 v6.5.5 2024-03-04 23:21:45 -08:00
Fedor Indutny 751124f110 lib: lint 2024-03-04 23:21:33 -08:00
Jordan HarbandandGitHub 0665d1ef54 [Fix] restore node < 4 compat
Fixes #314.
2024-03-04 23:20:28 -08:00
Fedor Indutny b404e659af 6.5.4 v6.5.4 2021-02-02 10:21:02 -08:00
Fedor Indutny b9a39e0254 package: bump deps 2021-02-02 10:20:50 -08:00
Kyle Den HartogandFedor Indutny af0dd72eb9 ec: validate that a point before deriving keys
This update checks to make sure that the public key passed in to
ECDH is a point that actually exists on the curve. This is
important to prevent a twist attack that can be used to reveal
the private key of a party in an ECDH operation over a number of
occurances.

For more details on the attack see this blog post:
https://github.com/christianlundkvist/blog/blob/master/2020_05_26_secp256k1_twist_attacks/secp256k1_twist_attacks.md

CVE: CVE-2020-28498
2021-02-02 10:19:43 -08:00
Fedor Indutny ccc7030b86 lib: relint using eslint 2020-08-02 08:33:08 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a60dd10e4f build(deps): bump elliptic from 6.4.1 to 6.5.3 (#231)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.4.1 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.4.1...v6.5.3)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-02 08:13:57 -07:00
Fedor Indutny 8647803dc3 6.5.3 v6.5.3 2020-06-18 08:29:42 -07:00
Fedor Indutny 856fe4d99f signature: prevent malleability and overflows 2020-06-18 08:29:21 -07:00
Fedor Indutny 60489415e5 6.5.2 v6.5.2 2019-11-22 11:06:54 -08:00
Fedor Indutny 9984964457 package: bump dependencies 2019-11-22 11:06:40 -08:00
Fedor Indutny ec735edde1 utils: leak less information in getNAF() 2019-11-22 11:01:25 -08:00
Fedor Indutny 71e4e8e2f5 6.5.1 v6.5.1 2019-09-03 19:34:13 -07:00
Benjamin DiamondandFedor Indutny 7ec66ffa25 short: add infinity check before multiplying 2019-09-03 19:33:44 -07:00
Fedor Indutny ee7970b92f travis: really move on 2019-06-25 21:15:14 -07:00
Fedor Indutny 637d0216b5 travis: move on 2019-06-25 21:09:59 -07:00
Fedor Indutny 5ed0babb64 package: update deps 2019-06-25 21:07:15 -07:00
Fedor Indutny 475f066aeb 6.5.0 v6.5.0 2019-06-25 21:03:32 -07:00
Fedor Indutny 271fd34231 package: add package-lock.json 2019-06-25 21:03:18 -07:00
Thomas WangandFedor Indutny dbe8bc6c14 lib: avoid circular dependency 2019-06-25 21:02:31 -07:00
Fedor Indutny 523da1cf71 6.4.1 v6.4.1 2018-08-08 23:57:54 -04:00
Gaurav NarulaandFedor Indutny 776c9b0e99 edwards: fixes for other values of c 2018-02-02 14:27:47 -05:00
Gaurav NarulaandFedor Indutny 1149e65e18 edwards: fix doubling/isInfinity 2018-01-29 18:39:07 -05:00
David LakataandFedor Indutny fc8f0ee115 lib: remove unreachable code 2017-09-27 15:25:47 -04:00
Seth GibelyouandFedor Indutny 8628295cde readme: update example
Make it more clear that signing should be done on
the hash of a message rather than on a message directly.
2017-03-23 22:59:06 +01:00
Fedor Indutny 6b0d2b76ca 6.4.0 v6.4.0 2017-02-22 16:27:27 -05:00
Fedor Indutny efd560f8de lib: split in modules 2017-02-22 16:27:06 -05:00
Fedor Indutny 63aee8d697 6.3.3 v6.3.3 2017-02-06 18:13:21 -05:00
Fedor Indutny 2f2c73b69d package: install missing dependency 2017-02-06 18:13:11 -05:00
oberienandFedor Indutny 26a0e25df9 key: error when only either x or y are provided
PR-URL: https://github.com/indutny/elliptic/pull/112
Reviewed-By: Fedor Indutny <[email protected]>
2017-02-06 18:12:11 -05:00
Kirill FomichevandFedor Indutny 198a9fea76 doc: add extra example for ECDH 2017-01-27 11:08:31 -05:00
oberienandFedor Indutny 79e2f37697 curves: Set b to 1 for curve25519
The montgomery parameters for curve25519 define b to be 1. Even though
this library doesn't use it for calculations, for consistency reasons
setting it to the standartized value improves readability. Also using it
in calculations outside of the library it resulted in problems and
errors, which will be fixed with this change.
2016-12-27 17:26:19 -05:00
Fedor Indutny cbace4683a 6.3.2 v6.3.2 2016-09-15 13:10:12 +02:00
Kirill FomichevandFedor Indutny f3edfe59c7 ec: speedup ec.recoverPubKey
PR-URL: https://github.com/indutny/elliptic/pull/104
Reviewed-By: Fedor Indutny <[email protected]>
2016-09-15 13:09:53 +02:00
Marco LovatoandFedor Indutny ab93810e14 readme: make the example complete 2016-08-24 16:15:36 +02:00
Fedor Indutny c53f5cf3d8 6.3.1 v6.3.1 2016-06-14 12:23:16 -04:00
Fedor Indutny 725bd91762 curve: remove _maxwellAdjust
See: https://git.io/vo8mB
2016-06-14 12:22:45 -04:00
Fedor Indutny e102a69665 curves: optimize Maxwell's trick 2016-06-14 00:44:33 -04:00
Fedor Indutny 7b1c732b23 6.3.0 v6.3.0 2016-06-14 00:17:02 -04:00