wireguard-tools/contrib/keygen-html
Jason A. Donenfeld 40ae0e0bba curve25519: replace hacl64 with fiat64
For now, it's faster:

hacl64: 109782 cycles per call
fiat64: 108984 cycles per call

It's quite possible this commit will be reverted with nice changes from
INRIA, though.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-01 19:51:50 +01:00
..
src curve25519: replace hacl64 with fiat64 2018-02-01 19:51:50 +01:00
.gitignore keygen-html: remove prebuilt file 2017-12-12 01:18:30 +01:00
Makefile contrib: keygen-html: share curve25519 implementation with kernel 2018-01-23 11:55:44 +01:00
README keygen-html: remove prebuilt file 2017-12-12 01:18:30 +01:00
keygen.html global: year bump 2018-01-03 21:58:00 +01:00

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