@mnemom/mnemom 0.17.37 → 0.17.38-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/commands/agent-doctor.d.ts +2 -2
  2. package/dist/commands/agent-doctor.js +4 -4
  3. package/dist/commands/agent-run.d.ts +11 -0
  4. package/dist/commands/agent-run.js +37 -0
  5. package/dist/commands/agent-setup.d.ts +11 -9
  6. package/dist/commands/agent-setup.js +24 -19
  7. package/dist/commands/agent-share-render.d.ts +5 -5
  8. package/dist/commands/agent-share-render.js +9 -7
  9. package/dist/commands/agent-share-test-issuer.d.ts +1 -1
  10. package/dist/commands/agent-share-test-issuer.js +1 -1
  11. package/dist/commands/agent.d.ts +8 -1
  12. package/dist/commands/agent.js +14 -3
  13. package/dist/commands/card.js +1 -1
  14. package/dist/commands/onboard.js +5 -4
  15. package/dist/commands/scan.d.ts +35 -8
  16. package/dist/commands/scan.js +134 -45
  17. package/dist/commands/verify-card.d.ts +25 -1
  18. package/dist/commands/verify-card.js +29 -2
  19. package/dist/commands/wrap.js +4 -3
  20. package/dist/index.js +8 -6
  21. package/dist/lib/commit-report.d.ts +7 -13
  22. package/dist/lib/commit-report.js +12 -5
  23. package/dist/lib/conduct-receipt.d.ts +8 -3
  24. package/dist/lib/conduct-receipt.js +29 -7
  25. package/dist/lib/experimental.d.ts +1 -1
  26. package/dist/lib/experimental.js +1 -12
  27. package/dist/lib/runner/executor-client.d.ts +5 -0
  28. package/dist/lib/runner/executor-client.js +8 -0
  29. package/dist/lib/runner/job.d.ts +37 -0
  30. package/dist/lib/runner/job.js +74 -1
  31. package/dist/lib/runner/phases.d.ts +7 -2
  32. package/dist/lib/runner/phases.js +7 -2
  33. package/dist/lib/runner/proxy.d.ts +26 -2
  34. package/dist/lib/runner/proxy.js +33 -1
  35. package/dist/lib/runner/record-commit.d.ts +16 -0
  36. package/dist/lib/runner/record-commit.js +7 -0
  37. package/dist/lib/scan/report-email.d.ts +19 -2
  38. package/dist/lib/scan/report-email.js +78 -22
  39. package/dist/lib/scan/scan.d.ts +2 -0
  40. package/dist/lib/scan/scan.js +2 -1
  41. package/dist/lib/scan/share.d.ts +8 -6
  42. package/dist/lib/scan/share.js +28 -11
  43. package/dist/lib/scan/spend/anthropic-usage.d.ts +20 -1
  44. package/dist/lib/scan/spend/anthropic-usage.js +32 -7
  45. package/dist/lib/scan/spend/anthropic-wif.d.ts +42 -0
  46. package/dist/lib/scan/spend/anthropic-wif.js +153 -0
  47. package/dist/lib/starter-integrity.d.ts +20 -0
  48. package/dist/lib/starter-integrity.js +28 -0
  49. package/package.json +2 -5
  50. package/node_modules/@mnemom/aip-verifier/LICENSE +0 -190
  51. package/node_modules/@mnemom/aip-verifier/dist/claim-lint-CVITIRcU.d.cts +0 -478
  52. package/node_modules/@mnemom/aip-verifier/dist/claim-lint-CVITIRcU.d.ts +0 -478
  53. package/node_modules/@mnemom/aip-verifier/dist/index.cjs +0 -971
  54. package/node_modules/@mnemom/aip-verifier/dist/index.cjs.map +0 -1
  55. package/node_modules/@mnemom/aip-verifier/dist/index.d.cts +0 -330
  56. package/node_modules/@mnemom/aip-verifier/dist/index.d.ts +0 -330
  57. package/node_modules/@mnemom/aip-verifier/dist/index.js +0 -933
  58. package/node_modules/@mnemom/aip-verifier/dist/index.js.map +0 -1
  59. package/node_modules/@mnemom/aip-verifier/dist/render-lines.cjs +0 -879
  60. package/node_modules/@mnemom/aip-verifier/dist/render-lines.cjs.map +0 -1
  61. package/node_modules/@mnemom/aip-verifier/dist/render-lines.d.cts +0 -96
  62. package/node_modules/@mnemom/aip-verifier/dist/render-lines.d.ts +0 -96
  63. package/node_modules/@mnemom/aip-verifier/dist/render-lines.js +0 -875
  64. package/node_modules/@mnemom/aip-verifier/dist/render-lines.js.map +0 -1
  65. package/node_modules/@mnemom/aip-verifier/package.json +0 -86
  66. package/node_modules/@noble/ed25519/LICENSE +0 -21
  67. package/node_modules/@noble/ed25519/README.md +0 -371
  68. package/node_modules/@noble/ed25519/index.d.ts +0 -391
  69. package/node_modules/@noble/ed25519/index.js +0 -933
  70. package/node_modules/@noble/ed25519/index.ts +0 -1134
  71. package/node_modules/@noble/ed25519/package.json +0 -54
  72. package/node_modules/@noble/hashes/LICENSE +0 -21
  73. package/node_modules/@noble/hashes/README.md +0 -478
  74. package/node_modules/@noble/hashes/_blake.d.ts +0 -20
  75. package/node_modules/@noble/hashes/_blake.js +0 -59
  76. package/node_modules/@noble/hashes/_md.d.ts +0 -95
  77. package/node_modules/@noble/hashes/_md.js +0 -209
  78. package/node_modules/@noble/hashes/_u64.d.ts +0 -36
  79. package/node_modules/@noble/hashes/_u64.js +0 -77
  80. package/node_modules/@noble/hashes/argon2.d.ts +0 -148
  81. package/node_modules/@noble/hashes/argon2.js +0 -577
  82. package/node_modules/@noble/hashes/blake1.d.ts +0 -162
  83. package/node_modules/@noble/hashes/blake1.js +0 -630
  84. package/node_modules/@noble/hashes/blake2.d.ts +0 -203
  85. package/node_modules/@noble/hashes/blake2.js +0 -573
  86. package/node_modules/@noble/hashes/blake3.d.ts +0 -68
  87. package/node_modules/@noble/hashes/blake3.js +0 -310
  88. package/node_modules/@noble/hashes/eskdf.d.ts +0 -91
  89. package/node_modules/@noble/hashes/eskdf.js +0 -225
  90. package/node_modules/@noble/hashes/hkdf.d.ts +0 -70
  91. package/node_modules/@noble/hashes/hkdf.js +0 -152
  92. package/node_modules/@noble/hashes/hmac.d.ts +0 -50
  93. package/node_modules/@noble/hashes/hmac.js +0 -93
  94. package/node_modules/@noble/hashes/index.d.ts +0 -1
  95. package/node_modules/@noble/hashes/index.js +0 -34
  96. package/node_modules/@noble/hashes/legacy.d.ts +0 -107
  97. package/node_modules/@noble/hashes/legacy.js +0 -348
  98. package/node_modules/@noble/hashes/package.json +0 -91
  99. package/node_modules/@noble/hashes/pbkdf2.d.ts +0 -66
  100. package/node_modules/@noble/hashes/pbkdf2.js +0 -176
  101. package/node_modules/@noble/hashes/scrypt.d.ts +0 -98
  102. package/node_modules/@noble/hashes/scrypt.js +0 -304
  103. package/node_modules/@noble/hashes/sha2.d.ts +0 -176
  104. package/node_modules/@noble/hashes/sha2.js +0 -446
  105. package/node_modules/@noble/hashes/sha3-addons.d.ts +0 -533
  106. package/node_modules/@noble/hashes/sha3-addons.js +0 -973
  107. package/node_modules/@noble/hashes/sha3.d.ts +0 -208
  108. package/node_modules/@noble/hashes/sha3.js +0 -475
  109. package/node_modules/@noble/hashes/src/_blake.ts +0 -67
  110. package/node_modules/@noble/hashes/src/_md.ts +0 -227
  111. package/node_modules/@noble/hashes/src/_u64.ts +0 -111
  112. package/node_modules/@noble/hashes/src/argon2.ts +0 -693
  113. package/node_modules/@noble/hashes/src/blake1.ts +0 -677
  114. package/node_modules/@noble/hashes/src/blake2.ts +0 -648
  115. package/node_modules/@noble/hashes/src/blake3.ts +0 -344
  116. package/node_modules/@noble/hashes/src/eskdf.ts +0 -265
  117. package/node_modules/@noble/hashes/src/hkdf.ts +0 -161
  118. package/node_modules/@noble/hashes/src/hmac.ts +0 -130
  119. package/node_modules/@noble/hashes/src/index.ts +0 -33
  120. package/node_modules/@noble/hashes/src/legacy.ts +0 -361
  121. package/node_modules/@noble/hashes/src/pbkdf2.ts +0 -219
  122. package/node_modules/@noble/hashes/src/scrypt.ts +0 -375
  123. package/node_modules/@noble/hashes/src/sha2.ts +0 -486
  124. package/node_modules/@noble/hashes/src/sha3-addons.ts +0 -1157
  125. package/node_modules/@noble/hashes/src/sha3.ts +0 -525
  126. package/node_modules/@noble/hashes/src/utils.ts +0 -978
  127. package/node_modules/@noble/hashes/src/webcrypto.ts +0 -283
  128. package/node_modules/@noble/hashes/utils.d.ts +0 -560
  129. package/node_modules/@noble/hashes/utils.js +0 -687
  130. package/node_modules/@noble/hashes/webcrypto.d.ts +0 -121
  131. package/node_modules/@noble/hashes/webcrypto.js +0 -228
@@ -1,371 +0,0 @@
1
- # noble-ed25519
2
-
3
- Fastest 5KB JS implementation of ed25519 signatures.
4
-
5
- - ✍️ [EDDSA](https://en.wikipedia.org/wiki/EdDSA) signatures compliant with
6
- [RFC8032](https://tools.ietf.org/html/rfc8032), FIPS 186-5
7
- - 🪢 Consensus-friendly, compliant with [ZIP215](https://zips.z.cash/zip-0215)
8
- - 🔖 SUF-CMA (strong unforgeability under chosen message attacks) and
9
- SBS (non-repudiation / exclusive ownership)
10
- - 🪶 3.9KB (gzipped)
11
-
12
- The module is a sister project of [noble-curves](https://github.com/paulmillr/noble-curves).
13
- Use noble-ed25519 if you need smaller attack surface & better auditability.
14
- Switch to noble-curves (drop-in) if you need features like ristretto255, x25519 / curve25519, ed25519ph, hash-to-curve, oprf.
15
-
16
- ### This library belongs to _noble_ cryptography
17
-
18
- > **noble-cryptography** — high-security, easily auditable set of contained cryptographic libraries and tools.
19
-
20
- - Zero or minimal dependencies
21
- - Highly readable TypeScript / JS code
22
- - PGP-signed releases and transparent NPM builds
23
- - All libraries:
24
- [ciphers](https://github.com/paulmillr/noble-ciphers),
25
- [curves](https://github.com/paulmillr/noble-curves),
26
- [hashes](https://github.com/paulmillr/noble-hashes),
27
- [post-quantum](https://github.com/paulmillr/noble-post-quantum),
28
- 5kb [secp256k1](https://github.com/paulmillr/noble-secp256k1) /
29
- [ed25519](https://github.com/paulmillr/noble-ed25519)
30
- - WASM version: [awasm-noble](https://github.com/paulmillr/awasm-noble)
31
- - [Check out the homepage](https://paulmillr.com/noble/)
32
- for reading resources, documentation, and apps built with noble
33
-
34
- ## Usage
35
-
36
- > `npm install @noble/ed25519`
37
-
38
- > `deno add jsr:@noble/ed25519`
39
-
40
- We support all major platforms and runtimes. For React Native, additional polyfills are needed: see below.
41
-
42
- ```js
43
- import * as ed from '@noble/ed25519';
44
- (async () => {
45
- const { secretKey, publicKey } = await ed.keygenAsync();
46
- // const publicKey = await ed.getPublicKeyAsync(secretKey);
47
- const message = new TextEncoder().encode('hello noble');
48
- const signature = await ed.signAsync(message, secretKey);
49
- const isValid = await ed.verifyAsync(signature, message, publicKey);
50
- })();
51
- ```
52
-
53
- ### Enabling synchronous methods
54
-
55
- Only async methods are available by default, to keep the library dependency-free.
56
- To enable sync methods:
57
-
58
- > `npm install @noble/hashes`
59
-
60
- ```ts
61
- import * as ed from '@noble/ed25519';
62
- import { sha512 } from '@noble/hashes/sha2.js';
63
- ed.hashes.sha512 = sha512;
64
- // Sync methods can be used now:
65
- const { secretKey, publicKey } = ed.keygen();
66
- const msg = new TextEncoder().encode('hello noble');
67
- // const publicKey = ed.getPublicKey(secretKey);
68
- const sig = ed.sign(msg, secretKey);
69
- const isValid = ed.verify(sig, msg, publicKey);
70
- ```
71
-
72
- ### React Native: polyfill getRandomValues and sha512
73
-
74
- React Native does not provide secure getRandomValues by default.
75
- This can't be securely polyfilled from our end, so one will need a RN-specific compile-time dep.
76
-
77
- ```ts
78
- import 'react-native-get-random-values';
79
- import * as ed from '@noble/ed25519';
80
- import { sha512 } from '@noble/hashes/sha2.js';
81
- ed.hashes.sha512 = sha512;
82
- ed.hashes.sha512Async = (m: Uint8Array) => Promise.resolve(sha512(m));
83
- ```
84
-
85
- ## API
86
-
87
- There are 4 main methods, which accept Uint8Array-s:
88
-
89
- - `keygen()` and `keygenAsync()`
90
- - `getPublicKey(secretKey)` and `getPublicKeyAsync(secretKey)`
91
- - `sign(message, secretKey)` and `signAsync(message, secretKey)`
92
- - `verify(signature, message, publicKey)` and `verifyAsync(signature, message, publicKey)`
93
-
94
- ### keygen
95
-
96
- ```typescript
97
- import * as ed from '@noble/ed25519';
98
- import { sha512 } from '@noble/hashes/sha2.js';
99
- ed.hashes.sha512 = sha512;
100
- (async () => {
101
- const keys = ed.keygen();
102
- const { secretKey, publicKey } = keys;
103
- const keysA = await ed.keygenAsync();
104
- })();
105
- ```
106
-
107
- ### getPublicKey
108
-
109
- ```typescript
110
- import * as ed from '@noble/ed25519';
111
- import { sha512 } from '@noble/hashes/sha2.js';
112
- ed.hashes.sha512 = sha512;
113
- (async () => {
114
- const { secretKey: secretKeyA } = ed.keygen();
115
- const pubKey = ed.getPublicKey(secretKeyA);
116
- const pubKeyA = await ed.getPublicKeyAsync(secretKeyA);
117
- const pubKeyPoint = ed.Point.fromBytes(pubKey);
118
- const pubKeyExtended = ed.utils.getExtendedPublicKey(secretKeyA);
119
- })();
120
- ```
121
-
122
- Generates 32-byte public key from 32-byte private key.
123
-
124
- - Some libraries have 64-byte private keys - those are just priv+pub concatenated
125
- - Use `ExtendedPoint.fromHex(publicKey)` if you want to convert hex / bytes into Point.
126
- It will use decompression algorithm 5.1.3 of RFC 8032.
127
- - Use `utils.getExtendedPublicKey` if you need full SHA512 hash of seed
128
-
129
- ### sign
130
-
131
- ```ts
132
- import * as ed from '@noble/ed25519';
133
- import { sha512 } from '@noble/hashes/sha2.js';
134
- ed.hashes.sha512 = sha512;
135
- (async () => {
136
- const { secretKey, publicKey } = ed.keygen();
137
- const message = new TextEncoder().encode('hello noble');
138
- const signature = ed.sign(message, secretKey);
139
- const signatureA = await ed.signAsync(message, secretKey);
140
- })();
141
- ```
142
-
143
- Generates deterministic EdDSA signature. `message` would be hashed by ed25519 internally.
144
- For prehashed ed25519ph, switch to noble-curves.
145
-
146
- ### verify
147
-
148
- ```ts
149
- import * as ed from '@noble/ed25519';
150
- import { sha512 } from '@noble/hashes/sha2.js';
151
- ed.hashes.sha512 = sha512;
152
- (async () => {
153
- const { secretKey, publicKey } = ed.keygen();
154
- const message = new TextEncoder().encode('hello noble');
155
- const signature = ed.sign(message, secretKey);
156
- const isValid = ed.verify(signature, message, publicKey);
157
-
158
- const isValidFips = ed.verify(signature, message, publicKey, { zip215: false });
159
- const isValidA = await ed.verifyAsync(signature, message, publicKey);
160
- })();
161
- ```
162
-
163
- Verifies EdDSA signature. Has SUF-CMA (strong unforgeability under chosen message attacks).
164
- By default, follows ZIP215 [^1] and can be used in consensus-critical apps [^2].
165
- `zip215: false` option switches verification criteria to strict
166
- RFC8032 / FIPS 186-5 and provides non-repudiation with SBS (Strongly Binding Signatures) [^3].
167
-
168
- > [!NOTE]
169
- > Most other libraries don't have SUF-CMA & SBS - less optimal choice for their security.
170
-
171
- > [!NOTE]
172
- > Any message with pubkey from `ED25519_TORSION_SUBGROUP` would be valid in sigs under ZIP215.
173
-
174
- ### utils
175
-
176
- A bunch of useful **utilities** are also exposed:
177
-
178
- ```typescript
179
- import * as ed from '@noble/ed25519';
180
- const { bytesToHex, hexToBytes, concatBytes, mod, invert, randomBytes } = ed.etc;
181
- const { getExtendedPublicKey, getExtendedPublicKeyAsync, randomSecretKey } = ed.utils;
182
- const { Point } = ed;
183
- console.log(Point.CURVE(), Point.BASE);
184
- /*
185
- class Point {
186
- static BASE: Point;
187
- static ZERO: Point;
188
- readonly X: bigint;
189
- readonly Y: bigint;
190
- readonly Z: bigint;
191
- readonly T: bigint;
192
- constructor(X: bigint, Y: bigint, Z: bigint, T: bigint);
193
- static CURVE(): EdwardsOpts;
194
- static fromAffine(p: AffinePoint): Point;
195
- static fromBytes(hex: Bytes, zip215?: boolean): Point;
196
- static fromHex(hex: string, zip215?: boolean): Point;
197
- get x(): bigint;
198
- get y(): bigint;
199
- assertValidity(): this;
200
- equals(other: Point): boolean;
201
- is0(): boolean;
202
- negate(): Point;
203
- double(): Point;
204
- add(other: Point): Point;
205
- subtract(other: Point): Point;
206
- multiply(n: bigint, safe?: boolean): Point;
207
- multiplyUnsafe(scalar: bigint): Point;
208
- toAffine(): AffinePoint;
209
- toBytes(): Bytes;
210
- toHex(): string;
211
- clearCofactor(): Point;
212
- isSmallOrder(): boolean;
213
- isTorsionFree(): boolean;
214
- }
215
- */
216
- ```
217
-
218
- ## Security
219
-
220
- The module is production-ready.
221
-
222
- We cross-test against sister project [noble-curves](https://github.com/paulmillr/noble-curves), which was audited and provides improved security.
223
-
224
- - The current version has not been independently audited. It is a rewrite of v1, which has been audited by cure53 in Feb 2022:
225
- [PDF](https://cure53.de/pentest-report_ed25519.pdf).
226
- - It's being fuzzed [in a separate repository](https://github.com/paulmillr/fuzzing)
227
-
228
- If you see anything unusual: investigate and report.
229
-
230
- ### Constant-timeness
231
-
232
- We're targetting algorithmic constant time. _JIT-compiler_ and _Garbage Collector_ make "constant time"
233
- extremely hard to achieve [timing attack](https://en.wikipedia.org/wiki/Timing_attack) resistance
234
- in a scripting language. Which means _any other JS library can't have
235
- constant-timeness_. Even statically typed Rust, a language without GC,
236
- [makes it harder to achieve constant-time](https://www.chosenplaintext.ca/open-source/rust-timing-shield/security)
237
- for some cases. If your goal is absolute security, don't use any JS lib — including bindings to native ones.
238
- Use low-level libraries & languages.
239
-
240
- ### Supply chain security
241
-
242
- - **Commits** are signed with PGP keys to prevent forgery. Be sure to verify the commit signatures
243
- - **Releases** are made transparently through token-less GitHub CI and Trusted Publishing. Be sure to verify the [provenance logs](https://docs.npmjs.com/generating-provenance-statements) for authenticity.
244
- - **Rare releasing** is practiced to minimize the need for re-audits by end-users.
245
- - **Dependencies** are minimized and strictly pinned to reduce supply-chain risk.
246
- - We use as few dependencies as possible.
247
- - Version ranges are locked, and changes are checked with npm-diff.
248
- - **Dev dependencies** are excluded from end-user installs; they’re only used for development and build steps.
249
-
250
- For this package, there are 0 dependencies; and a few dev dependencies:
251
-
252
- - [noble-hashes](https://github.com/paulmillr/noble-hashes) provides cryptographic hashing functionality
253
- - jsbt is used for benchmarking / testing / build tooling and developed by the same author
254
- - prettier, fast-check and typescript are used for code quality / test generation / ts compilation
255
-
256
- ### Randomness
257
-
258
- We rely on the built-in
259
- [`crypto.getRandomValues`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues),
260
- which is considered a cryptographically secure PRNG.
261
-
262
- Browsers have had weaknesses in the past - and could again - but implementing a userspace CSPRNG is even worse, as there’s no reliable userspace source of high-quality entropy.
263
-
264
- ### Quantum computers
265
-
266
- Cryptographically relevant quantum computer, if built, will allow to
267
- break elliptic curve cryptography (both ECDSA / EdDSA & ECDH) using Shor's algorithm.
268
-
269
- Consider switching to newer / hybrid algorithms, such as SPHINCS+. They are available in
270
- [noble-post-quantum](https://github.com/paulmillr/noble-post-quantum).
271
-
272
- NIST prohibits classical cryptography (RSA, DSA, ECDSA, ECDH) [after 2035](https://nvlpubs.nist.gov/nistpubs/ir/2024/NIST.IR.8547.ipd.pdf). Australian ASD prohibits it [after 2030](https://www.cyber.gov.au/resources-business-and-government/essential-cyber-security/ism/cyber-security-guidelines/guidelines-cryptography).
273
-
274
- ## Upgrading
275
-
276
- ### v2 to v3
277
-
278
- v3 brings the package closer to noble-curves v2.
279
-
280
- - Most methods now expect Uint8Array, string hex inputs are prohibited
281
- - Add `keygen`, `keygenAsync` method
282
- - Node v20.19 is now the minimum required version
283
- - Various small changes for types and Point class
284
- - etc: hashes are now set in `hashes` object:
285
-
286
- ```ts
287
- import * as ed from '@noble/ed25519';
288
- import { sha512 } from '@noble/hashes/sha2.js';
289
- // before
290
- ed.etc.sha512Sync = (...m: Uint8Array[]) => sha512(ed.etc.concatBytes(...m));
291
- ed.etc.sha512Async = (...m: Uint8Array[]) => Promise.resolve(sha512(ed.etc.concatBytes(...m)));
292
- // after
293
- ed.hashes.sha512 = sha512;
294
- ed.hashes.sha512Async = (m: Uint8Array) => Promise.resolve(sha512(m));
295
- ```
296
-
297
- ### v1 to v2
298
-
299
- v2 features improved security and smaller attack surface.
300
- The goal of v2 is to provide minimum possible JS library which is safe and fast.
301
-
302
- That means the library was reduced 4x, to just over 300 lines. In order to
303
- achieve the goal, **some features were moved** to
304
- [noble-curves](https://github.com/paulmillr/noble-curves), which is
305
- even safer and faster drop-in replacement library with same API.
306
- Switch to curves if you intend to keep using these features:
307
-
308
- - x25519 / curve25519 / getSharedSecret
309
- - ristretto255 / RistrettoPoint
310
- - Using `utils.precompute()` for non-base point
311
- - Support for environments which don't support bigint literals
312
- - Common.js support
313
- - Support for node.js 18 and older without [shim](#usage)
314
-
315
- Other changes for upgrading from @noble/ed25519 1.7 to 2.0:
316
-
317
- - Methods are now sync by default; use `getPublicKeyAsync`, `signAsync`, `verifyAsync` for async versions
318
- - `bigint` is no longer allowed in `getPublicKey`, `sign`, `verify`. Reason: ed25519 is LE, can lead to bugs
319
- - `Point` (2d xy) has been changed to `ExtendedPoint` (xyzt)
320
- - `Signature` was removed: just use raw bytes or hex now
321
- - `utils` were split into `utils` (same api as in noble-curves) and
322
- `etc` (`sha512Sync` and others)
323
-
324
- ## Contributing & testing
325
-
326
- - `npm install && npm run build && npm test` will build the code and run tests.
327
- - `npm run bench` will run benchmarks
328
- - `npm run build:release` will build single file
329
-
330
- See [paulmillr.com/noble](https://paulmillr.com/noble/)
331
- for useful resources, articles, documentation and demos
332
- related to the library.
333
-
334
- ## Speed
335
-
336
- npm run bench
337
-
338
- Benchmarks measured with Apple M4.
339
-
340
- init 11ms
341
- keygen x 14,467 ops/sec @ 69μs/op
342
- sign x 7,275 ops/sec @ 137μs/op
343
- verify x 2,004 ops/sec @ 498μs/op
344
-
345
- keygenAsync x 12,822 ops/sec @ 77μs/op
346
- signAsync x 5,902 ops/sec @ 169μs/op
347
- verifyAsync x 1,955 ops/sec @ 511μs/op
348
-
349
- Point.fromBytes x 36,545 ops/sec @ 27μs/op
350
-
351
-
352
- Compare to alternative implementations:
353
-
354
- tweetnacl@1.0.3 getPublicKey x 1,808 ops/sec @ 552μs/op ± 1.64%
355
- tweetnacl@1.0.3 sign x 651 ops/sec @ 1ms/op
356
- ristretto255@0.1.2 getPublicKey x 640 ops/sec @ 1ms/op ± 1.59%
357
- sodium-native#sign x 83,654 ops/sec @ 11μs/op
358
-
359
- ## License
360
-
361
- The MIT License (MIT)
362
-
363
- Copyright (c) 2019 Paul Miller [(https://paulmillr.com)](https://paulmillr.com)
364
-
365
- See LICENSE file.
366
-
367
- [^1]: https://zips.z.cash/zip-0215
368
-
369
- [^2]: https://hdevalence.ca/blog/2020-10-04-its-25519am
370
-
371
- [^3]: https://eprint.iacr.org/2020/1244