基于Hash函数的HMAC是一种应用最为广泛的消息认证码,但最近的研究指出HMAC不仅易受到相关密钥攻击,在多用户环境下也易受到攻击.为了避免这些问题,我们对HMAC进行了改进,基于Hash函数和分组密码设计了一种新的消息认证码HBMAC.在分组密码是伪随机置换和Hash函数所使用的压缩函数是伪随机函数的基本假设下,使用共享随机函数模型证明了HBMAC的安全性.同时,还提出了HBMAC和HMAC的算法实现,并基于典型数据对两种算法的性质和效率进行了分析.结果表明,与HMAC相比,HBMAC在安全性和效率上取得了更好的折衷.
HMAC on the base of Hash function is the most popular MAC, but recent studies have pointed out the vulnerabilities of HMAC both to related-key attack and in multi-user environ- ment. To avoid these problems we have modified HMAC and built a new HBMAC based on Hash function and block cipher. Security proof for HBMAC has been given on the basic assumptions that block cipher is pseudo-random permutation and the compression function used by Hash function is a pseudo-random one, which uses the shared random model. Also, realization of HBMAC and HMAC algorithm is introduced. This paper analyses the quality and efficiency of these two algorithms based on some typical data. Compared with HMAC, HBMAC achieves a satisfying tradeoff between safety and efficiency.