5306604aa5
While this has a negative performance impact on x86_64, it has a positive performance impact on smaller machines, which is where we're actually using this code. For example, an A53: Before: fiat32: 228605 cycles per call After: fiat32: 188307 cycles per call Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
keygen.html | ||
Makefile | ||
README |
WireGuard Key Generation in JavaScript ====================================== Various people believe in JavaScript crypto, unfortunately. This small example helps them fuel their poor taste. It's possible to generate WireGuard keys (and thus configurations) in the browser. The webpage here simulates talking to a server to exchange keys and then generates a configuration file for the user to download. Bugs ---- Who knows how emscripten actually compiles this and whether or not it introduces interesting side-channel attacks. Secrets aren't zerored after use. Maybe you can get around this with some tricks taking advantage of browser allocator behavior and different processes, but it seems pretty hard. Building -------- In order to use the example `keygen.html` file, you must first build the C sources using emscripten. Simply run: $ make