Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jan 2011 11:07:11 +0100
From:      VANHULLEBUS Yvan <vanhu@FreeBSD.org>
To:        freebsd-net@freebsd.org
Subject:   IPsec: HMAC_SHA2 and RFC 4868....
Message-ID:  <20110103100711.GA65026@zeninc.net>

next in thread | raw e-mail | index | archive | help

Hi all.

Actually, FreeBSD's support of HMAC_SHA2 is NOT RFC 4868 compliant: it
uses 96 first bits of hash (which was specified by first versions of the
draft), where RFC says we MUST use half of SHA2 hash.

I have a patch which is almost ready to be commited to fix RFC 4868
interoperability (so interoperability with recent Linux / OpenBSD
stacks)....... but which will break interoperability with actual
FreeBSD stacks, NetBSD's ones (still not checked, but I'll commit also
soon on NetBSD if the patch applies quickly), and probably other
broken implementations.


This is NOT possible to have a very smart system which will set up
HMAC_SHA2 support by peer, as there is no way to check during
negociation if peers have the RFC compliant implementation or not.

We may implement a sysctl token to switch from old implementation to
RFC compliant one, but this would apply on the whole system, so for
ALL IPsec peers !

Oh, and I'll have quite no time available to do some strange hacks to
ehance interoperability with old (well, actual....) implementation, as
we never used the non RFC compliant version at my work.....


So, my first question is: do some people use HMAC_SHA2 for IPsec phase
2 on their FreeBSD gates ???

If there are (almost) no real world uses of the actuel code, the
simplest, cleanest (and already done by Linux/OpenBSD) way to deal
with that is to just commit RFC compliant code, and let people who may
want older code to play with SVN and get the reverse patch.....


Last information: MFC is quite trivial, at least up to FreeBSD 6.x.



Yvan.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110103100711.GA65026>