projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add new hash functions. Provide full help for subcommands. Run the
[u/mdw/catacomb]
/
rijndael.c
diff --git
a/rijndael.c
b/rijndael.c
index
66797d5
..
9eeb59b
100644
(file)
--- a/
rijndael.c
+++ b/
rijndael.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: rijndael.c,v 1.
1 2000/06/17 11:56:07
mdw Exp $
+ * $Id: rijndael.c,v 1.
2 2000/12/06 20:32:59
mdw Exp $
*
* The Rijndael block cipher
*
*
* The Rijndael block cipher
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: rijndael.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: rijndael.c,v $
+ * Revision 1.2 2000/12/06 20:32:59 mdw
+ * Fix round count for weird key sizes.
+ *
* Revision 1.1 2000/06/17 11:56:07 mdw
* New cipher.
*
* Revision 1.1 2000/06/17 11:56:07 mdw
* New cipher.
*
@@
-92,12
+95,9
@@
void rijndael_init(rijndael_ctx *k, const void *buf, size_t sz)
/* --- Select the number of rounds --- */
/* --- Select the number of rounds --- */
- if (nk < 5)
+ nr = nk + 6;
+ if (nr < 10)
nr = 10;
nr = 10;
- else if (nk > 7)
- nr = 14;
- else
- nr = 12;
k->nr = nr;
/* --- Fetch the first key words out --- */
k->nr = nr;
/* --- Fetch the first key words out --- */