wireshark/epan/crypt/airpdcap_rijndael.h
Ronnie Sahlberg a3355a0949 Break the aes set ket/decrypt/encrypt out from airpdcap_raindoll into
its own crypt-aes.

change the integer types to glib style integers


this may/will be helpful if/when we implement our own version of 
kerberos 
aes decryption of dcerpc since the existing libraries can not (yet) 
handle when header signing is used.

we should implement our own decryption of this for cfx+aes just as we 
did for classic+arcfour





svn path=/trunk/; revision=29228
2009-07-29 10:01:14 +00:00

61 lines
2.3 KiB
C

/**
* airpdcap_rijndael.h
*
* $Id$
*
* @version 3.0 (December 2000)
*
* Optimised ANSI C code for the Rijndael cipher (now AES)
*
* @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
* @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
* @author Paulo Barreto <paulo.barreto@terra.com.br>
*
* This code is hereby placed in the public domain.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _AIRPDCAP_RIJNDAEL
#define _AIRPDCAP_RIJNDAEL
/******************************************************************************/
/* File includes */
/* */
#include "airpdcap_interop.h"
/* */
/* */
/******************************************************************************/
/******************************************************************************/
/* Type definitions */
/* */
UCHAR AES_unwrap(UCHAR *kek, UINT16 key_len, UCHAR *cipher_text, UINT16 cipher_len, UCHAR *output);
/* */
/******************************************************************************/
/******************************************************************************/
/* Block XOR macro definition */
/* */
#define XOR_BLOCK(b, a, len) \
{ \
INT __i__; \
for (__i__ = 0; __i__ < (INT)(len); __i__++) \
(b)[__i__] ^= (a)[__i__]; \
}
/* */
/******************************************************************************/
#endif