wireguard-tools/contrib/extract-keys
Jason A. Donenfeld 1ad6b17c35 extract-{handshakes,keys}: rework for upstream kernel
Now that WireGuard has been upstreamed and the repos split, we have to
look elsewhere for these headers.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-02-01 00:53:30 +01:00
..
.gitignore git: organize ignore files 2016-09-29 19:31:22 +02:00
config.c extract-{handshakes,keys}: rework for upstream kernel 2020-02-01 00:53:30 +01:00
extract-keys.c global: bump copyright 2020-01-02 19:52:25 +01:00
Makefile extract-{handshakes,keys}: rework for upstream kernel 2020-02-01 00:53:30 +01:00
README examples: add key extractor 2016-08-26 04:52:50 +02:00

Key Extractor
=============

This will extract the symmetric ChaCha20Poly1305 session keys from the kernel
for a WireGuard interface, for use in making packet dissectors.


Build:
    $ make

Run (as root):
    # ./extract-keys INTERFACE

Output:
    REMOTE_KEY_ID SENDING_KEY
    LOCAL_KEY_ID RECEIVING_KEY

Example:
    # ./extract-keys wg0
    0x57b56068 tMTSEOJpEYFAQV2UviDiYooX0A1AD/ONqrzoQVHa1rQ=
    0xa182fd19 xvQSkQ5HTX5RUeJ74eAAb/xfNhdrDThxG91GXZIPKmY=
    0x01662508 LbMc84JULzXJiHotSkdSOPZ0bHh6IDwOrbxWLfwosTs=
    0xbd819021 4VA8lZ3I1HjnJcWTmhEzBdC92W1Aag9Lnyy2GkroOYI=