Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9210496
  • 博文数量: 187
  • 博客积分: 7517
  • 博客等级: 少将
  • 技术积分: 1981
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-20 18:51
文章分类

全部博文(187)

文章存档

2015年(3)

2013年(4)

2012年(20)

2011年(2)

2010年(96)

2009年(14)

2008年(47)

2007年(1)

我的朋友

分类: 系统运维

2012-01-16 10:10:18

ESP 的号为50

  AH 协议号为51

  一、ESP详解

  (一)ESP提供:confidentiality, integrity,optional data origin authentication,anti-replay

  (二)ESP结构为:

  1、Security Parameter Index(SPI)

  2、Sequence Number

  3、Payload Data(Variable)

  4、Padding(0-255)Bytes

  5、Pad length

  6、Report Handler

  7、Authentication Data(varaible)

  SPI:

  1、destination

  2、protocol

  3、identify the security association(SA)

  SPI number是在Internet Key Exchange(IKE)协商中,可以任意指定的。利用这个number可以在security association base(SADB)中查询相关信息。

  Sequence number:

  提供anti-replay .这点在AH中也是同样的

  原理是通过increasing序号

  Payload :

  被保护的数据,加密算法需要一个initialization vector(IV),IV需要认证,但是不是加密的,DES使用前8个字节做为IV,3DES、AES也8字节的IV.

  Padding Bytes:

  根据算法不同,补足的字节也不同。

  二、AH详解

  (一)AH提供:connectionless integrity, authentication,optional replay protection,但是不提供confidentiality()

  (二)AH的包结构:

  1、Next header

  2、Payload Length

  3、Reserved

  4、Security Parameter Index(SPI)

  5、Sequence Number

  6、Authentication Data(Variable)

  三、ESP、AH对比

  1、AH没有ESP的特性

  2、AH的authtication是对整个数据包做出的,包括IP头部分,因为IP头部分包含很多,比如type of service(TOS),flags,fragment offset,TTL以及header checksum.所以这些值在进行authtication前要全部清零。否则hash会mismatch导致丢包。

  相反,ESP是对部分做authentication,不包括IP头部分。

阅读(1563) | 评论(1) | 转发(1) |
给主人留下些什么吧!~~

我要去鸟巢2012-01-21 00:53:38

ESP结构分的很仔细啊!