projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change buffer offset to be unsigned.
[u/mdw/catacomb]
/
idea.c
diff --git
a/idea.c
b/idea.c
index
f554bf4
..
5f88948
100644
(file)
--- a/
idea.c
+++ b/
idea.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: idea.c,v 1.
1 1999/09/03 08:41:12
mdw Exp $
+ * $Id: idea.c,v 1.
2 2000/06/17 11:24:08
mdw Exp $
*
* Implementation of the IDEA cipher
*
*
* Implementation of the IDEA cipher
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: idea.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: idea.c,v $
+ * Revision 1.2 2000/06/17 11:24:08 mdw
+ * New key size interface.
+ *
* Revision 1.1 1999/09/03 08:41:12 mdw
* Initial import.
*
* Revision 1.1 1999/09/03 08:41:12 mdw
* Initial import.
*
@@
-45,8
+48,13
@@
#include <mLib/bits.h>
#include "blkc.h"
#include <mLib/bits.h>
#include "blkc.h"
+#include "gcipher.h"
#include "idea.h"
#include "idea.h"
+/*----- Global variables --------------------------------------------------*/
+
+const octet idea_keysz[] = { KSZ_SET, IDEA_KEYSZ };
+
/*----- Main code ---------------------------------------------------------*/
/* --- @inv@ --- *
/*----- Main code ---------------------------------------------------------*/
/* --- @inv@ --- *
@@
-115,7
+123,7
@@
static uint16 inv(uint16 n)
void idea_init(idea_ctx *k, const void *buf, size_t sz)
{
void idea_init(idea_ctx *k, const void *buf, size_t sz)
{
-
assert(((void)"IDEA key must be 128 bits", sz == IDEA_KEYSZ)
);
+
KSZ_ASSERT(idea, sz
);
/* --- Unpack the encryption key --- */
/* --- Unpack the encryption key --- */