Skip to content

Commit b20fb0d

Browse files
committed
readme
1 parent d524bf6 commit b20fb0d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ const msg = new TextEncoder().encode('hello');
146146
const sig = ed25519.sign(msg, priv);
147147
ed25519.verify(sig, msg, pub); // Default mode: follows ZIP215
148148
ed25519.verify(sig, msg, pub, { zip215: false }); // RFC8032 / FIPS 186-5
149+
150+
// Variants from RFC8032: with context, prehashed
151+
import { ed25519ctx, ed25519ph } from '@noble/curves/ed25519';
149152
```
150153

151154
Default `verify` behavior follows [ZIP215](https://zips.z.cash/zip-0215) and
@@ -158,9 +161,6 @@ and additionally provides [non-repudiation with SBS](#edwards-twisted-edwards-cu
158161
X25519 follows [RFC7748](https://www.rfc-editor.org/rfc/rfc7748).
159162

160163
```ts
161-
// Variants from RFC8032: with context, prehashed
162-
import { ed25519ctx, ed25519ph } from '@noble/curves/ed25519';
163-
164164
// ECDH using curve25519 aka x25519
165165
import { x25519 } from '@noble/curves/ed25519';
166166
const priv = 'a546e36bf0527c9d3b16154b82465edd62144c0ac1fc5a18506a2244ba449ac4';
@@ -249,8 +249,6 @@ DecafPoint.hashToCurve(shake256(msg, { dkLen: 112 }));
249249
hashToDecaf448(msg, { DST: 'decaf448_XOF:SHAKE256_D448MAP_RO_' });
250250
```
251251

252-
Same RFC7748 / RFC8032 / IRTF draft are followed.
253-
254252
#### bls12-381
255253

256254
```ts

0 commit comments

Comments
 (0)