Commit graph

1147 commits

Author SHA1 Message Date
c34cf1122f Make MTU mismatches fatal
As fastd calculates its receive buffer sizes based on the MTU, not matching MTUs
is bound to cause issues anyways, so let's fail completely.
2015-01-12 21:23:34 +01:00
f4aa015704 doc: move comments from generated source files to headers
Unfortunately, Doxygen stopped interpreting the .c.in files as C source files
a while ago. Move the comments to the header files to avoid the Doxygen
warnings.
2015-01-11 13:46:38 +01:00
306667786e More doxygen fixes
I keep forgetting this...
2015-01-11 13:44:15 +01:00
9e43446003 config: allow ipv4/ipv6 keywords before static addresses 2015-01-11 10:56:11 +01:00
676c75fb18 poll: more include cleanup 2015-01-10 19:25:00 +01:00
cd10d66ac9 poll:remove sys/signal.h include
This had been added accidentially.
2015-01-10 12:28:09 +01:00
efcba8afcd Comment typo fix 2015-01-09 22:19:36 +01:00
7e30551917 ec25519-fhmqvc: don't check group order of peers' public keys
Skipping this check will significantly speed up startup with many peers. As we
now do embedded group order verification, an attacker can't gain anything from
small-subgroup attacks, so skipping the check isn't a security issue.
2015-01-09 22:15:07 +01:00
68462604fa ec25519-fhmqvc: optimize handshake by using embedded group element verification
Using the embedded group element verification allows us to get away without
explicit verification, thus needing one scalar multiplication less. This reduces
the number of expensive operations needed for a handshake to three: one Galois
field square root (for key unpacking) and two scalar multiplications.

For this optimization to be secure, private keys must be divisible by 8. This is
the case for all keys generated with all but extremely old versions of fastd
(pre-0.4). If fastd finds that its secret is not divisible by 8, it will refuse
to start now.
2015-01-09 17:31:10 +01:00
7286aff2c3 Move protocol-specific TLV specifications to main handshake record enum 2015-01-09 16:28:54 +01:00
b3dc95b4be poll: define SYS_epoll_pwait if it isn't available 2015-01-09 11:59:40 +01:00
f11b14362b ec25519-fhmqvc: unpack peers' keys only once 2015-01-09 11:55:07 +01:00
020c28af11 poll: directly call epoll_pwait syscall instead of using the libc wrapper
There are systems without the wrapper (e.g. older Android versions), and the
wrapper is broken in some versions of uClibc.
2015-01-09 08:54:08 +01:00
e5826e3c5a More comment fixes 2015-01-09 08:22:29 +01:00
e9baf5d6cf Add support for a new big-endian handshake format
Because of strange dicisions in the past, fastd currently uses little endian
type and length values in its handshake. As the common network byte order is
big endian, changing the handshake format would be preferable.

This commit adds support for a new big-endian handshake. For now, fastd will
continue to send little-endian handshakes so ensure backwarts compatiblity, but
if it receives a big-endian handshake, it will respond with a big-endian one.
2015-01-09 00:23:26 +01:00
05a41fe0ca ecc25519-fhmqvc: add doxygen comments to the key check functions 2015-01-08 11:55:39 +01:00
555ebfd2c6 status socket: better error messages on bind errors 2015-01-06 09:43:56 +01:00
f64c8e3bee ec25519-fhmqvc: additional key checks
Until now, it wasn't checked if a public key was the identity element. I don't
think this mistake allows any actual attacks against the handshake though.
2015-01-06 09:15:00 +01:00
7ebc582415 handshake: get rid of stpcpy
stpcpy was added in POSIX.1-2008 and is not present on some systems like
Android.
2015-01-06 08:54:36 +01:00
724cc3119f Development version 2014-11-15 18:18:46 +01:00
772cd4ac94 fastd v16 2014-11-15 18:17:49 +01:00
380484dcef fastd v16 release notes 2014-11-15 18:14:28 +01:00
8958be14e8 Use the peer key instead of the name as keys in the status socket output
This fixes the status socket segfault in a nicer way than the reverted commit
"Use peer specifier from log instead of the peer name for the status output".
2014-11-15 17:55:30 +01:00
5f6a7d692e ec25519-fhmqvc: extend describe_peer to return the whole key 2014-11-15 17:51:53 +01:00
5b6343f51a Revert "Use peer specifier from log instead of the peer name for the status output"
This reverts commit be929dbe2d.
2014-11-15 17:45:01 +01:00
89bf354b91 Fix segfault when checking peer addresses
This segfault would occur when a peer with a static IP address (e.i. not a
hostname resolved via DNS) is read, and any other peer after that.
2014-11-15 16:24:25 +01:00
ed121da8eb doc: add documentation for the status socket option 2014-11-12 15:11:16 +01:00
be929dbe2d Use peer specifier from log instead of the peer name for the status output
This fixes a crash when status sockets are used with peers without names, but
the JSON output format is changed: named peers will now use "<name>" as key
instead of "name".
2014-11-12 15:04:27 +01:00
5ddca2604f Development version 2014-11-11 23:53:57 +01:00
66d2d1f762 fastd v15 2014-11-11 23:53:00 +01:00
6b5c3737e8 ec25519-fhmqvc: add missing Doxygen comment 2014-11-11 23:51:53 +01:00
0eadea23a8 doc: update manpage 2014-11-11 23:51:40 +01:00
b0fd63195b docs: examples/openwrt: support all handler commands via UCI 2014-11-11 10:50:16 +01:00
924261bc92 examples: openwrt/fastd.init: allow specifying bind interfaces 2014-11-07 22:36:29 +01:00
d032c2244d docs: even more release note fixes... 2014-11-06 22:07:08 +01:00
5547c3d783 docs: another release note fix 2014-11-06 21:52:49 +01:00
562703e0bb v15 release note improvement 2014-11-05 23:29:07 +01:00
466d6d2767 Add fastd v15 release notes 2014-11-05 23:26:11 +01:00
45e70ed7dd docs: update config example 2014-11-05 20:55:30 +01:00
0dfa34ac94 docs: documentation of crypto algorithms 2014-11-05 20:47:25 +01:00
2c67136b6b docs: fix typo 2014-10-27 03:11:12 +01:00
3d34679f28 docs: fixes for PDF build 2014-10-27 02:58:56 +01:00
d8a73a2611 docs: FHMQV-C 2014-10-27 02:49:01 +01:00
8e01faddba docs: ec25519 2014-10-26 19:45:27 +01:00
7e5ffc0cde docs: handshake documentation 2014-10-26 16:56:43 +01:00
6359772b9c Use big endian for handshake field values by default
At the moment the only multi-byte field is the MTU; it is kept in little endian
to provide backwards compatiblity. Future fields will be big endian.
2014-10-22 02:23:15 +02:00
50b83be77b ec25519-fhmqvc: improve unknown key message 2014-10-13 21:44:09 +02:00
b63d267e79 Don't forward frames with local destination MAC address 2014-09-26 15:45:22 +02:00
d90524202c Move get_source_address and get_dest_address to fastd.h 2014-09-26 15:35:31 +02:00
c341adf527 Add some (very incomplete) protocol documentation 2014-09-26 15:33:38 +02:00