[strongSwan] failing to decrypt esp

Chad Winckler cwinckler at westell.com
Wed Mar 6 14:11:28 CET 2013


Martin Willi <martin at ...> writes:

> 
> Hi Chad,
> 
> > src 192.168.1.208 dst 192.168.1.3
> >         proto esp spi 0xc19173e1(3247535073) reqid 4(0x00000004) mode tunnel
> >         replay-window 32 seq 0x00000000 flag af-unspec (0x00100000)
> >         enc cbc(aes) 0xccde20ccf4265eaf08aebd1b0b80c487 (128 bits)
> 
> This looks suspicious. The authentication key and algorithm is just
> missing, which perfectly explains the EINVAL. It should look something
> like:
> 
> > src 192.168.0.1 dst 192.168.0.2
> >         proto esp spi 0xc6a9b39d(3333010333) reqid 1(0x00000001) mode tunnel
> >         replay-window 32 seq 0x00000000 flag af-unspec (0x00100000)
> >         auth hmac(sha1) 0x36269b44dddd07521b8881ef46c386df4bef9b48 (160 bits)
> >         enc cbc(aes) 0x0d19791684cb6f8348992f907cdfd726 (128 bits)
> 
> Do you see this on both devices? Is this on the DUT? What architecture
> and kernel does it run?
> 
> Regards
> Martin
> 
> 


Thanks for the reply.  Yes you were noting the DUT state. Here is the state on
the ubuntu machine:

ip -s xfrm state
src 192.168.1.3 dst 192.168.1.208
	proto esp spi 0xc480293a(3296733498) reqid 11(0x0000000b) mode tunnel
	replay-window 32 seq 0x00000000 flag af-unspec (0x00100000)
	auth-trunc hmac(sha1) 0x7198930c79ce8e6d60365a9f87212e365c596f4e (160 bits) 96
	enc cbc(aes) 0xce4e5ad80e7927091973c8d1de9aa30f (128 bits)
	lifetime config:
	  limit: soft (INF)(bytes), hard (INF)(bytes)
	  limit: soft (INF)(packets), hard (INF)(packets)
	  expire add: soft 2608(sec), hard 3600(sec)
	  expire use: soft 0(sec), hard 0(sec)
	lifetime current:
	  0(bytes), 0(packets)
	  add 2013-03-06 06:54:59 use -
	stats:
	  replay-window 0 replay 0 failed 0
src 192.168.1.208 dst 192.168.1.3
	proto esp spi 0xcede96ae(3470694062) reqid 11(0x0000000b) mode tunnel
	replay-window 32 seq 0x00000000 flag af-unspec (0x00100000)
	auth-trunc hmac(sha1) 0xdd837ddced6e547f5050185adafc113c98c0a59e (160 bits) 96
	enc cbc(aes) 0xc15dbc2b0fb07c01686fe76cc52cfbbd (128 bits)
	lifetime config:
	  limit: soft (INF)(bytes), hard (INF)(bytes)
	  limit: soft (INF)(packets), hard (INF)(packets)
	  expire add: soft 2777(sec), hard 3600(sec)
	  expire use: soft 0(sec), hard 0(sec)
	lifetime current:
	  0(bytes), 0(packets)
	  add 2013-03-06 06:54:59 use -
	stats:
	  replay-window 0 replay 0 failed 0

This looks like it has the auth.  My DUT is using a Freescale BSP Linux 2.6.38
MIPS compiled with mc68.  Do you think I have compiled strongswan incorrectly?

thanks for your help,
Chad








More information about the Users mailing list