Bug 215946 - IPsec AH hmac-sha2 does not work with Linux
Summary: IPsec AH hmac-sha2 does not work with Linux
Status: Closed DUPLICATE of bug 222684
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.0-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-10 18:35 UTC by Jason Mader
Modified: 2018-07-24 17:07 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mader 2017-01-10 18:35:08 UTC
IPsec AH doesn't appear to work with Linux when using the SHA2 hmac.

On the FreeBSD side,

add -n SRC DST ah 5000 -m transport -A hmac-sha2-384 0x96HEXKEY;

never works with the Linux,

ip xfrm state add src SRC dst DST proto ah spi 5000 auth-trunc "hmac(sha384)" 0x96HEXKEY 192 mode transport

I've tried a variety of truncation lengths (96, 128, 192) and hmac-sha2-256 but none worked. However by changing to "-A hmac-sha1 0x40HEXKEY" which has a default 96 bit truncation, AH worked between the two hosts.
Comment 1 Jason Mader 2017-01-10 21:29:18 UTC
A packet capture of an Authentication Header leaving FreeBSD shows an AH ICV that's not truncated at all (384 bits)
Comment 2 Jason Mader 2017-01-11 18:15:23 UTC
My mistake. What I did find is a problem with Linux AH truncation on values higher than about 160 bits, they are all off by 32 bits.
Comment 3 Conrad Meyer freebsd_committer freebsd_triage 2018-07-24 17:07:13 UTC

*** This bug has been marked as a duplicate of bug 222684 ***