diff options
Diffstat (limited to 'cipher')
-rw-r--r-- | cipher/ChangeLog | 5 | ||||
-rw-r--r-- | cipher/Makefile.in | 47 | ||||
-rw-r--r-- | cipher/primegen.c | 9 |
3 files changed, 38 insertions, 23 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog index 8454706d0..088d53e36 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,8 @@ +Thu Feb 26 07:57:02 1998 Werner Koch ([email protected]) + + * primegen.c (generate_elg_prime): Changed the progress printing. + (gen_prime): Ditto. + Tue Feb 24 12:28:42 1998 Werner Koch ([email protected]) * md5.c, md.5 : Replaced by a modified version of md5.c from diff --git a/cipher/Makefile.in b/cipher/Makefile.in index 6264a0d59..41898c6a4 100644 --- a/cipher/Makefile.in +++ b/cipher/Makefile.in @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.2d from Makefile.am +# Makefile.in generated automatically by automake 1.2f from Makefile.am -# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -72,19 +72,25 @@ G10_LOCALEDIR = @G10_LOCALEDIR@ GENCAT = @GENCAT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ +GT_NO = @GT_NO@ +GT_YES = @GT_YES@ +INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ -INTLSUB = @INTLSUB@ +MKINSTALLDIRS = @MKINSTALLDIRS@ MPI_EXTRA_ASM_OBJS = @MPI_EXTRA_ASM_OBJS@ MSGFMT = @MSGFMT@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ +USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ +USE_NLS = @USE_NLS@ VERSION = @VERSION@ ZLIBS = @ZLIBS@ +l = @l@ INCLUDES = -I$(top_srcdir)/include EXTRA_DIST = @CIPHER_EXTRA_DIST@ @@ -164,9 +170,6 @@ distclean-noinstLIBRARIES: maintainer-clean-noinstLIBRARIES: -.c.o: - $(COMPILE) -c $< - .s.o: $(COMPILE) -c $< @@ -174,7 +177,7 @@ maintainer-clean-noinstLIBRARIES: $(COMPILE) -c $< mostlyclean-compile: - -rm -f *.o core + -rm -f *.o core *.core clean-compile: @@ -197,8 +200,12 @@ ID: $(HEADERS) $(SOURCES) $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ - test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: @@ -226,12 +233,7 @@ distdir: $(DISTFILES) || cp -p $$d/$$file $(distdir)/$$file; \ done -MKDEP = $(CC) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) - DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) --include .deps/.P -.deps/.P: $(BUILT_SOURCES) - echo > $@ -include $(DEP_FILES) @@ -244,13 +246,16 @@ distclean-depend: maintainer-clean-depend: -rm -rf .deps -.deps/%.P: %.c - @echo "Computing dependencies for $<..." - @o='o'; \ - test -n "$o" && o='$$o'; \ - $(MKDEP) $< >[email protected] \ - && sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," < [email protected] > $@ \ - && rm -f [email protected] +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).P -c $< + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $< + @-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \ + < .deps/$(*F).p > .deps/$(*F).P + @-rm -f .deps/$(*F).p info: dvi: check: all diff --git a/cipher/primegen.c b/cipher/primegen.c index cf77e66a3..97423a200 100644 --- a/cipher/primegen.c +++ b/cipher/primegen.c @@ -203,7 +203,7 @@ generate_elg_prime( unsigned pbits, unsigned qbits, MPI g, MPI **ret_factors ) else fputc('^', stderr); for(i=0; i < n+2; i++ ) { - fputc('~', stderr); + /*fputc('~', stderr);*/ mpi_fdiv_q(tmp, pmin1, factors[i] ); /* (no mpi_pow(), but it is okay to use this with mod prime) */ mpi_powm(b, g, tmp, prime ); @@ -260,6 +260,8 @@ gen_prime( unsigned nbits, int secret, int randomlevel ) count1 = count2 = 0; /* enter (endless) loop */ for(;;) { + int dotcount=0; + /* generate a random number */ mpi_set_bytes( prime, nbits, get_random_byte, randomlevel ); /* set high order bit to 1, set low order bit to 1 */ @@ -315,7 +317,10 @@ gen_prime( unsigned nbits, int secret, int randomlevel ) m_free(mods); return prime; } - fputc('.', stderr); + if( ++dotcount == 10 ) { + fputc('.', stderr); + dotcount = 0; + } } fputc(':', stderr); /* restart with a new random value */ } |