added libtomcrypt-1.03

This commit is contained in:
Tom St Denis
2005-06-09 00:08:13 +00:00
committed by Steffen Jaeckel
parent 65c1317eee
commit 3964a6523a
285 changed files with 5920 additions and 2287 deletions
+4
View File
@@ -78,3 +78,7 @@ int omac_done(omac_state *omac, unsigned char *out, unsigned long *outlen)
#endif
/* $Source$ */
/* $Revision$ */
/* $Date$ */
+4
View File
@@ -77,3 +77,7 @@ int omac_file(int cipher,
}
#endif
/* $Source$ */
/* $Revision$ */
/* $Date$ */
+5 -1
View File
@@ -39,7 +39,7 @@ int omac_init(omac_state *omac, int cipher, const unsigned char *key, unsigned l
}
#ifdef LTC_FAST
if (16 % sizeof(LTC_FAST_TYPE)) {
if (cipher_descriptor[cipher].block_length % sizeof(LTC_FAST_TYPE)) {
return CRYPT_INVALID_ARG;
}
#endif
@@ -93,3 +93,7 @@ int omac_init(omac_state *omac, int cipher, const unsigned char *key, unsigned l
}
#endif
/* $Source$ */
/* $Revision$ */
/* $Date$ */
+4
View File
@@ -69,3 +69,7 @@ LBL_ERR:
}
#endif
/* $Source$ */
/* $Revision$ */
/* $Date$ */
+4
View File
@@ -84,3 +84,7 @@ LBL_ERR:
}
#endif
/* $Source$ */
/* $Revision$ */
/* $Date$ */
+7 -2
View File
@@ -27,7 +27,8 @@
*/
int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen)
{
int err, n, x;
unsigned long n, x;
int err;
LTC_ARGCHK(omac != NULL);
LTC_ARGCHK(in != NULL);
@@ -57,7 +58,7 @@ int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen)
while (inlen != 0) {
/* ok if the block is full we xor in prev, encrypt and replace prev */
if (omac->buflen == omac->blklen) {
for (x = 0; x < omac->blklen; x++) {
for (x = 0; x < (unsigned long)omac->blklen; x++) {
omac->block[x] ^= omac->prev[x];
}
cipher_descriptor[omac->cipher_idx].ecb_encrypt(omac->block, omac->prev, &omac->key);
@@ -77,3 +78,7 @@ int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen)
#endif
/* $Source$ */
/* $Revision$ */
/* $Date$ */
+4
View File
@@ -104,3 +104,7 @@ int omac_test(void)
}
#endif
/* $Source$ */
/* $Revision$ */
/* $Date$ */