chiark / gitweb /
tripe
5 years agopeerdb/tripe-newpeers.in (MyConfigParser._get): Automate path maintenance.
Mark Wooding [Sat, 26 May 2018 11:01:29 +0000 (12:01 +0100)]
peerdb/tripe-newpeers.in (MyConfigParser._get): Automate path maintenance.

Rather than having lots of `path.pop()' calls, and hoping that
everything balances, wrap `try ... finally ...' around the method body.
Remove the explicit poppings, and simplify.

We still need to copy the path if we find a local result or raise an
exception.

5 years agopeerdb/tripe-newpeers.in: Count enhancements correctly.
Mark Wooding [Sat, 26 May 2018 10:53:11 +0000 (11:53 +0100)]
peerdb/tripe-newpeers.in: Count enhancements correctly.

I'll come in again.

5 years ago(Python): Use more modern `raise' syntax.
Mark Wooding [Sun, 27 May 2018 14:59:13 +0000 (15:59 +0100)]
(Python): Use more modern `raise' syntax.

5 years agopeerdb/peers.in.5.in: It's not just `@inherits' which is excluded.
Mark Wooding [Sun, 27 May 2018 13:11:43 +0000 (14:11 +0100)]
peerdb/peers.in.5.in: It's not just `@inherits' which is excluded.

It has always been thus: keys which start with `@' are omitted.  Fix the
manual so that it tells the truth.

5 years agopeerdb/peers.in (@PASSIVE): Remove redundant `@GLOBAL' parent.
Mark Wooding [Sun, 27 May 2018 13:08:19 +0000 (14:08 +0100)]
peerdb/peers.in (@PASSIVE): Remove redundant `@GLOBAL' parent.

It's not as if the order of direct parents makes any difference to the
resolution algorithm.

5 years ago(manpages): Fix inclusion of `defs.man'.
Mark Wooding [Fri, 25 May 2018 23:23:13 +0000 (00:23 +0100)]
(manpages): Fix inclusion of `defs.man'.

When the manpage machinery was last turned upside-down, way back in
2008 (commit e99aedcf9373b3305c32e510c086bf3357b4736a), all of the
manpages were fixed to say `.so ../common/defs.man' instead of `.so
../defs.man.in'.  Inexplicably, all but one of the manpages added since
then have had the wrong include request.  Fix this silliness.

Note that this only affects formatting the manpages directly from the
source tree: there's build machinery which embeds the common definitions
in the built manpages which are installed or packaged, and that works
just fine.  But it's still good to get this stuff right.

Just maybe I can avoid introducing more broken manpages in the future.

5 years agosvc/connect.in: Compress the code a bit.
Mark Wooding [Fri, 11 May 2018 23:45:59 +0000 (00:45 +0100)]
svc/connect.in: Compress the code a bit.

Only whitespace changes.

5 years agosvc/connect.in: Add a backstop exception handler to the pinger loop.
Mark Wooding [Fri, 11 May 2018 23:45:14 +0000 (00:45 +0100)]
svc/connect.in: Add a backstop exception handler to the pinger loop.

It'll moan, but it won't actually kill the loop any more.

5 years agosvc/connect.in: Cope if a peer vanishes when we're trying to reconnect.
Mark Wooding [Fri, 11 May 2018 23:44:27 +0000 (00:44 +0100)]
svc/connect.in: Cope if a peer vanishes when we're trying to reconnect.

5 years agosvc/connect.in: Export the admin-socket name to inferior processes.
Mark Wooding [Sun, 1 Oct 2017 11:48:36 +0000 (12:48 +0100)]
svc/connect.in: Export the admin-socket name to inferior processes.

This way, if `connect' is run with a nonstandard `-a' option, it will
pass that along to `tripe-ifup' or whatever, so that, when it in turn
runs `tripectl', it'll be able to talk to the correct server.

5 years agoserver/keyset.c: Present message types in hex.
Mark Wooding [Sat, 16 Sep 2017 15:22:36 +0000 (16:22 +0100)]
server/keyset.c: Present message types in hex.

5 years agoserver/peer.c: Abstract out updating a peer's address.
Mark Wooding [Sun, 3 Sep 2017 23:18:41 +0000 (00:18 +0100)]
server/peer.c: Abstract out updating a peer's address.

5 years agoserver/: Calculate address size on demand, rather than tracking it.
Mark Wooding [Mon, 4 Sep 2017 01:25:41 +0000 (02:25 +0100)]
server/: Calculate address size on demand, rather than tracking it.

It's fine when the address is just in the peer spec, but this isn't
going to be the case forever.

5 years agoserver/servutil.c: Reorder and categorize the functions.
Mark Wooding [Tue, 22 Aug 2017 23:10:49 +0000 (00:10 +0100)]
server/servutil.c: Reorder and categorize the functions.

Might be more coming.  Not saying yet. :-)

5 years agoserver/tripe.h: Fix commentary markup.
Mark Wooding [Tue, 22 Aug 2017 23:08:54 +0000 (00:08 +0100)]
server/tripe.h: Fix commentary markup.

5 years agoserver/tripe.8.in: The default port is the IANA-assigned one.
Mark Wooding [Tue, 19 Sep 2017 09:01:18 +0000 (10:01 +0100)]
server/tripe.8.in: The default port is the IANA-assigned one.

To get a kernel-assigned port, pass `-p0' explicitly.  Fix the manpage
so that it doesn't tell lies any more.

5 years agoserver/keyset.c, server/tripe.h: Fix commentary for `ks_gen'.
Mark Wooding [Tue, 22 Aug 2017 23:07:16 +0000 (00:07 +0100)]
server/keyset.c, server/tripe.h: Fix commentary for `ks_gen'.

Part of the point of this interface is that we no longer assume that
there are distinct secrecy and integrity keys.  And, indeed, the `iiv'
transform also has the IV-derivation blockcipher to deal with.

5 years agoserver/keyset.c: Print correct key directions when tracing.
Mark Wooding [Sat, 2 Sep 2017 21:08:38 +0000 (22:08 +0100)]
server/keyset.c: Print correct key directions when tracing.

5 years agoserver/keymgmt.c: Check algorithms on public keys too.
Mark Wooding [Sun, 3 Sep 2017 13:12:47 +0000 (14:12 +0100)]
server/keymgmt.c: Check algorithms on public keys too.

As well as checking stuff, this also calculates some important stuff,
such as preferred key lengths.  Also, it's quite quick, so this isn't
going to cause any performance trouble.

5 years agoserver/bulkcrypto.c: Fix printf argument-type bug (64-bit specific).
Mark Wooding [Wed, 6 Sep 2017 18:52:26 +0000 (19:52 +0100)]
server/bulkcrypto.c: Fix printf argument-type bug (64-bit specific).

5 years agoserver/bulkcrypto.c (gencomp_chal): Remove pointless extra `tagsz' member.
Mark Wooding [Mon, 4 Sep 2017 08:09:16 +0000 (09:09 +0100)]
server/bulkcrypto.c (gencomp_chal): Remove pointless extra `tagsz' member.

It's not like anybody ever did anything with it.

5 years agoserver/bulkcrypto.c (naclbox_decrypt): Trace calculated MAC tag.
Mark Wooding [Sat, 2 Sep 2017 21:03:27 +0000 (22:03 +0100)]
server/bulkcrypto.c (naclbox_decrypt): Trace calculated MAC tag.

5 years agoserver/admin.c: Fix ordering of commands in the help list.
Mark Wooding [Wed, 6 Sep 2017 11:25:31 +0000 (12:25 +0100)]
server/admin.c: Fix ordering of commands in the help list.

And the manual.  Oops.

5 years agoserver/admin.c: Publish `corked' and `mobile' flags in `peerinfo'.
Mark Wooding [Wed, 6 Sep 2017 10:54:38 +0000 (11:54 +0100)]
server/admin.c: Publish `corked' and `mobile' flags in `peerinfo'.

5 years agoserver/admin.c: Some light reformatting.
Mark Wooding [Sun, 3 Sep 2017 12:43:21 +0000 (13:43 +0100)]
server/admin.c: Some light reformatting.

5 years agoserver/admin.c: Don't leak `privtag' from `ADD' command.
Mark Wooding [Sun, 3 Sep 2017 12:40:16 +0000 (13:40 +0100)]
server/admin.c: Don't leak `privtag' from `ADD' command.

5 years agoserver/admin.c: Use the more modern mLib `codec' classes for Base64.
Mark Wooding [Sat, 2 Sep 2017 18:55:09 +0000 (19:55 +0100)]
server/admin.c: Use the more modern mLib `codec' classes for Base64.

The main effect, other than making the code slightly briefer, is that
decoding is now significantly stricter.

5 years agoserver/addrmap.c: Mark internal functions as actually `static'.
Mark Wooding [Tue, 12 Sep 2017 23:36:33 +0000 (00:36 +0100)]
server/addrmap.c: Mark internal functions as actually `static'.

Must have been like this forever, since this is the first change this
file has seen since it was created.

5 years agoserver/tests.at: Use `tripe-mitm' instead of `pkstream'.
Mark Wooding [Thu, 7 Sep 2017 09:50:00 +0000 (10:50 +0100)]
server/tests.at: Use `tripe-mitm' instead of `pkstream'.

Only one process for the two directions, and it hacks UDP directly.

5 years agoserver/tests.at: Eliminate redundant `-talice' option.
Mark Wooding [Tue, 5 Sep 2017 08:07:24 +0000 (09:07 +0100)]
server/tests.at: Eliminate redundant `-talice' option.

This makes searching for the correct `tripe' process easier at runtime.
But it means that we have to associate explicit `kx-group' attributes
with the keys rather than attaching the group to the key type.

5 years agowireshark/tripe.lua (dissect_ciphertext): Return correct final position.
Mark Wooding [Wed, 6 Sep 2017 00:33:19 +0000 (01:33 +0100)]
wireshark/tripe.lua (dissect_ciphertext): Return correct final position.

5 years agouslip/uslip.c: Be more reliable about tidying up.
Mark Wooding [Tue, 5 Sep 2017 09:34:05 +0000 (10:34 +0100)]
uslip/uslip.c: Be more reliable about tidying up.

Trap `SIGHUP' because shells sometimes send it to us during testing; and
don't give up on select(2) because of `EINTR'.

5 years agosvc/conntrack.in: Iterate over the output of `svcsubmit'.
Mark Wooding [Fri, 29 Sep 2017 00:20:09 +0000 (01:20 +0100)]
svc/conntrack.in: Iterate over the output of `svcsubmit'.

This forces out exceptions caused by command failures which were
otherwise being dropped.

5 years agosvc/conntrack.in: Use correct interface to fetch NetworkManager state.
Mark Wooding [Thu, 28 Sep 2017 17:55:26 +0000 (18:55 +0100)]
svc/conntrack.in: Use correct interface to fetch NetworkManager state.

5 years agosvc/conntrack.in: Write debug trace if we fail to attach to DBus services.
Mark Wooding [Thu, 28 Sep 2017 17:53:32 +0000 (18:53 +0100)]
svc/conntrack.in: Write debug trace if we fail to attach to DBus services.

5 years agosvc/conntrack.8.in: Document the ConnMan support.
Mark Wooding [Sat, 16 Sep 2017 19:36:11 +0000 (20:36 +0100)]
svc/conntrack.8.in: Document the ConnMan support.

5 years agosvc/conntrack.8.in: Sort the notification strings.
Mark Wooding [Sat, 16 Sep 2017 19:23:28 +0000 (20:23 +0100)]
svc/conntrack.8.in: Sort the notification strings.

5 years agosvc/connect.in: Add a new `sabotage' command to test ping-failure actions.
Mark Wooding [Fri, 8 Sep 2017 09:28:45 +0000 (10:28 +0100)]
svc/connect.in: Add a new `sabotage' command to test ping-failure actions.

5 years agosvc/connect.in: Report statistics about adopted peers.
Mark Wooding [Fri, 8 Sep 2017 08:51:31 +0000 (09:51 +0100)]
svc/connect.in: Report statistics about adopted peers.

These are thrown into the `info' output along with the configuration.

5 years agosvc/connect.in (cmd_kick): Don't assume there's a `connect' command.
Mark Wooding [Fri, 8 Sep 2017 08:10:25 +0000 (09:10 +0100)]
svc/connect.in (cmd_kick): Don't assume there's a `connect' command.

The `malformed-peer' message reported if there isn't is rather
unpleasant.  Instead, just force a key exchange.  (This will make more
sense later.)

5 years agosvc/connect.in: Add a method for finding a named PingPeer.
Mark Wooding [Fri, 8 Sep 2017 08:06:47 +0000 (09:06 +0100)]
svc/connect.in: Add a method for finding a named PingPeer.

And use it in `cmd_kick' to avoid the need for a linear search through
the peers list.

5 years agosvc/connect.in (Pinger.kill): Don't assume the peer exists.
Mark Wooding [Fri, 8 Sep 2017 08:04:08 +0000 (09:04 +0100)]
svc/connect.in (Pinger.kill): Don't assume the peer exists.

It's quite possible that it's already gone, so be careful.

5 years agopy/tripe.py.in: Send the right command when you call `eping'.
Mark Wooding [Sat, 16 Sep 2017 14:11:50 +0000 (15:11 +0100)]
py/tripe.py.in: Send the right command when you call `eping'.

Oops.  So that's why mobile peers get forgotten.

5 years agoproxy/tripe-mitm.c: Don't try to interpret the keys.
Mark Wooding [Thu, 7 Sep 2017 09:50:43 +0000 (10:50 +0100)]
proxy/tripe-mitm.c: Don't try to interpret the keys.

The plan to attack the cryptography never really materialized.  This
program's understanding of the crypto is now seriously out of date and
would need a major overhaul.  Instead, just check that the arguments are
vaguely right and get on with shovelling packets about.

5 years agoproxy/tripe-mitm.c: Report errors from select(2).
Mark Wooding [Wed, 13 Sep 2017 09:19:41 +0000 (10:19 +0100)]
proxy/tripe-mitm.c: Report errors from select(2).

5 years agoproxy/tripe-mitm.8.in: Fix synopsis line for `rfilt'.
Mark Wooding [Wed, 13 Sep 2017 10:10:29 +0000 (11:10 +0100)]
proxy/tripe-mitm.8.in: Fix synopsis line for `rfilt'.

5 years agopkstream/pkstream.c: Handle errors from select(2) properly.
Mark Wooding [Wed, 27 Sep 2017 19:27:09 +0000 (20:27 +0100)]
pkstream/pkstream.c: Handle errors from select(2) properly.

5 years agomon/tripemon.in (AddPeerDialog): Factor out entry-and-tickybox construction.
Mark Wooding [Wed, 6 Sep 2017 20:32:27 +0000 (21:32 +0100)]
mon/tripemon.in (AddPeerDialog): Factor out entry-and-tickybox construction.

Three almost identical stanzas is a bit much, really.

5 years agomon/tripemon.in: Update peer IP address displays when the address changes.
Mark Wooding [Wed, 6 Sep 2017 20:22:04 +0000 (21:22 +0100)]
mon/tripemon.in: Update peer IP address displays when the address changes.

This affects both the main MonitorWindow and individual PeerWindows.

5 years agomon/tripemon.in (CryptoInfo): Use the `cryptolayout' table to populate.
Mark Wooding [Wed, 6 Sep 2017 20:20:37 +0000 (21:20 +0100)]
mon/tripemon.in (CryptoInfo): Use the `cryptolayout' table to populate.

5 years agomon/tripemon.in (CryptoInfo): Make the window a bit wider.
Mark Wooding [Wed, 6 Sep 2017 20:19:42 +0000 (21:19 +0100)]
mon/tripemon.in (CryptoInfo): Make the window a bit wider.

The information didn't usually fit.

5 years agomon/tripemon.in (cryptolayout): Use formatting functions for details.
Mark Wooding [Wed, 6 Sep 2017 20:07:55 +0000 (21:07 +0100)]
mon/tripemon.in (cryptolayout): Use formatting functions for details.

This fixes two bugs.

  * Firstly, key, block, tag, and hash sizes are no longer wrong by a
    factor of 8 (because they're described as being in bits, but are
    actually shown in bytes since Python format strings can't do
    arithmetic).

  * And, secondly, new bulk crypto transforms don't always report things
    like `cipher-blksz' or `mac-keysz', so there's additional logic for
    coping with these situations.

Also, report the bulk transform, because it's probably useful.

The first of these bugs didn't affect the CryptoInfo window, which
calculates everything properly, but the second does, and this commit
doesn't change that.

5 years agomon/tripemon.in: Add simple function for formatting `statslayout' entries.
Mark Wooding [Wed, 6 Sep 2017 20:06:05 +0000 (21:06 +0100)]
mon/tripemon.in: Add simple function for formatting `statslayout' entries.

This adds extra functionality: now an entry can be a function rather
than just a format string.  But nothing takes advantage of this yet, so
there's still no functional change.

5 years agomon/tripemon.in: Split out crypto-specific pieces of `statslayout'.
Mark Wooding [Wed, 6 Sep 2017 20:03:18 +0000 (21:03 +0100)]
mon/tripemon.in: Split out crypto-specific pieces of `statslayout'.

One notices that these are suspiciously similar to (though less good)
than the things displayed by CryptoInfo.  It would be nice if we could
share them somehow...

No functional change yet.

5 years agomon/tripemon.in (xlate_bytes): Trim a character from the docstring.
Mark Wooding [Wed, 6 Sep 2017 19:59:00 +0000 (20:59 +0100)]
mon/tripemon.in (xlate_bytes): Trim a character from the docstring.

Now it fits into my (unusually narrow) editor column.  Yay.

5 years agomon/tripemon.in: Add a `default' tunnel entry to the `Add peer' box.
Mark Wooding [Sat, 16 Sep 2017 18:39:11 +0000 (19:39 +0100)]
mon/tripemon.in: Add a `default' tunnel entry to the `Add peer' box.

The code at the other end was already written to assume that this had
been done, but it hadn't.

5 years agomon/tripemon.in: Add missing support for the `cork' option.
Mark Wooding [Fri, 29 Sep 2017 09:10:59 +0000 (10:10 +0100)]
mon/tripemon.in: Add missing support for the `cork' option.

5 years agomon/tripemon.in (AddPeerDialog): Actually honour the `Mobile' option.
Mark Wooding [Wed, 6 Sep 2017 19:56:50 +0000 (20:56 +0100)]
mon/tripemon.in (AddPeerDialog): Actually honour the `Mobile' option.

5 years agocontrib/README: `knock' is better used as a forced-command.
Mark Wooding [Tue, 26 Sep 2017 10:38:05 +0000 (11:38 +0100)]
contrib/README: `knock' is better used as a forced-command.

5 years agocontrib/README: Add missing descriptions of things added over the years.
Mark Wooding [Tue, 26 Sep 2017 10:35:07 +0000 (11:35 +0100)]
contrib/README: Add missing descriptions of things added over the years.

5 years agocontrib/README: Fix typo.
Mark Wooding [Tue, 26 Sep 2017 10:34:42 +0000 (11:34 +0100)]
contrib/README: Fix typo.

5 years agocontrib/: Add copyright notices to contributed scripts.
Mark Wooding [Tue, 26 Sep 2017 10:24:05 +0000 (11:24 +0100)]
contrib/: Add copyright notices to contributed scripts.

5 years agoUpgrade licence to GPLv3+.
Mark Wooding [Fri, 15 Sep 2017 10:36:10 +0000 (11:36 +0100)]
Upgrade licence to GPLv3+.

Also, sneaky fixes:

  * Fix Debian copyright files for `pkstream' and `pathmtu', which I'd
    failed to notice before.

  * Fix blank line in `uslip/tripe-uslip.1.in'.

5 years agoconfigure.ac: Abolish use of `libtool'.
Mark Wooding [Thu, 14 Jun 2018 09:31:02 +0000 (10:31 +0100)]
configure.ac: Abolish use of `libtool'.

It's not needed now that we're using Lua for the Wireshark dissector.

6 years agodebian/control: Only require Wireshark things for binary-indep build.
Mark Wooding [Tue, 22 Aug 2017 00:51:18 +0000 (01:51 +0100)]
debian/control: Only require Wireshark things for binary-indep build.

6 years agodebian/: Use `dh_python2' for packaging.
Mark Wooding [Wed, 16 Aug 2017 04:03:58 +0000 (05:03 +0100)]
debian/: Use `dh_python2' for packaging.

6 years agodebian/copyright, .mailmap: Convert to machine-readable format.
Mark Wooding [Wed, 16 Aug 2017 04:03:05 +0000 (05:03 +0100)]
debian/copyright, .mailmap: Convert to machine-readable format.

6 years agodebian/: Redo the multiarch support for Debhelper 9.
Mark Wooding [Wed, 16 Aug 2017 04:47:18 +0000 (05:47 +0100)]
debian/: Redo the multiarch support for Debhelper 9.

6 years agoRevert "debian/: Update for Debhelper 10."
Mark Wooding [Wed, 16 Aug 2017 04:05:51 +0000 (05:05 +0100)]
Revert "debian/: Update for Debhelper 10."

This reverts commit 273e441860916146b0069e977c5ee9b58de0ba74.

6 years agodebian/: Update for Debhelper 10.
Mark Wooding [Mon, 10 Jul 2017 10:31:05 +0000 (11:31 +0100)]
debian/: Update for Debhelper 10.

Possibly controversially: I've forced the libdir back to `/usr/lib',
without an architecture-specific subdirectory.  This makes it easy for
architecture-independent packages to drop things into appropriate
subdirectories, while still /permitting/ architecture-dependent services
and similar.

Relatedly, though, move the `pkg-config' dropping into `/usr/share' by
default.

6 years agowireshark/: Replace ancient dissector with a new one written in Lua.
Mark Wooding [Mon, 10 Jul 2017 10:12:11 +0000 (11:12 +0100)]
wireshark/: Replace ancient dissector with a new one written in Lua.

This is mostly a good thing.

  + It work with both Wireshark 1.11 and 2.  The old C code would have
    to choose between the two, and I couldn't easily tell how shiny a
    version of Wireshark I'd be pinning my colours to.

  + It actually dissects the TrIPE protocol as it currently is,
    including all of the group element encodings and bulk crypto
    transforms.

  + It'll be relatively easy to /keep/ the new dissector up-to-date
    relative to protocol changes.

  - It won't run as quickly -- but Lua has a reputation for being quite
    quick, and I'm not expecting to stress it very much.

In theory, I'd be able to put this in an architecture-independent
package, which would greatly shorten cross-build times.  Alas, the
plugin directory encodes the architecture name, so it'll have to be
built separately for each architecture anyway.

Lots of changes:

  * Eliminate the old `packet-tripe.c' dissector.  Add the new one.  Get
    the build system to install it in the right place.

  * Include a (rather shoddy) script for running `tripe' and capturing
    the conversation with `tshark', so I can test the dissector against
    it; and some small example captures.  This might even turn into a
    proper test at some point, but for now it's just something I can do
    by hand.

  * Hack the `configure' script not to need all of the C compile-time
    machinery for building Wireshark plugins.

6 years agoconfigure.ac: Hack probed Wireshark plugin dir in case of corruption.
Mark Wooding [Mon, 10 Jul 2017 09:32:23 +0000 (10:32 +0100)]
configure.ac: Hack probed Wireshark plugin dir in case of corruption.

Somehow the Debian package (at least) of Wireshark ships with a
`pkg-config' dropping which contains a broken `libdir' -- and, hence,
`plugindir'.  This has happened before, and it's therefore not unlikely
to happen again.  Defend ourselves against this mess by spotting the
bungled value (which is distinctively and obviously wrong) and fixing
it.

6 years agoconfigure.ac: Check probed Wireshark plugin directory exists.
Mark Wooding [Mon, 10 Jul 2017 08:53:51 +0000 (09:53 +0100)]
configure.ac: Check probed Wireshark plugin directory exists.

If we've found a plugin directory by probing, then check that the thing
actually exists.  It turns out that the `pkg-config' dropping is not as
accurate as one might naïvely hope.

6 years agodebian/control: Remove the Ethereal->Wireshark transition machinery.
Mark Wooding [Mon, 10 Jul 2017 08:48:12 +0000 (09:48 +0100)]
debian/control: Remove the Ethereal->Wireshark transition machinery.

How old is this stuff?

6 years agovars.am: Tweak `silent-rules' machinery.
Mark Wooding [Sun, 9 Jul 2017 18:38:31 +0000 (19:38 +0100)]
vars.am: Tweak `silent-rules' machinery.

Since Automake 1.11, the advice for setting up custom silent-rules
recipes has changed, so use the new machinery.

Also, I'm no longer mainly working on wheezy, and Automake has made the
operation field two spaces wider while I wasn't looking, so make the
output line up properly.

This means that tripe now requires Automake 1.11.2 or later to build from
the Git tree.

6 years agopathmtu/pathmtu.c: Don't explicitly set `_BSD_SOURCE'.
Mark Wooding [Sun, 9 Jul 2017 18:34:57 +0000 (19:34 +0100)]
pathmtu/pathmtu.c: Don't explicitly set `_BSD_SOURCE'.

I have a bit set that this was necessary for some reason, but it doesn't
seem to be based on a brief inspection of wheezy's <features.h>, and
stretch's version warns that `_BSD_SOURCE' is now deprecated, because
nothing is allowed to remain stable.

6 years agoserver/dh.c: Set the correct scalar size when loading XDH keys.
Mark Wooding [Sun, 9 Jul 2017 18:31:58 +0000 (19:31 +0100)]
server/dh.c: Set the correct scalar size when loading XDH keys.

This was left hardcoded as 32 bytes, which means that X448 could never
work.  (The `x448_stsc' function always fails because the buffer size
doesn't match its expectation.)

6 years agoserver/keyexch.c: Fix indentation.
Mark Wooding [Sun, 9 Jul 2017 18:31:37 +0000 (19:31 +0100)]
server/keyexch.c: Fix indentation.

6 years agopeerdb/peers.in.5.in: Finish the example configuration fragment.
Mark Wooding [Tue, 23 May 2017 10:19:55 +0000 (11:19 +0100)]
peerdb/peers.in.5.in: Finish the example configuration fragment.

6 years agocontrib/tripe-ipif.in: Use the new-ish `bulk-overhead' to calculate MTU.
Mark Wooding [Tue, 23 May 2017 10:13:59 +0000 (11:13 +0100)]
contrib/tripe-ipif.in: Use the new-ish `bulk-overhead' to calculate MTU.

6 years agokeys/tripe-keys.master: Include a nontrivial `sig-fresh' example.
Mark Wooding [Mon, 22 May 2017 09:59:26 +0000 (10:59 +0100)]
keys/tripe-keys.master: Include a nontrivial `sig-fresh' example.

6 years agokeys/tripe-keys.8.in: Mention the `pathmtu' utility.
Mark Wooding [Mon, 22 May 2017 08:27:55 +0000 (09:27 +0100)]
keys/tripe-keys.8.in: Mention the `pathmtu' utility.

I don't even have `tracepath' installed here.

6 years agokeys/tripe-keys.in: Follow redirects when fetching updates.
Mark Wooding [Mon, 22 May 2017 08:26:33 +0000 (09:26 +0100)]
keys/tripe-keys.in: Follow redirects when fetching updates.

This supports servers which want to try to use HTTPS.  Of course, the
better answer is just to use `https://...' URIs.

6 years agokeys/tripe-keys.master: Use correct option for selecting key-exchange curve.
Mark Wooding [Mon, 22 May 2017 08:25:57 +0000 (09:25 +0100)]
keys/tripe-keys.master: Use correct option for selecting key-exchange curve.

Always been wrong.

6 years agoRelease 1.0.0pre19. 1.0.0pre19
Mark Wooding [Thu, 11 May 2017 09:42:15 +0000 (10:42 +0100)]
Release 1.0.0pre19.

6 years agoserver/bulkcrypto.c, server/tripe.8.in: Handle MAC names containing `/'.
Mark Wooding [Thu, 11 May 2017 09:42:15 +0000 (10:42 +0100)]
server/bulkcrypto.c, server/tripe.8.in: Handle MAC names containing `/'.

Everything is fine (though unnecessarily ugly) if we take the final `/'
as delimiting the tag length, rather than the initial one.  So do that.

6 years agoserver/, keys/: Support Bernstein's X25519 and Hamburg's X448 algorithms.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
server/, keys/: Support Bernstein's X25519 and Hamburg's X448 algorithms.

6 years agoserver/, keys/: Add bulk crypto transform based on NaCl `crypto_secretbox'.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
server/, keys/: Add bulk crypto transform based on NaCl `crypto_secretbox'.

6 years agoserver/, keys/: Alternative serialization formats for hashing.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
server/, keys/: Alternative serialization formats for hashing.

The old format was variable length, which leaks the length of the value
to local adversaries.  Provide a switch to use the better
constant-length encoding for hashing.

Make this the default when setting up new key distribution centres.

6 years agoserver/keymgmt.c: Detect if a private keys records a wrong public key.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
server/keymgmt.c: Detect if a private keys records a wrong public key.

6 years agoserver/: Replace the Diffie--Hellman group abstraction.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
server/: Replace the Diffie--Hellman group abstraction.

Downside: this basically involves duplicating Catacomb's `group'
implementation.

Upside: I've been able to improve a few things.  Most notably, this new
abstraction covers scalars as well as group elements, which extends the
possibilities.  Because the new abstraction takes over responsibility
for tracing and reporting, I've been able to make group-specific
improvements.

More subtly, I've also introduced an additional group-element encoding
format.  Previously, there was the `buffer format' (a sequence of
length-prefixed items) and the `raw format' (a binary blob with a known
length, used in encrypted messages).  But there's an additional source
of length leakage for secret values, which is in hashing: so I've
introduced a new `hash format', which currently works the same as
`buffer' for compatibility's sake, but could later be switched -- say,
by a key attribute -- to work like `raw'.

I've also passed the key file and object through to the DH operations,
so that they can pick up additional attributes from the key.  Nothing
takes advantage of this yet, though.

6 years agoserver/: Make bulk crypto transforms responsible for algorithm selection.
Mark Wooding [Wed, 19 Apr 2017 19:41:18 +0000 (20:41 +0100)]
server/: Make bulk crypto transforms responsible for algorithm selection.

Move all of the logic around processing symmetric algorithm selections
into the `bulkcrypto' transforms.  There are now three associated object
types:

  * an algorithm selection, which ends up attached to a peer key;

  * an encryption context, which actually performs the bulk transform on
    packets; and

  * a challenge context, which can issue and verify challenge tags.

The important improvement here is that now we can add new bulk crypto
transforms which are parametrized in different ways.

6 years agoserver/bulkcrypto.c: Abstract out MAC-failure tracing.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
server/bulkcrypto.c: Abstract out MAC-failure tracing.

6 years agoserver/admin.c: Export `a_info'.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
server/admin.c: Export `a_info'.

We shall have need of this soon.

6 years agoserver/: Rename `bulkcrypto' structure to `bulkops'.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
server/: Rename `bulkcrypto' structure to `bulkops'.

We shall want a structure to collect up a bulk transform's state later.
No functional change.  Basically

sed -i s/bulkcrypto/bulkops/g server/*.[ch]

and some reformatting.

6 years agoserver/tripe.h: Don't say `struct bulkcrypto' where we don't have to.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
server/tripe.h: Don't say `struct bulkcrypto' where we don't have to.

6 years agokeys/tripe-keys.in: Add an option to control the bulk transform.
Mark Wooding [Mon, 17 Apr 2017 23:39:24 +0000 (00:39 +0100)]
keys/tripe-keys.in: Add an option to control the bulk transform.

The default is `iiv', because we don't have the compatibility
constraints that the main server has.

Also, fix the `mtu' command, which has been wrong about the `iiv'
overhead for a while.

6 years agokeys/: Support the EdDSA signature schemes from catcrypt(1).
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
keys/: Support the EdDSA signature schemes from catcrypt(1).

6 years agokeys/tripe-keys.conf.5.in, server/tripe.8.in: Contemplate more group types.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
keys/tripe-keys.conf.5.in, server/tripe.8.in: Contemplate more group types.

Rather than listing the group types in prose as if there will never be
any more, list them out one by one.

6 years agoserver/tripe.8.in: Fix formatting mistake.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
server/tripe.8.in: Fix formatting mistake.