Paul Miller
|
6621053c7d
|
edwards: ensure Point.fromHex fails when x=0 and first x bit is 1. gh-40
|
2023-05-05 01:39:53 +02:00 |
|
Paul Miller
|
9bee88888f
|
weierstrass: improve return type of sign(). Clarify comments.
|
2023-05-03 18:28:35 +02:00 |
|
Paul Miller
|
63653255e1
|
ed448: rename to edwardsToMontgomeryPub
|
2023-04-23 20:29:17 +02:00 |
|
Paul Miller
|
895ee3a1a4
|
bls: refactor slightly
|
2023-04-23 20:29:03 +02:00 |
|
Paul Miller
|
16b31b9087
|
edwards: use bitmask instead of exp
|
2023-04-23 20:28:47 +02:00 |
|
Paul Miller
|
213796db4b
|
ed25519: rename to edwardsToMontgomeryPub
|
2023-04-23 20:28:28 +02:00 |
|
Mircea Nistor
|
88291eba33
|
ed25519: fix edwardsToMontgomery formula; implement edwardsToMontgomeryPriv; add tests
|
2023-04-20 13:37:21 +02:00 |
|
Paul Miller
|
972e549dde
|
bls: no bigint literals
|
2023-04-13 17:18:39 +02:00 |
|
Paul Miller
|
6316643f51
|
Rename bn to bn254
|
2023-04-12 04:33:32 +02:00 |
|
Paul Miller
|
71f6948612
|
Adjust readme and ed25519 docs
|
2023-04-12 04:16:47 +02:00 |
|
Paul Miller
|
d3d03ff115
|
README, bls
|
2023-04-12 04:10:59 +02:00 |
|
Paul Miller
|
123431de66
|
nist curves: rename from P256 to p256 for consistency
|
2023-04-10 21:04:16 +02:00 |
|
Paul Miller
|
30f7d78c82
|
hash-to-curve: update benchmarks, lint
|
2023-04-10 05:10:38 +02:00 |
|
Paul Miller
|
00665b21ab
|
htf: Prohibit expand: undefined . Closes gh-18
|
2023-04-10 05:02:36 +02:00 |
|
Paul Miller
|
851af4f1bc
|
weierstrass: adjust 1 line
|
2023-04-08 21:23:35 +02:00 |
|
Paul Miller
|
8beb922ded
|
weierstrass: improve DER decoding. Validate curve creation.
|
2023-04-07 06:09:46 +02:00 |
|
Paul Miller
|
fe380da8c9
|
edwards: change strict option to zip215
|
2023-04-02 18:35:34 +02:00 |
|
Paul Miller
|
113d906233
|
edwards: change API. Add options.strict, context. Add edwardsToMontgomery
|
2023-04-02 17:35:03 +02:00 |
|
Paul Miller
|
c15c964f77
|
Refactor BLS, change API
|
2023-04-02 16:38:03 +02:00 |
|
Paul Miller
|
d0c3bee4de
|
weierstrass, edwards: make points expose typescript x, y
|
2023-03-30 09:20:35 +02:00 |
|
Paul Miller
|
4244f97d38
|
bls: get rid of bigint literals. gh-22
|
2023-03-28 19:01:42 +02:00 |
|
Paul Miller
|
618508d32c
|
weierstrass, edwards: get rid of bigint literals. Closes gh-22
|
2023-03-28 19:01:00 +02:00 |
|
Paul Miller
|
3936449e7b
|
edwards: add toRawBytes to ts type
|
2023-03-26 15:54:04 +02:00 |
|
Paul Miller
|
e2411f7dfd
|
modular: add comment
|
2023-03-21 07:25:09 +01:00 |
|
Paul Miller
|
8fabc7ff06
|
All files: rename Fp to Field
|
2023-03-21 06:51:18 +01:00 |
|
Paul Miller
|
f3c21eb347
|
weierstrass: make weierstrassPoints fromBytes / toBytes optional
|
2023-03-21 05:51:10 +01:00 |
|
Paul Miller
|
a8b8192714
|
Add CURVE.p param
|
2023-03-21 03:06:06 +01:00 |
|
Paul Miller
|
fe68da61f6
|
Move stark curve to micro-starknet
|
2023-03-10 20:18:05 +01:00 |
|
Paul Miller
|
4b2d31ce7f
|
stark: more methods
|
2023-02-28 23:18:06 +04:00 |
|
Paul Miller
|
fa5105aef2
|
ecdsa: remove scalar blinding. CSPRNG dep not good: cryptofuzz, other envs will fail
|
2023-02-28 01:48:06 +04:00 |
|
Paul Miller
|
11f1626ecc
|
modular: Add comment. Add benchmark
|
2023-02-27 22:41:24 +04:00 |
|
Paul Miller
|
53ff287bf7
|
Schnorr: remove getExtendedPublicKey
|
2023-02-27 20:29:47 +04:00 |
|
Paul Miller
|
214c9aa553
|
secp256k1: Fix schnorrGetExtPubKey y coordinate
|
2023-02-27 20:20:13 +04:00 |
|
Paul Miller
|
e64a9d654c
|
Fix ristretto255 equals
|
2023-02-27 19:07:45 +04:00 |
|
Paul Miller
|
088edd0fbb
|
h2c: move params validation. add experimental hash_to_ristretto255
|
2023-02-27 15:07:24 +01:00 |
|
Paul Miller
|
3e90930e9d
|
Fix types
|
2023-02-26 19:10:50 +01:00 |
|
Paul Miller
|
9ee694ae23
|
docs updates
|
2023-02-26 19:05:40 +01:00 |
|
Paul Miller
|
6bc4b35cf4
|
hash-to-curve: speed-up os2ip, change code a bit
|
2023-02-26 18:55:30 +01:00 |
|
Paul Miller
|
d739297b2c
|
Move p192, p224 from main pkg to tests for now. Reason: not popular
|
2023-02-25 10:00:24 +01:00 |
|
Paul Miller
|
285aa6375d
|
stark: refactor
|
2023-02-20 16:50:29 +01:00 |
|
Paul Miller
|
d485d8b0e6
|
Fix prettier
|
2023-02-16 12:32:32 +01:00 |
|
Paul Miller
|
0fdd763dc7
|
montgomery: add randomPrivateKey. Add ecdh benchmark.
|
2023-02-16 12:32:18 +01:00 |
|
Paul Miller
|
8397241a8f
|
bls, stark: adjust methods
|
2023-02-16 00:03:20 +01:00 |
|
Paul Miller
|
001d0cc24a
|
weierstrass: rename method, adjust comments
|
2023-02-16 00:03:10 +01:00 |
|
Paul Miller
|
e1cb8549e8
|
weierstrass, montgomery, secp: add comments
|
2023-02-15 23:26:56 +01:00 |
|
Paul Miller
|
26ebb5dcce
|
x25519, x448: change param from a24 to a. Change Gu to bigint
|
2023-02-15 23:07:52 +01:00 |
|
Paul Miller
|
7073f63c6b
|
drbg: move from weierstrass to utils
|
2023-02-14 17:54:57 +01:00 |
|
Paul Miller
|
80966cbd03
|
hash-to-curve: more type checks. Rename method to createHasher
|
2023-02-14 17:39:56 +01:00 |
|
Paul Miller
|
98ea15dca4
|
edwards: improve hex errors
|
2023-02-14 17:35:19 +01:00 |
|
Paul Miller
|
e1910e85ea
|
mod, utils, weierstrass, secp: improve hex errors. secp: improve verify() logic and schnorr
|
2023-02-14 17:34:31 +01:00 |
|
Paul Miller
|
c36d90cae6
|
bump lockfile, add comment to shortw
|
2023-02-13 23:55:58 +01:00 |
|
Paul Miller
|
67b99652fc
|
BLS: add docs
|
2023-02-12 22:25:36 +01:00 |
|
Paul Miller
|
c0877ba69a
|
Fix weierstrass type
|
2023-02-09 23:18:32 +01:00 |
|
Paul Miller
|
1b6071cabd
|
weierstrass: rename normPrivKey util. tests: prepare for unification w old noble pkg
|
2023-02-09 20:26:20 +01:00 |
|
Paul Miller
|
d2c6459756
|
Update wnaf comments
|
2023-02-09 15:45:21 +01:00 |
|
Paul Miller
|
00b73b68d3
|
hash-to-curve small refactor
|
2023-02-06 20:50:52 +01:00 |
|
Paul Miller
|
823149ecd9
|
Clarify comment
|
2023-01-30 08:17:08 +01:00 |
|
Paul Miller
|
e57aec63d8
|
Fix edwards assertValidity
|
2023-01-30 08:04:36 +01:00 |
|
Paul Miller
|
837aca98c9
|
Fix bugs
|
2023-01-30 06:10:56 +01:00 |
|
Paul Miller
|
dbb16b0e5e
|
edwards: add assertValidity
|
2023-01-30 06:10:08 +01:00 |
|
Paul Miller
|
e14af67254
|
utils: fix hexToNumber, improve validateObject
|
2023-01-30 06:07:53 +01:00 |
|
Paul Miller
|
4780850748
|
montgomery: fix fieldLen
|
2023-01-30 05:56:07 +01:00 |
|
Paul Miller
|
ceffbc69da
|
More Schnorr utils
|
2023-01-29 04:46:38 +01:00 |
|
Paul Miller
|
c75129e629
|
Use declarative curve field validation
|
2023-01-28 03:19:46 +01:00 |
|
Paul Miller
|
f39fb80c52
|
weierstrass: rename normalizePrivateKey to allowedPrivateKeyLengths
|
2023-01-27 23:45:55 +01:00 |
|
Paul Miller
|
ed9bf89038
|
stark: isCompressed=false. Update benchmarks
|
2023-01-27 03:43:18 +01:00 |
|
Paul Miller
|
02b0b25147
|
New schnorr exports. Simplify RFC6979 k gen, privkey checks
|
2023-01-26 08:16:00 +01:00 |
|
Paul Miller
|
4ef2cad685
|
hash-to-curve: assertValidity
|
2023-01-26 06:14:12 +01:00 |
|
Paul Miller
|
69b3ab5a57
|
Shuffle code
|
2023-01-26 05:46:14 +01:00 |
|
Paul Miller
|
9465e60d30
|
More refactoring
|
2023-01-26 05:24:41 +01:00 |
|
Paul Miller
|
0fb78b7097
|
Rename group to curve. More refactoring
|
2023-01-26 04:14:21 +01:00 |
|
Paul Miller
|
be0b2a32a5
|
Fp rename. Edwards refactor. Weierstrass Fn instead of mod
|
2023-01-26 03:07:45 +01:00 |
|
Paul Miller
|
c46914f1bc
|
weierstrass: remove most private utils
|
2023-01-25 08:21:48 +01:00 |
|
Paul Miller
|
f250f355e8
|
Schnorr: remove all private methods
|
2023-01-25 08:14:53 +01:00 |
|
Paul Miller
|
c095d74673
|
More schnorr updates
|
2023-01-25 08:10:05 +01:00 |
|
Paul Miller
|
ac52fea952
|
Another schnorr adjustment
|
2023-01-25 07:55:21 +01:00 |
|
Paul Miller
|
f2ee24bee4
|
schnorr: remove packSig
|
2023-01-25 07:54:00 +01:00 |
|
Paul Miller
|
cffea91061
|
Schnorr, weierstrass: refactor
|
2023-01-25 07:48:53 +01:00 |
|
Paul Miller
|
5fc38fc0e7
|
weierstrass: prehash option in sign/verify. Remove _normalizePublicKey
|
2023-01-25 05:45:49 +01:00 |
|
Paul Miller
|
849dc38f3c
|
Change TypeError to Error
|
2023-01-25 05:24:22 +01:00 |
|
Paul Miller
|
0422e6ef38
|
p.x, p.y are now getters executing toAffine()
|
2023-01-25 04:51:08 +01:00 |
|
Paul Miller
|
21d2438a33
|
BLS: fix tests. Poseidon: more tests
|
2023-01-25 00:30:53 +01:00 |
|
Paul Miller
|
f14b8d2be5
|
More AffinePoint fixes
|
2023-01-25 00:07:25 +01:00 |
|
Paul Miller
|
2ed27da8eb
|
weierstrass: remove affine Point
|
2023-01-24 06:42:44 +01:00 |
|
Paul Miller
|
17e5be5f1b
|
edwards: affine Point removal tests
|
2023-01-24 05:37:53 +01:00 |
|
Paul Miller
|
a49f0d266e
|
edwards: remove affine Point, Signature. Stricter types
|
2023-01-24 05:34:56 +01:00 |
|
Paul Miller
|
7fda6de619
|
weierstrass: make points compressed by def. Rewrite drbg, k generation.
|
2023-01-24 04:02:38 +01:00 |
|
Paul Miller
|
2b908ad602
|
edwards: simplify bounds check
|
2023-01-24 04:01:28 +01:00 |
|
Paul Miller
|
ceb3f67faa
|
stark: switch to new weierstrass methods
|
2023-01-23 23:07:21 +01:00 |
|
Paul Miller
|
a2c87f9c2f
|
weierstrass: simplify bits2int, remove truncateHash
|
2023-01-23 23:06:43 +01:00 |
|
Paul Miller
|
e1fd346279
|
utils: small improvements
|
2023-01-23 23:06:24 +01:00 |
|
Paul Miller
|
11e78aadbf
|
Edwards: prohibit number scalars, only allow bigints
|
2023-01-23 20:28:01 +01:00 |
|
Paul Miller
|
055147f1be
|
Add poseidon252 snark-friendly hash
|
2023-01-23 19:41:19 +01:00 |
|
Paul Miller
|
6f99f6042e
|
weierstrass: bits2int, int2octets, truncateHash now comply with standard
|
2023-01-21 19:03:39 +01:00 |
|
Paul Miller
|
40530eae0c
|
hash-to-curve: decrease coupling, improve tree shaking support
|
2023-01-21 19:02:46 +01:00 |
|
Paul Miller
|
5312d92b2c
|
edwards: Fix isTorsionFree()
|
2023-01-13 15:58:04 +01:00 |
|
Paul Miller
|
2d37edf7d1
|
Remove utils.mod(), utils.invert()
|
2023-01-13 01:26:00 +01:00 |
|
Paul Miller
|
36998fede8
|
Fix sqrt
|
2023-01-13 01:21:51 +01:00 |
|
Paul Miller
|
83960d445d
|
Refactor: weierstrass assertValidity and others
|
2023-01-12 21:18:51 +01:00 |
|
Paul Miller
|
23cc2aa5d1
|
edwards, montgomery, weierstrass: refactor
|
2023-01-12 20:40:16 +01:00 |
|