projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ignore: tinymp build tree for small-word-size MP library.
[u/mdw/catacomb]
/
rijndael-base.h
diff --git
a/rijndael-base.h
b/rijndael-base.h
index
1c17fdf
..
f88b2f7
100644
(file)
--- a/
rijndael-base.h
+++ b/
rijndael-base.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: rijndael-base.h,v 1.
1 2001/05/07 17:31:37
mdw Exp $
+ * $Id: rijndael-base.h,v 1.
2 2004/04/08 01:36:15
mdw Exp $
*
* Internal header for Rijndael implementation
*
*
* Internal header for Rijndael implementation
*
@@
-27,14
+27,6
@@
* MA 02111-1307, USA.
*/
* MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: rijndael-base.h,v $
- * Revision 1.1 2001/05/07 17:31:37 mdw
- * Centralize Rijndael tables and key scheduling.
- *
- */
-
#ifndef CATACOMB_RIJNDAEL_BASE_H
#define CATACOMB_RIJNDAEL_BASE_H
#ifndef CATACOMB_RIJNDAEL_BASE_H
#define CATACOMB_RIJNDAEL_BASE_H
@@
-65,12
+57,12
@@
extern const octet rijndael_rcon[];
/*----- Handy macros ------------------------------------------------------*/
#define SUB(s, a, b, c, d) \
/*----- Handy macros ------------------------------------------------------*/
#define SUB(s, a, b, c, d) \
- (s[U8((a) >>
0)] << 0 | s[U8((b) >> 8)] << 8
| \
- s[U8((c) >>
16)] << 16 | s[U8((d) >> 24)] << 24
)
+ (s[U8((a) >>
24)] << 24 | s[U8((b) >> 16)] << 16
| \
+ s[U8((c) >>
8)] << 8 | s[U8((d) >> 0)] << 0
)
#define MIX(t, a, b, c, d) \
#define MIX(t, a, b, c, d) \
-
(t[0][U8((a) >> 0)] ^ t[1][U8((b) >> 8)] ^
\
-
t[2][U8((c) >> 16)] ^ t[3][U8((d) >> 24
)])
+
(t[0][U8((a) >> 24)] ^ t[1][U8((b) >> 16)] ^
\
+
t[2][U8((c) >> 8)] ^ t[3][U8((d) >> 0
)])
/*----- That's all, folks -------------------------------------------------*/
/*----- That's all, folks -------------------------------------------------*/