Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

beecrypt/aes.h

Go to the documentation of this file.
00001 
00008 /*
00009  * Copyright (c) 2002 Bob Deblier
00010  *
00011  * This library is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU Lesser General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2.1 of the License, or (at your option) any later version.
00015  *
00016  * This library is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public
00022  * License along with this library; if not, write to the Free Software
00023  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024  *
00025  */
00026 
00027 #ifndef _AES_H
00028 #define _AES_H
00029 
00032 typedef struct
00033 {
00034         uint32 k[64];
00035         uint32 nr;
00036         uint32 fdback[4];
00037 } aesParam;
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00045 /*@observer@*/ /*@checked@*/
00046 extern const BEECRYPTAPI blockCipher aes;
00047 
00050 /*@-exportlocal@*/
00051 BEECRYPTAPI
00052 int aesSetup  (aesParam* ap, const uint32* key, int keybits, cipherOperation op)
00053         /*@modifies ap @*/;
00054 /*@=exportlocal@*/
00055 
00058 /*@-exportlocal@*/
00059 BEECRYPTAPI
00060 int aesSetIV  (aesParam* ap, const uint32* iv)
00061         /*@modifies ap @*/;
00062 /*@=exportlocal@*/
00063 
00066 /*@-exportlocal@*/
00067 BEECRYPTAPI
00068 int aesEncrypt(aesParam* ap, uint32* dst, const uint32* src)
00069         /*@modifies dst @*/;
00070 /*@=exportlocal@*/
00071 
00074 /*@-exportlocal@*/
00075 BEECRYPTAPI
00076 int aesDecrypt(aesParam* ap, uint32* dst, const uint32* src)
00077         /*@modifies dst @*/;
00078 /*@=exportlocal@*/
00079 
00082 /*@-exportlocal@*/
00083 BEECRYPTAPI
00084 int aesECBEncrypt(aesParam* ap, int count, uint32* dst, const uint32* src)
00085         /*@modifies dst @*/;
00086 /*@=exportlocal@*/
00087 
00090 /*@-exportlocal@*/
00091 BEECRYPTAPI
00092 int aesECBDecrypt(aesParam* ap, int count, uint32* dst, const uint32* src)
00093         /*@modifies dst @*/;
00094 /*@=exportlocal@*/
00095 
00098 /*@-exportlocal@*/
00099 BEECRYPTAPI
00100 int aesCBCEncrypt(aesParam* ap, int count, uint32* dst, const uint32* src)
00101         /*@modifies ap, dst @*/;
00102 /*@=exportlocal@*/
00103 
00106 /*@-exportlocal@*/
00107 BEECRYPTAPI
00108 int aesCBCDecrypt(aesParam* ap, int count, uint32* dst, const uint32* src)
00109         /*@modifies ap, dst @*/;
00110 /*@=exportlocal@*/
00111 
00112 #ifdef __cplusplus
00113 }
00114 #endif
00115 
00116 #endif

Generated on Tue Sep 17 15:59:43 2002 for rpm by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002