ghgeeeeeeeeeeeee
*****************************************************************************
欢迎使用eeworld论坛专用阅读器 : eeworld Reader(附全部源代码)
http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
ghgeeeeeeeeeeeee
*****************************************************************************
欢迎使用eeworld论坛专用阅读器 : eeworld Reader(附全部源代码)
http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
在CC2430里用过,但是具体我也不知道.好像是片内带的硬加密
Definition of: AES-CCMP
(AES-Counter Mode CBC-MAC Protocol)是在 802.11i 安全协议中使用的加密算法。它使用 AES 块加密算法,但是把密钥的长度限制为 128 位。AES-CCMP 结合了两种复杂的加密技术(counter mode 和 CBC-MAC)并把他们应用于以太帧,从而在移动客端和 AP 之间提供一种健壮的安全协议。
AES 自身是一种很健壮的加密算法,然而 counter 模式可以使得窃听者难于 to spot patterns,并且 CBC-MAC 信息完整性方法确保信息没有被 tampered with.
Definition of: counter mode
In cryptography, a sophisticated mode of operation. Counter 模式使用了一个随机数(the counter),对于每块要加密的信息,这个随机数都会改变。这个 counter is encrypted with the cipher, and the result is XOR'd into ciphertext. Since the counter changes for each block, the problem of repeating ciphertext that results from the electronic code book (ECB) method is avoided.
CCMP
CCMP 协议基于 AES 加密算法,AES 加密算法使用the Counter Mode with CBC?MAC (CCM) mode of operation.CCM 模式结合了 Counter (CTR) mode privacy 和 Cipher Block Chaining Message Authentication Code (CBC-MAC) authentication. These modes have been used and studied for a long time, have well-understood cryptographic properties. 它们提供了很好的安全和性能,不论是硬件还是软件。
CCM is a generic authenticate-and-encrypt block cipher mode. CCM is only defined for use with 128-bit block ciphers, 例如,AES. 对于常规的 CCM 模式,有两个 parameter choices. 第一个选择是 M, 认证域的大小。 The choice of the value for M involves a trade-off between message expansion and the probability that an attacker can undetectably modify a message. Valid values are 4, 6, 8, 10, 12, 14, and 16 octets. 第二个选择是 L,length 域的大小。 This value requires a trade-off between the maximum message size and the size of the Nonce. 不同的应用程序要求不同的折衷,所以 L 是一个参数。L 的有效值 range between 2 octets and 8 octets (the value L=1 is reserved). M Number of octets in authentication field 3 bits (M-2)/2; L Number of octets in length field 3 bits L-1.
CCMP employs the AES encryption algorithm using the CCM mode of operation. 在 CCM 模式中,Counter(CTR) 模式用于保密,而 Cipher Block Chaining Message Authentication Code (CBC-MAC) 用于认证和完整性。AES 在 FIPS PUB 197 中定义。在 CCMP 中使用的所有的 AES 数据处理 uses AES with a 128 位密钥和 128 位 块大小。CCM 是一个通用模式,它可以在任何面向块的加密算法。CCMP 必须使用 AES 算法,采用 128 位密钥和 128 位块大小。CCM 提供了其它参数(K, M and L) that must have the values: K=16, M=8 and L=2. CCM requires a fresh temporal key (TK) for every session. CCM also requires a unique nonce value for each frame protected by a given TK, and CCMP uses a 48-bit packet number (PN) for this purpose. Reuse of a packet number (PN) with the same TK voids all security guarantees.
Definition of: block cipher
块加密算法是一种把输入流作为多组字节块来处理的加密算法,字节块的大小固定,典型的块大小有 64位、128位、256位。块加密算法的状态在处理每个字节块之前会重置。DES和AES算法都是块加密算法。
Definition of: stream cipher
An encryption method that works with continuous streams of input rather than fixed blocks. Bytes of plaintext go into the stream cipher, and bytes of encrypted text come out the other end. RC4 is an example of a stream cipher (see RC4). Contrast with block cipher.
How AES-CCMP Works
The CCMP protocol is based on the AES encryption cipher using the Counter Mode with CBC-MAC (CCM) mode of operation. The CCM mode combines Counter (CTR) mode privacy and Cipher Block Chaining Message Authentication Code (CBC-MAC) authentication. CCMP, in the context of Wi-Fi security, is often referred to as AES-CCMP or simply AES. A more complete description of AES can be found at http://en.wikipedia.org/wiki/Advanced_Encryption_Standard.
AES processing in CCMP must use AES 128-bit key and 128-bit block size. Per FIPS 197 standard, the AES algorithm (a block cipher) uses blocks of 128 bits, cipher keys with lengths of 128, 192 and 256 bits, as well as a number of rounds 10, 12 and 14 respectively.
AES-CCMP introduces a higher level of security from past protocols by providing protection for the MAC protocol data unit (MPDU) and parts of the 802.11 MAC headers. This protects even more of the data packet from eavesdropping and tampering.
AES-CCMP is superior to WEP and TKIP in many ways:
AES-CCMP was built from the ground up specifically for 802.11 encryption – it goes far beyond the RC4 steam cipher used by WEP and TKIP
AES-CCMP offers greater data privacy by encrypting parts of the 802.11 header
The major drawbacks of AES include:
No key rotation/updates – the same static pre-shared master key (PSK) must be shared somehow with all clients before they are allowed to associate with the WLAN. The AES-CCMP protocol makes no provision for automatically generating new master keys
Hardware requirements – AES-CCMP is not backwards compatible with legacy Wi-Fi hardware. This means AES-CCMP deployments may require a firmware or hardware upgrade
能否把代码也给我发一份,谢谢了
xpman074@163.com
给我也发一份被呗,谢谢了先!
liuxingmodern@hotmail.com
最后一份 370918343@163.com 谢啦