hd-wallet-wasm 1.1.2 → 1.1.5
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.
- package/README.md +44 -4
- package/dist/hd-wallet.js +1 -1
- package/dist/hd-wallet.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -293,11 +293,51 @@ const wallet = await init();
|
|
|
293
293
|
- Consider using hardware wallets for high-value operations
|
|
294
294
|
- The library enforces key separation: external chain (0) for signing, internal chain (1) for encryption
|
|
295
295
|
|
|
296
|
-
## FIPS Mode
|
|
296
|
+
## FIPS 140-3 Mode
|
|
297
297
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
298
|
+
The published NPM package includes OpenSSL 3.0.9 FIPS Provider support for compliance-critical applications.
|
|
299
|
+
|
|
300
|
+
### Enabling FIPS Mode
|
|
301
|
+
|
|
302
|
+
```javascript
|
|
303
|
+
import init from 'hd-wallet-wasm';
|
|
304
|
+
|
|
305
|
+
const wallet = await init();
|
|
306
|
+
|
|
307
|
+
// Check if OpenSSL is available
|
|
308
|
+
console.log('OpenSSL compiled:', wallet.isOpenSSL());
|
|
309
|
+
|
|
310
|
+
// Initialize FIPS mode
|
|
311
|
+
const fipsEnabled = wallet.initFips();
|
|
312
|
+
console.log('FIPS active:', wallet.isOpenSSLFips());
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Algorithm Routing
|
|
316
|
+
|
|
317
|
+
When FIPS mode is active, approved algorithms use OpenSSL FIPS provider:
|
|
318
|
+
|
|
319
|
+
| Algorithm | FIPS Mode | Default |
|
|
320
|
+
|-----------|-----------|---------|
|
|
321
|
+
| SHA-256/384/512 | OpenSSL FIPS | Crypto++ |
|
|
322
|
+
| AES-256-GCM | OpenSSL FIPS | Crypto++ |
|
|
323
|
+
| ECDSA P-256/P-384 | OpenSSL FIPS | Crypto++ |
|
|
324
|
+
| HKDF/PBKDF2 | OpenSSL FIPS | Crypto++ |
|
|
325
|
+
| secp256k1 | Crypto++ | Crypto++ |
|
|
326
|
+
| Ed25519 | Crypto++ | Crypto++ |
|
|
327
|
+
| Keccak-256 | Crypto++ | Crypto++ |
|
|
328
|
+
|
|
329
|
+
**Note:** secp256k1 (Bitcoin/Ethereum) and Ed25519 (Solana) are not FIPS-approved and always use Crypto++.
|
|
330
|
+
|
|
331
|
+
### API Reference
|
|
332
|
+
|
|
333
|
+
| Method | Description |
|
|
334
|
+
|--------|-------------|
|
|
335
|
+
| `wallet.isOpenSSL()` | Check if OpenSSL backend is compiled in |
|
|
336
|
+
| `wallet.initFips()` | Initialize FIPS mode; returns true if successful |
|
|
337
|
+
| `wallet.isOpenSSLFips()` | Check if FIPS provider is currently active |
|
|
338
|
+
| `wallet.isFipsMode()` | Check if compiled with FIPS mode enabled |
|
|
339
|
+
|
|
340
|
+
See the [main README](https://github.com/DigitalArsenal/hd-wallet-wasm#fips-140-3-compliance) for comprehensive FIPS documentation.
|
|
301
341
|
|
|
302
342
|
## License
|
|
303
343
|
|