beecrypt-3.0.0 merge: entropy_noise_gather converts bits-tp-bytes, not words.
CVS patchset: 6791 CVS date: 2003/04/30 00:11:40
This commit is contained in:
parent
d38e3db906
commit
ac36dd4749
|
@ -38,7 +38,7 @@ if [ X"$@" = X -a "X`uname -s`" = "XLinux" ]; then
|
|||
mandir=/usr/man
|
||||
infodir=/usr/info
|
||||
fi
|
||||
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=${infodir} --mandir=${mandir} --enable-static "$@"
|
||||
CPPFLAGS="-Wall -g" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=${infodir} --mandir=${mandir} --enable-static "$@"
|
||||
else
|
||||
./configure "$@"
|
||||
fi
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "system.h"
|
||||
#include "base64.h"
|
||||
#include "endianness.h" /* XXX swapu32 for crc */
|
||||
#include "debug.h"
|
||||
|
||||
/*@unchecked@*/
|
||||
|
|
|
@ -214,8 +214,6 @@ int randomGeneratorContextInit(randomGeneratorContext* ctxt, const randomGenerat
|
|||
return -1;
|
||||
|
||||
ctxt->rng = rng;
|
||||
if (ctxt->param) /* XXX error? */
|
||||
free(ctxt->param);
|
||||
ctxt->param = (randomGeneratorParam*) calloc(rng->paramsize, 1);
|
||||
|
||||
/*@-nullstate@*/ /* FIX: ctxt->param may be NULL */
|
||||
|
|
|
@ -203,10 +203,10 @@ static int dhaes_pContextSetup(dhaes_pContext* ctxt, const mpnumber* privkey, co
|
|||
}
|
||||
|
||||
/* compute the hash of the message (ephemeral public) key and the shared secret */
|
||||
(void) hashFunctionContextReset (&ctxt->hash);
|
||||
(void) hashFunctionContextReset (&ctxt->hash);
|
||||
(void) hashFunctionContextUpdateMP(&ctxt->hash, message);
|
||||
(void) hashFunctionContextUpdateMP(&ctxt->hash, &secret);
|
||||
(void) hashFunctionContextDigest (&ctxt->hash, &digest);
|
||||
(void) hashFunctionContextDigest (&ctxt->hash, digest);
|
||||
|
||||
/* we don't need the secret anymore */
|
||||
mpnwipe(&secret);
|
||||
|
|
|
@ -344,7 +344,7 @@ static int entropy_noise_gather(int fd, int samplesize, int channels, int swap,
|
|||
/*@modifies data, errno, fileSystem @*/
|
||||
#endif
|
||||
{
|
||||
size_t randombits = ((unsigned)size) << 5;
|
||||
size_t randombits = size << 3;
|
||||
byte temp = 0;
|
||||
int rc, i;
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include "system.h"
|
||||
#include "beecrypt.h"
|
||||
#include "endianness.h" /* XXX for encodeInts */
|
||||
#include "fips186.h"
|
||||
#include "mpopt.h"
|
||||
#include "mp.h"
|
||||
|
|
|
@ -96,7 +96,7 @@ int mtprngSetup(mtprngParam* mp)
|
|||
|
||||
mp->left = 0;
|
||||
|
||||
return entropyGatherNext(mp->state, N+1);
|
||||
return entropyGatherNext((byte*)mp->state, N+1);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,8 @@ LDADD = $(top_builddir)/libbeecrypt.la
|
|||
|
||||
TESTS = testmd5 testsha1 testsha256 testhmacmd5 testhmacsha1 testblowfish testrsa testdldp
|
||||
|
||||
staticLDFLAGS = -all-static
|
||||
|
||||
check_PROGRAMS = testmd5 testsha1 testsha256 testhmacmd5 testhmacsha1 testblowfish testrsa testdldp
|
||||
|
||||
testmd5_SOURCES = testmd5.c
|
||||
|
@ -44,6 +46,8 @@ testblowfish_SOURCES = testblowfish.c
|
|||
testrsa_SOURCES = testrsa.c
|
||||
|
||||
testdldp_SOURCES = testdldp.c
|
||||
#testdldp_LDADD = $(LDADD) -lpthread
|
||||
#testdldp_LDFLAGS = $(staticLDFLAGS)
|
||||
|
||||
EXTRA_PROGRAMS = benchme benchhf benchbc
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
#include "beecrypt.h"
|
||||
#include "blockmode.h"
|
||||
#include "aes.h"
|
||||
|
@ -39,20 +41,7 @@
|
|||
#include "sha256.h"
|
||||
#include "mp.h"
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
#if HAVE_ERRNO_H
|
||||
# include <errno.h>
|
||||
#endif
|
||||
#if HAVE_TIME_H
|
||||
# include <time.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "debug.h"
|
||||
|
||||
/*@unchecked@*/ /*@observer@*/
|
||||
static const char* dsa_p = "8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8324f0d7882e5d0762fc5b7210eafc2e9adac32ab7aac49693dfbf83724c2ec0736ee31c80291";
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
* \author Bob Deblier <bob.deblier@pandora.be>
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
#include "beecrypt.h"
|
||||
#include "timestamp.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "debug.h"
|
||||
|
||||
#define SECONDS 10
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
* \author Bob Deblier <bob.deblier@pandora.be>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "beecrypt.h"
|
||||
#include "timestamp.h"
|
||||
#include "debug.h"
|
||||
|
||||
#define SECONDS 10
|
||||
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
* \author Bob Deblier <bob.deblier@pandora.be>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "beecrypt.h"
|
||||
#include "dldp.h"
|
||||
#include "timestamp.h"
|
||||
#include "debug.h"
|
||||
|
||||
#define SECONDS 10
|
||||
|
||||
|
|
|
@ -4,22 +4,9 @@
|
|||
|
||||
static int _debug = 0;
|
||||
|
||||
#include "system.h"
|
||||
#include "base64.h"
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
#if HAVE_ERRNO_H
|
||||
# include <errno.h>
|
||||
#endif
|
||||
#if HAVE_TIME_H
|
||||
# include <time.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "debug.h"
|
||||
|
||||
static inline int grab(const byte *s, int nbytes)
|
||||
{
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
* \ingroup UNIT_m
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "blowfish.h"
|
||||
#include "debug.h"
|
||||
|
||||
struct vector
|
||||
{
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
* \ingroup UNIT_m
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "beecrypt.h"
|
||||
#include "dldp.h"
|
||||
#include "debug.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
* \ingroup UNIT_m
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "beecrypt.h"
|
||||
#include "dlkp.h"
|
||||
#include "dsa.h"
|
||||
#include "debug.h"
|
||||
|
||||
static const char* dsa_p = "8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8324f0d7882e5d0762fc5b7210eafc2e9adac32ab7aac49693dfbf83724c2ec0736ee31c80291";
|
||||
static const char* dsa_q = "c773218c737ec8ee993b4f2ded30f48edace915f";
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
* \ingroup UNIT_m
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "hmacmd5.h"
|
||||
#include "debug.h"
|
||||
|
||||
struct vector
|
||||
{
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
* \ingroup UNIT_m
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "hmacsha1.h"
|
||||
#include "debug.h"
|
||||
|
||||
struct vector
|
||||
{
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
* \ingroup UNIT_m
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "md5.h"
|
||||
#include "debug.h"
|
||||
|
||||
struct vector
|
||||
{
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
* \ingroup UNIT_m
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "beecrypt.h"
|
||||
#include "rsa.h"
|
||||
#include "debug.h"
|
||||
|
||||
static const char* rsa_n = "bbf82f090682ce9c2338ac2b9da871f7368d07eed41043a440d6b6f07454f51fb8dfbaaf035c02ab61ea48ceeb6fcd4876ed520d60e1ec4619719d8a5b8b807fafb8e0a3dfc737723ee6b4b7d93a2584ee6a649d060953748834b2454598394ee0aab12d7b61a51f527a9a41f6c1687fe2537298ca2a8f5946f8e5fd091dbdcb";
|
||||
static const char* rsa_e = "11";
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
* \ingroup UNIT_m
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "sha1.h"
|
||||
#include "memchunk.h"
|
||||
#include "debug.h"
|
||||
|
||||
struct vector
|
||||
{
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "sha256.h"
|
||||
#include "debug.h"
|
||||
|
||||
struct vector
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue