added libtomcrypt-1.03
This commit is contained in:
committed by
Steffen Jaeckel
parent
65c1317eee
commit
3964a6523a
@@ -103,3 +103,7 @@ LBL_ERR:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -87,3 +87,7 @@ int hmac_file(int hash, const char *fname,
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -106,3 +106,7 @@ done:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -71,3 +71,7 @@ LBL_ERR:
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -86,3 +86,7 @@ LBL_ERR:
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -37,3 +37,7 @@ int hmac_process(hmac_state *hmac, const unsigned char *in, unsigned long inlen)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -310,3 +310,7 @@ Key First"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -78,3 +78,7 @@ int omac_done(omac_state *omac, unsigned char *out, unsigned long *outlen)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -77,3 +77,7 @@ int omac_file(int cipher,
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -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$ */
|
||||
|
||||
@@ -69,3 +69,7 @@ LBL_ERR:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -84,3 +84,7 @@ LBL_ERR:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -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$ */
|
||||
|
||||
@@ -104,3 +104,7 @@ int omac_test(void)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -102,6 +102,12 @@ int pelican_process(pelican_state *pelmac, const unsigned char *in, unsigned lon
|
||||
|
||||
LTC_ARGCHK(pelmac != NULL);
|
||||
LTC_ARGCHK(in != NULL);
|
||||
|
||||
/* check range */
|
||||
if (pelmac->buflen < 0 || pelmac->buflen > 15) {
|
||||
return CRYPT_INVALID_ARG;
|
||||
}
|
||||
|
||||
#ifdef LTC_FAST
|
||||
if (pelmac->buflen == 0) {
|
||||
while (inlen & ~15) {
|
||||
@@ -136,6 +142,12 @@ int pelican_done(pelican_state *pelmac, unsigned char *out)
|
||||
{
|
||||
LTC_ARGCHK(pelmac != NULL);
|
||||
LTC_ARGCHK(out != NULL);
|
||||
|
||||
/* check range */
|
||||
if (pelmac->buflen < 0 || pelmac->buflen > 16) {
|
||||
return CRYPT_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pelmac->buflen == 16) {
|
||||
four_rounds(pelmac);
|
||||
pelmac->buflen = 0;
|
||||
@@ -147,3 +159,7 @@ int pelican_done(pelican_state *pelmac, unsigned char *out)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -53,3 +53,7 @@ int pelican_memory(const unsigned char *key, unsigned long keylen,
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -114,3 +114,7 @@ int pelican_test(void)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -66,3 +66,7 @@ int pmac_done(pmac_state *state, unsigned char *out, unsigned long *outlen)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -78,3 +78,7 @@ int pmac_file(int cipher,
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -138,3 +138,7 @@ int pmac_init(pmac_state *pmac, int cipher, const unsigned char *key, unsigned l
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -68,3 +68,7 @@ LBL_ERR:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -83,3 +83,7 @@ LBL_ERR:
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -33,3 +33,7 @@ int pmac_ntz(unsigned long x)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -90,3 +90,7 @@ int pmac_process(pmac_state *pmac, const unsigned char *in, unsigned long inlen)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -38,3 +38,7 @@ void pmac_shift_xor(pmac_state *pmac)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -159,3 +159,7 @@ int pmac_test(void)
|
||||
|
||||
|
||||
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
Reference in New Issue
Block a user