ANDROID: net: xfrm: make PF_KEY SHA256 use RFC-compliant truncation.
authorLorenzo Colitti <lorenzo@google.com>
Wed, 10 May 2017 14:54:04 +0000 (23:54 +0900)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 18 Dec 2017 15:41:22 +0000 (21:11 +0530)
commit350c0df01370ac0de4a4bb30b5d4f33625114844
tree41fff5f9fcf1ee6db4d4ad62e8df83b39c2bf820
parentcab9681da893c1af7628e089fee4f2d67b002c27
ANDROID: net: xfrm: make PF_KEY SHA256 use RFC-compliant truncation.

When using the PF_KEY interface, SHA-256 hashes are hardcoded to
use 96-bit truncation. This is a violation of RFC4868, which
specifies 128-bit truncation, but will not be fixed upstream due
to backwards compatibility concerns and because the PF_KEY
interface is deprecated in favour of netlink XFRM (which allows
the app to specify an arbitrary truncation length).

Change the hardcoded truncation length from 96 to 128 so that
PF_KEY apps such as racoon will work with standards-compliant VPN
servers.

Bug: 34114242
Change-Id: Ie46bff4b6358f18117d0be241171d677d31d33f7
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
net/xfrm/xfrm_algo.c