Paul Miller
008958364e
weierstrass: reformat after new prettier
2023-12-10 22:58:13 +01:00
Paul Miller
2f1460a4d7
BLS: Refactor mask-bit settings, improve encoding resiliency
2023-11-10 02:55:16 +01:00
Eric Ho
02099b9b4c
Add weierstrassPoints return type
2023-10-11 19:16:56 +01:00
Eric Ho
3b14683806
Update weierstrass.ts
2023-10-11 18:41:11 +01:00
Paul Miller
2da6abb336
Fix x448 private keys: must be 56 bytes, not 57. Reported by @larabr
2023-10-03 01:15:43 +02:00
Paul Miller
4752ab1f1e
utils: optimize hexToBytes by 4%
2023-09-25 20:22:57 +02:00
Paul Miller
f58002e6d4
utils: refactor hexToBytes a bit
2023-09-25 19:21:18 +02:00
Nicholas Dudfield
08850c2d6a
feat: impl Group<X> for X in DecafPoint/RistrettoPoint
2023-09-20 16:23:41 +07:00
Paul Miller
ce7a8fda55
bls, bn: clarify their security level in comments
2023-09-14 03:02:10 +02:00
Paul Miller
c935b398fe
abstract/utils: reformat hexToBytes.
2023-09-13 23:57:34 +02:00
arobsn
1d83bab27d
add char code based hexToBytes function
2023-09-13 18:14:13 -03:00
Paul Miller
77bee0d54e
ed448: clarify why there are 56 or 57 byte keys
2023-09-10 03:00:51 +02:00
Jack Lloyd
156a1e909a
Fix ShortSignature.fromHex to check the G1 point is valid
2023-08-31 13:28:53 -04:00
Paul Miller
cf5f2268fb
ed448: add todo comment
2023-08-27 18:49:55 +02:00
Paul Miller
e31efd91d8
Merge pull request #74 from randombit/jack/add-short-signatures
...
Add verification of BLS short signatures
2023-08-26 00:50:42 +02:00
Jack Lloyd
c5e0e070d1
Complete BLS short signature support
2023-08-24 16:38:12 -04:00
Paul Miller
925fc3f810
modular: adjust getFieldsBytseLength
2023-08-23 19:43:55 +02:00
Paul Miller
eb8e7ec964
hash-to-curve, weierstrass, bls, ed: upgrade h2c comments to rfc 9380
2023-08-23 19:43:14 +02:00
Paul Miller
e7ac5e85d3
poseidon: refactor params
2023-08-21 18:16:40 +02:00
Paul Miller
d285fcce06
modular: Document FpPow
2023-08-21 17:52:21 +02:00
Paul Miller
ef667bb404
poseidon: refactor validateOpts, fix tests
2023-08-21 17:48:34 +02:00
Paul Miller
62749382e7
poseidon: remove default sboxPower: 5
2023-08-21 17:04:58 +02:00
Paul Miller
f90e871725
weierstrass: prohibit (0, 0, 0) in assertValidity
2023-08-21 16:05:53 +02:00
Paul Miller
f049398718
modular: bring back 1.1.0 hashToPrivateScalar for clean diff
2023-08-18 23:14:08 +02:00
Paul Miller
ca99179bd8
bls, modular: lint
2023-08-18 23:09:53 +02:00
Paul Miller
1545230ee5
modular, weierstrass, bls: use new mapHashToField
2023-08-18 23:08:46 +02:00
Jack Lloyd
b082d41c29
Add verification of BLS short signatures
2023-08-18 15:36:17 -04:00
Paul Miller
e8b9509c16
abstract/modular: add more comments everywhere
2023-08-11 12:23:52 +02:00
Paul Miller
05794c0283
weierstrass, bls: improve randomPrivateKey security and decrease bias
2023-08-11 12:22:37 +02:00
Paul Miller
ca5583f713
ed25519, ed448: rename hash_to_ristretto to hashToRistretto. And decaf
2023-08-10 20:01:13 +02:00
Paul Miller
8c48abe16a
Lint
2023-08-08 15:43:31 +02:00
Paul Miller
08bb00cc8f
poseidon: prohibit sBoxPower other than 3, 5, 7
2023-08-08 15:43:14 +02:00
Paul Miller
dba2f0e732
lint
2023-07-12 23:58:30 +02:00
Paul Miller
52c5df0264
utils: add PURE flag
2023-07-12 20:28:45 +02:00
Paul Miller
ebea4a4bcd
weierstrass, bls12-381: adjust var names for typescript flag
2023-07-12 20:28:38 +02:00
steveluscher
413725cfb3
Add pure annotation to all calls to twistedEdwards
...
This PR makes it so that if you only use _one_ export:
```ts
import { ed25519 } from '@noble/curves`;
```
…then only the `twistedEdwards` call that constructs that export will remain after bundling and tree-shaking.
Before this change, the compiled bundle contains all the code that constructs `ed25519ph` and `ed25519ctx` remains.
```js
var ed25519 = twistedEdwards(ed25519Defaults);
function ed25519_domain(data, ctx, phflag) {
if (ctx.length > 255)
throw new Error("Context is too big");
return concatBytes(utf8ToBytes("SigEd25519 no Ed25519 collisions"), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);
}
twistedEdwards({ ...ed25519Defaults, domain: ed25519_domain });
twistedEdwards({
...ed25519Defaults,
domain: ed25519_domain,
prehash: sha512
});
```
```js
var ed25519 = twistedEdwards(ed25519Defaults);
```
2023-06-30 17:36:16 +00:00
Paul Miller
309d29a084
Merge pull request #56 from CoinSpace/extraentropy
...
fix: check extraEntropy according to the spec
2023-06-28 14:44:56 +02:00
Evgeny Vlasenko
d3aa051770
feat: tests for extraEntropy
2023-06-28 16:12:44 +04:00
Paul Miller
af8c1eebee
Merge pull request #59 from stknob/decaf448
...
Add decaf448
2023-06-27 00:32:53 +02:00
Stefan Knoblich
e3a4bbffe9
Add decaf448
...
Based on draft-irtf-cfrg-ristretto255-decaf448-07,
draft-irtf-cfrg-hash-to-curve-16 and the ristretto255 implementation.
Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
2023-06-26 22:48:48 +02:00
Nicholas Dudfield
bf70ba9776
fix: validate hash_to_field DST as stringOrUint8Array ( closes #57 )
2023-06-22 07:19:08 +07:00
Evgeny Vlasenko
c71920722c
fix: check extraEntropy according to the spec
2023-06-16 19:43:12 +04:00
Paul Miller
b281167e8d
Fix utf8ToBytes in firefox extension context
2023-06-02 15:57:46 +02:00
Paul Miller
c6b4aadafb
utils: harmonize with noble-hashes
2023-06-02 15:35:37 +02:00
Paul Miller
ff5b231e31
secp256k1 & other implementations: reduce bundle size by 20% by using PURE.
...
PURE annotation helps bundlers during tree-shaking and eliminates dead code.
* secp256k1: 75.4kb => 62.3kb
* ed25519: 67.5kb => 51.1kb
* ed448: 55.1kb => 44.0kb
* p256: 67.8kb => 59.8kb
* p384: 75.4kb => 67.4kb
* p521: 75.8kb => 67.8kb
2023-05-20 10:49:50 +02:00
Paul Miller
624d7c9910
Merge pull request #46 from sublimator/nd-sort-few-typos-things-editor-nagging-about-2023-05-09
...
docs(modular): sort few typos/things editor nagging about
2023-05-09 18:01:35 +02:00
Nicholas Dudfield
665ef2dd93
docs(modular): sort few typos/things editor nagging about
2023-05-09 07:35:33 +07:00
Paul Miller
90e87f7ab1
weierstrass: adjust SWUFpSqrtRatio to not use exp operator
2023-05-06 14:38:53 +02:00
Nicholas Dudfield
554c94509e
ed25519: fix ristrettoHash size typo in hashToCurve
2023-05-05 18:17:40 +07:00
Paul Miller
42de620010
edwards: make zip215 false Strongly Binding Signature (SBS) secure. gh-40
2023-05-05 03:37:13 +02:00