AES-CCM algorithm C language source code used in WiMAX Bootstrap Security

Source: Internet
Author: User
Tags hmac

Http://www.deadhat.com/wmancrypto/index.html


802.16 AES-CCM Algorithms
David Johnston


The files on this page contain simple ansi c implementations
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
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
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'twritten any others yet. I might never get around
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
Ciphertext block according to the nist aes standard. This is the block
Cipher that is used in 802.11i.

Aes128k128d. c

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
.

Ieee_dot16_ccm_0.2.c


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.

Ieee_dot16_ccm_0.1.c

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.

Aes_key_wrap_0.1.c

CMAC


This code is the CMAC (formerly known as omac) algorithm used in
Pkmv2 dot16kdf function. It appears to match the NIST specs.

Cmac_0.1.c

Dot16kdf

This code implements the pkmv2 dot16kdf function and runs Vectors
Through it that appear to match Samsung's vectors. it reverses
Definition of 'rightmost' as used in the 0.1 version below.

Dot16kdf_0.2.c


This code implements the old and wrong interpretation of the pkmv2 dot16kdf function and runs three example vectors through it.

Dot16kdf_0.1.c


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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.