http://www.deadhat.com/wmancrypto/index.html
802.16 AES-CCM Algorithms
David Johnston
The files on this page contain simple ANSI C implementations of algorithms related to the 802.16 and 802.16e security protocols. They are not designed for efficiency,they are designed to be clear,simple and useful as unambiguous documentation for the algorithms in the specifications. Please feel free to use them as you see fit.
They are all stand alone C files. I compile them on Linux using 'gcc {filename}.c'.
These are all independent implementations,derived directly from the algorithm specifications. Hence they may be used as independent verification of other implementations.
If there appears to be only a very small number of programs,its because I haven't written any others yet. I might never get around to it.
AES 128 bit Key,128 bit Data Block Cipher Algorithm
This code contains a fixed key size (128 bit),fixed data size (128 bit) AES block cipher with test vectors.
It takes a 128 bit data block,a 128 bit key and produces a ciphertext block according to the NIST AES standard. This is the block cipher that is used in 802.11i.
802.16-2004 style AES-CCM Encryption and decryption
V0.2 alters the nonce construction to match 802.16-2004. The PN and ICV is still little endian,contrary to the changes in Corr1-D1. Corr1-D1 is wrong and the changes need to be removed,so I've declined to make a Corr1-D1 version. It's about time I checked against the final Corrigendum,but I haven't .
This code generates example vectors of MPDUs being encrypted and decrypted according to the 802.16 AES-CCM based link cipher. The Nonce construction is as I originally conceived it.
AES_KEY_WRAP
This code is just the basic AES Key Wrap algorithm. I need to do one running over a TEK exchange response packet.
CMAC
This code is the CMAC (formerly kNown as OMAC) algorithm used in the PKMv2 dot16KDF function. It appears to match the NIST specs.
dot16KDF
This code implements the PKMv2 dot16KDF function and runs vectors through it that appear to match Samsung's vectors. It reverses the deFinition of 'rightmost' as used in the 0.1 version below.
This code implements the old and wrong interpretation of the PKMv2 dot16KDF function and runs three example vectors through it.
TBD: CMAC used in the CMAC tuple,HMAC,HMAC used in HMAC tuple,dot16KDF-HMAC,AK derivation,DES stuff. I'm not doing the public key stuff. It's already fairly generic.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。