wireguard-tools/contrib/keygen-html/README
Jason A. Donenfeld 3ac679e7a1 keygen-html: bring back pure javascript implementation
This reverts commit 9d5baf7d1d14ca7eb0852b41566330259229d489.

Benoît Viguier has proofs that values will stay well within 2^53. We
also have an improved carry function that's much simpler.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-23 14:29:44 +01:00

19 lines
713 B
Text

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.