Skip to content
Snippets Groups Projects
Commit a79b6151 authored by Matt Johnston's avatar Matt Johnston
Browse files

update to libtomcrypt 1.17 (with Dropbear changes)

parent 99361f54
No related branches found
No related tags found
No related merge requests found
Showing
with 101 additions and 101 deletions
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef GCM_MODE
#ifdef LTC_GCM_MODE
 
/**
Reset a GCM state to as if you just called gcm_init(). This saves the initialization time.
Loading
Loading
@@ -28,7 +28,7 @@ int gcm_reset(gcm_state *gcm)
 
zeromem(gcm->buf, sizeof(gcm->buf));
zeromem(gcm->X, sizeof(gcm->X));
gcm->mode = GCM_MODE_IV;
gcm->mode = LTC_GCM_MODE_IV;
gcm->ivmode = 0;
gcm->buflen = 0;
gcm->totlen = 0;
Loading
Loading
@@ -39,6 +39,6 @@ int gcm_reset(gcm_state *gcm)
 
#endif
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_reset.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/03/31 14:15:35 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef GCM_MODE
#ifdef LTC_GCM_MODE
 
/**
Test the GCM code
Loading
Loading
@@ -408,6 +408,6 @@ int gcm_test(void)
#endif
 
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/gcm/gcm_test.c,v $ */
/* $Revision: 1.20 $ */
/* $Date: 2006/12/03 17:25:44 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef OCB_MODE
#ifdef LTC_OCB_MODE
 
/**
Decrypt a block with OCB.
Loading
Loading
@@ -74,6 +74,6 @@ int ocb_decrypt(ocb_state *ocb, const unsigned char *ct, unsigned char *pt)
#endif
 
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_decrypt.c,v $ */
/* $Revision: 1.5 $ */
/* $Date: 2006/03/31 14:15:35 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef OCB_MODE
#ifdef LTC_OCB_MODE
 
/**
Decrypt and compare the tag with OCB.
Loading
Loading
@@ -81,6 +81,6 @@ LBL_ERR:
 
#endif
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_decrypt_verify_memory.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/03/31 14:15:35 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef OCB_MODE
#ifdef LTC_OCB_MODE
 
/**
Terminate a decrypting OCB state
Loading
Loading
@@ -75,6 +75,6 @@ LBL_ERR:
#endif
 
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_done_decrypt.c,v $ */
/* $Revision: 1.5 $ */
/* $Date: 2006/11/01 09:28:17 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef OCB_MODE
#ifdef LTC_OCB_MODE
 
/**
Terminate an encryption OCB state
Loading
Loading
@@ -41,6 +41,6 @@ int ocb_done_encrypt(ocb_state *ocb, const unsigned char *pt, unsigned long ptle
#endif
 
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_done_encrypt.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/03/31 14:15:35 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef OCB_MODE
#ifdef LTC_OCB_MODE
 
/**
Encrypt a block of data with OCB.
Loading
Loading
@@ -67,6 +67,6 @@ int ocb_encrypt(ocb_state *ocb, const unsigned char *pt, unsigned char *ct)
 
#endif
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_encrypt.c,v $ */
/* $Revision: 1.5 $ */
/* $Date: 2006/03/31 14:15:35 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef OCB_MODE
#ifdef LTC_OCB_MODE
 
/**
Encrypt and generate an authentication code for a buffer of memory
Loading
Loading
@@ -79,6 +79,6 @@ LBL_ERR:
 
#endif
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_encrypt_authenticate_memory.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/03/31 14:15:35 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef OCB_MODE
#ifdef LTC_OCB_MODE
 
static const struct {
int len;
Loading
Loading
@@ -132,6 +132,6 @@ int ocb_init(ocb_state *ocb, int cipher,
 
#endif
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_init.c,v $ */
/* $Revision: 1.5 $ */
/* $Date: 2006/03/31 14:15:35 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -16,7 +16,7 @@
 
#include "tomcrypt.h"
 
#ifdef OCB_MODE
#ifdef LTC_OCB_MODE
 
/**
Returns the number of leading zero bits [from lsb up]
Loading
Loading
@@ -37,6 +37,6 @@ int ocb_ntz(unsigned long x)
 
#endif
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_ntz.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/03/31 14:15:35 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef OCB_MODE
#ifdef LTC_OCB_MODE
 
/**
Compute the shift/xor for OCB (internal function)
Loading
Loading
@@ -34,6 +34,6 @@ void ocb_shift_xor(ocb_state *ocb, unsigned char *Z)
 
#endif
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_shift_xor.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/03/31 14:15:35 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef OCB_MODE
#ifdef LTC_OCB_MODE
 
/**
Test the OCB protocol
Loading
Loading
@@ -222,7 +222,7 @@ int ocb_test(void)
#endif /* LTC_TEST */
}
 
#endif /* OCB_MODE */
#endif /* LTC_OCB_MODE */
 
 
/* some comments
Loading
Loading
@@ -232,6 +232,6 @@ int ocb_test(void)
-- The setup is somewhat complicated...
*/
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/ocb_test.c,v $ */
/* $Revision: 1.5 $ */
/* $Date: 2006/11/01 09:28:17 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
/**
Loading
Loading
@@ -15,7 +15,7 @@
*/
#include "tomcrypt.h"
 
#ifdef OCB_MODE
#ifdef LTC_OCB_MODE
 
/* Since the last block is encrypted in CTR mode the same code can
* be used to finish a decrypt or encrypt stream. The only difference
Loading
Loading
@@ -143,6 +143,6 @@ error:
#endif
 
 
/* $Source: /cvs/libtom/libtomcrypt/src/encauth/ocb/s_ocb_done.c,v $ */
/* $Revision: 1.6 $ */
/* $Date: 2006/03/31 14:15:35 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
 
#include "tomcrypt.h"
Loading
Loading
@@ -16,7 +16,7 @@
CHC support. (Tom St Denis)
*/
 
#ifdef CHC_HASH
#ifdef LTC_CHC_HASH
 
#define UNDEFED_HASH -17
 
Loading
Loading
@@ -293,6 +293,6 @@ int chc_test(void)
 
#endif
 
/* $Source: /cvs/libtom/libtomcrypt/src/hashes/chc/chc.c,v $ */
/* $Revision: 1.6 $ */
/* $Date: 2006/11/01 09:28:17 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
 
Loading
Loading
@@ -53,6 +53,6 @@ int hash_file(int hash, const char *fname, unsigned char *out, unsigned long *ou
}
 
 
/* $Source: /cvs/libtom/libtomcrypt/src/hashes/helper/hash_file.c,v $ */
/* $Revision: 1.4 $ */
/* $Date: 2006/03/31 14:15:35 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
 
Loading
Loading
@@ -67,6 +67,6 @@ int hash_filehandle(int hash, FILE *in, unsigned char *out, unsigned long *outle
}
 
 
/* $Source: /cvs/libtom/libtomcrypt/src/hashes/helper/hash_filehandle.c,v $ */
/* $Revision: 1.5 $ */
/* $Date: 2006/06/16 21:53:41 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
 
Loading
Loading
@@ -64,6 +64,6 @@ LBL_ERR:
return err;
}
 
/* $Source: /cvs/libtom/libtomcrypt/src/hashes/helper/hash_memory.c,v $ */
/* $Revision: 1.5 $ */
/* $Date: 2006/06/16 21:53:41 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
#include <stdarg.h>
Loading
Loading
@@ -82,6 +82,6 @@ LBL_ERR:
return err;
}
 
/* $Source: /cvs/libtom/libtomcrypt/src/hashes/helper/hash_memory_multi.c,v $ */
/* $Revision: 1.5 $ */
/* $Date: 2006/06/16 21:53:41 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,16 +6,16 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
 
/**
@param md2.c
MD2 (RFC 1319) hash function implementation by Tom St Denis
LTC_MD2 (RFC 1319) hash function implementation by Tom St Denis
*/
 
#ifdef MD2
#ifdef LTC_MD2
 
const struct ltc_hash_descriptor md2_desc =
{
Loading
Loading
@@ -102,7 +102,7 @@ int md2_init(hash_state *md)
{
LTC_ARGCHK(md != NULL);
 
/* MD2 uses a zero'ed state... */
/* LTC_MD2 uses a zero'ed state... */
zeromem(md->md2.X, sizeof(md->md2.X));
zeromem(md->md2.chksum, sizeof(md->md2.chksum));
zeromem(md->md2.buf, sizeof(md->md2.buf));
Loading
Loading
@@ -246,6 +246,6 @@ int md2_test(void)
#endif
 
 
/* $Source: /cvs/libtom/libtomcrypt/src/hashes/md2.c,v $ */
/* $Revision: 1.8 $ */
/* $Date: 2006/11/01 09:28:17 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading
Loading
@@ -6,7 +6,7 @@
* The library is free for all purposes without any express
* guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
 
Loading
Loading
@@ -15,7 +15,7 @@
Submitted by Dobes Vandermeer (dobes@smartt.com)
*/
 
#ifdef MD4
#ifdef LTC_MD4
 
const struct ltc_hash_descriptor md4_desc =
{
Loading
Loading
@@ -48,7 +48,7 @@ const struct ltc_hash_descriptor md4_desc =
#define S33 11
#define S34 15
 
/* F, G and H are basic MD4 functions. */
/* F, G and H are basic LTC_MD4 functions. */
#define F(x, y, z) (z ^ (x & (y ^ z)))
#define G(x, y, z) ((x & y) | (z & (x | y)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
Loading
Loading
@@ -302,6 +302,6 @@ int md4_test(void)
 
 
 
/* $Source: /cvs/libtom/libtomcrypt/src/hashes/md4.c,v $ */
/* $Revision: 1.8 $ */
/* $Date: 2006/11/01 09:28:17 $ */
/* $Source$ */
/* $Revision$ */
/* $Date$ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment