针对无线传感器网络(WSN)中女巫攻击使距离矢量跳数(DV-HOP)等算法的定位结果产生偏差的问题,提出基于跳数差值的距离矢量跳数算法(HDDV-HOP)及其增强型算法(EHDDV-HOP)。首先,检测节点通过可控泛洪方式获取其他节点的邻居节点列表;其次,检测节点通过分析邻居节点列表检测虚假节点并建立白名单;最后,节点根据白名单选择性转发接收到的数据包并进行安全定位。两种算法的区别在于它们使用不同的检测方式,HDDVHOP算法中检测节点分析邻居节点列表是否相同,而EHDDV-HOP算法中检测节点分析邻居节点列表交集与并集中元素个数之比。仿真结果表明,在信标节点比例达到20%和信号覆盖不对称时,与无女巫攻击时DV-HOP算法相比,HDDV-HOP定位误差相对大133.4%,EHDDV-HOP在相似度阈值合适时只高出7.3%,但都低于有女巫攻击时DVHOP的定位误差。两种算法都能抵御女巫攻击,但EHDDV-HOP更优。
To deal with the problem that the localization result of Distance Vector-Hop( DV-HOP) may be rendered far from precision by the Sybil attack in Wireless Sensor Network( WSN),two hop difference based secure localization algorithms,namely HDDV-HOP and EHDDV-HOP,were proposed. Firstly,neighbor node lists of other nodes were got by the detection nodes through the controlled flooding mechanism. Secondly,the neighbor node lists were analyzed to detect fake nodes and white node lists were established. Finally,packets were selectively relayed based on white node lists and the unknown nodes were securely localized. The two algorithms differ in the techniques they used to detect fake nodes. In HDDVHOP,whether or not neighbor node lists were the same was checked; while in EHDDV-HOP,the ratio of the amount of elements in the intersection of two neighbor node lists to that of elements in the union of the two was analyzed. The simulation results show that,compared with DV-HOP without the Sybil attack,when the ratio of beacon nodes to normal nodes reaches20% and signal coverage is asymmetric,the localization error of HDDV-HOP is increased by 133. 4%,while the error of EHDDV-HOP is increased by 7. 3% when the similarity threshold is suitable,but the localization errors of the both algorithms are smaller than that of DV-HOP with the Sybil attack. Both of HDDV-HOP and EHDDV-HOP can defend against the Sybil attack,however EHDDV-HOP outperforms HDDV-HOP.