Skip to contentSkip to conversation

sha2-256 truncation

PATCH In review Michal Ludvig 2 participants 3 messages Jan 9, 2004 – Jan 10, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sha2-256 truncation

Hi,
the attached trivial patch corrects the truncation size of computed hashes that are used in IPsec ESP/AH packets for SHA2-256. All other hash algorithms use 96 bits as well as does SuperFreeS/WAN and FreeBSD also for SHA2-256. Only the native Linux sha2-256 used 128 bits what led
to incompatibility with other IPsec implementations.

Please apply, thanks!

Michal Ludvig

Signature · 2 lines
* A mouse is a device used to point at the xterm you want to type in.
* Personal homepage - http://www.logix.cz/michal
net/xfrm/xfrm_algo.c +1 -1
@@ -85,7 +85,7 @@ static struct xfrm_algo_desc aalg_list[]
 
 	.uinfo = {
 		.auth = {
-			.icv_truncbits = 96,
+			.icv_truncbits = 128,
 			.icv_fullbits = 256,
 		}
 	},
#1 lore raw

Michal Ludvig told me that:

Quoted 2 lines

the attached trivial patch corrects the truncation size of computed hashes that are used in IPsec ESP/AH packets for SHA2-256. All other hash algorithms use 96 bits as well as does SuperFreeS/WAN and FreeBSD also for SHA2-256. Only the native Linux sha2-256 used 128 bits what led
to incompatibility with other IPsec implementations.

Oops, sorry. I sent a reversed patch originally. Please use this one instead.

Michal Ludvig

Signature · 2 lines
* A mouse is a device used to point at the xterm you want to type in.
* Personal homepage - http://www.logix.cz/michal
net/xfrm/xfrm_algo.c +1 -1
@@ -85,7 +85,7 @@ static struct xfrm_algo_desc aalg_list[]
 
 	.uinfo = {
 		.auth = {
-			.icv_truncbits = 128,
+			.icv_truncbits = 96,
 			.icv_fullbits = 256,
 		}
 	},
#2 lore raw
Quoted 10 lines · On Fri, 09 Jan 2004 11:12:40 +0100 Michal Ludvig <[email protected]> wrote:

Michal Ludvig told me that:

Quoted 5 lines

the attached trivial patch corrects the truncation size of computed hashes that are used in IPsec ESP/AH packets for SHA2-256. All other hash algorithms use 96 bits as well as does SuperFreeS/WAN and FreeBSD also for SHA2-256. Only the native Linux sha2-256 used 128 bits what led
to incompatibility with other IPsec implementations.

Oops, sorry. I sent a reversed patch originally. Please use this one instead.

Patch applied, thanks Michal.