Ed25519_dalek in wasm

I have ed25519_dalek working in webassembly. If anyone is interested in looking at the code I am open to any and all comments. The github repo is linked below. It includes, html, js, and rust files that make it tick. The files used to generate the webassembly are under the "files for wasm" folder in src. But the files that are generated and make the webassembly function are under the "files" folder.

For an Rng I used websys::crypto. This accesses the browser's native webcrypto functions. The server side is using Axum, ed25519_dalek and data_encoding as well as mime_guess for ease of file serving.

To get basic webassembly working without a bundler I mostly followed this: Rust and WebAssembly without a Bundler | Tung's Word Box

Basically the browser generates a keypair. On pressing a button in the browser it signs a message. Then, it sends a request to the server with the public key and signature base64 encoded in headers. Server side, the server parses the headers, converts them to usable types and verifies the signature. Most of this is logged to the console as well.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.