Skip to content

Commit c38e57d

Browse files
committed
readme
1 parent 059ef9e commit c38e57d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ Fastest 5KB JS implementation of secp256k1 signatures & ECDH.
1010
- 🔒 Supports [hedged signatures](https://paulmillr.com/posts/deterministic-signatures/) guarding against fault attacks
1111
- 🪶 4.94KB (gzipped, elliptic.js is 10x larger, tiny-secp256k1 is 25x larger)
1212

13-
The module is a sister project of [noble-curves](https://github.com/paulmillr/noble-curves),
14-
focusing on smaller attack surface & better auditability.
15-
Curves are drop-in replacement and have more features:
16-
MSM, DER encoding, endomorphism, prehashing, custom point precomputes, hash-to-curve, oprf.
17-
To upgrade from earlier version, see [Upgrading](#upgrading).
13+
The module is a sister project of [noble-curves](https://github.com/paulmillr/noble-curves).
14+
Use noble-secp256k1 if you need smaller attack surface & better auditability.
15+
Switch to noble-curves (drop-in) if you need features like MSM, DER encoding, custom point precomputes.
1816

1917
898-byte version of the library is available for learning purposes in `test/misc/1kb.min.js`,
2018
it was created for the article [Learning fast elliptic-curve cryptography](https://paulmillr.com/posts/noble-secp256k1-fast-ecc/).
@@ -81,6 +79,9 @@ secp.hashes.sha256 = sha256;
8179

8280
### React Native: polyfill getRandomValues and sha256
8381

82+
React Native does not provide secure getRandomValues by default.
83+
This can't be securely polyfilled from our end, so one will need a RN-specific compile-time dep.
84+
8485
```ts
8586
import 'react-native-get-random-values';
8687
import { hmac } from '@noble/hashes/hmac.js';
@@ -373,8 +374,8 @@ v3 brings the package closer to noble-curves v2.
373374

374375
```js
375376
// before
376-
// etc.hmacSha256Sync = (key, ...messages) => hmac(sha256, key, etc.concatBytes(...messages));
377-
// etc.hmacSha256Async = (key, ...messages) => Promise.resolve(etc.hmacSha256Sync(key, ...messages));
377+
etc.hmacSha256Sync = (key, ...messages) => hmac(sha256, key, etc.concatBytes(...messages));
378+
etc.hmacSha256Async = (key, ...messages) => Promise.resolve(etc.hmacSha256Sync(key, ...messages));
378379
// after
379380
hashes.hmacSha256 = (key, msg) => hmac(sha256, key, msg);
380381
hashes.sha256 = sha256;

0 commit comments

Comments
 (0)