dilithium-crystals-js 1.1.0 → 1.1.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 (2) hide show
  1. package/README.md +13 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -52,7 +52,19 @@ Dilithium.then((dilithium) => {
52
52
 
53
53
  ### Browser
54
54
 
55
- For browser environments, include the minified script in your HTML
55
+ To use dilithium-crystals-js in a browser:
56
+
57
+ 1. Ensure `dilithium.wasm` is in your public directory.
58
+ 2. Adjust the WASM fetch path in `./browser/index.js`, by default it's set to `node_modules/dilithium-crystals-js/kyber.wasm`:
59
+
60
+ ```javascript
61
+ async function fetchWasm() {
62
+ return await (await fetch("/path/to/your/dilithium.wasm")).arrayBuffer();
63
+ }
64
+ ```
65
+
66
+ Replace /path/to/your/dilithium.wasm with the actual path where you serve the WASM file.
67
+ Note: Configure your server to serve WASM files with application/wasm MIME type.
56
68
 
57
69
  ```javascript
58
70
  import { createDilithium } from "./node_modules/dilithium-crystals-js/dist/dilithium.min.js";
@@ -132,18 +144,3 @@ dilithium-crystals-js supports all four parameter sets of the Dilithium signatur
132
144
  - **3**: Dilithium2-AES (NIST security level 2, AES variant)
133
145
 
134
146
  Choose the appropriate parameter set based on your security requirements.
135
-
136
- ## Contributing
137
-
138
- Contributions to dilithium-crystals-js are welcome! Please follow these steps:
139
-
140
- 1. Fork the repository
141
- 2. Create a new branch for your feature or bug fix
142
- 3. Commit your changes with clear, descriptive commit messages
143
- 4. Push your branch and submit a pull request
144
-
145
- Please ensure your code adheres to the existing style and includes appropriate test coverage.
146
-
147
- If you encounter any issues or have questions about dilithium-crystals-js, please file an issue on the GitHub repository.
148
-
149
- ## Acknowledgments
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dilithium-crystals-js",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "main": "src/node/index.js",
5
5
  "browser": "dist/dilithium.min.js",
6
6
  "files": [