diff options
-rw-r--r-- | INSTALL | 26 | ||||
-rw-r--r-- | README | 50 | ||||
-rw-r--r-- | cipher/Makefile.am | 2 | ||||
-rw-r--r-- | cipher/Makefile.in | 3 | ||||
-rw-r--r-- | configure.in | 16 | ||||
-rw-r--r-- | mpi/Makefile.am | 4 | ||||
-rw-r--r-- | mpi/Makefile.in | 110 | ||||
-rw-r--r-- | mpi/config.links | 51 |
8 files changed, 227 insertions, 35 deletions
@@ -0,0 +1,26 @@ + + 1) Configure for your machine: + + ./configure + + or use + + ./configure --enable-m-debug + + to ebanle the integrated malloc debugging stuff. + + + 2) Run make: + + make + + + 3) Install + + make install + + + 4) You end up with a binary "g10" in /usr/local/bin + + + @@ -0,0 +1,50 @@ + + G10 - The GNU Enryption and Signing Tool + ------------------------------------------ + + + THIS IS VERSION IS ONLY a TEST VERSION ! YOU SHOULD NOT + USE IT FOR OTHER PURPOSES THAN EVALUATING THE CURRENT CODE. + + * The data format may change in the next version! + + * The code to generate keys is not secure! + + * Some features are not implemented + + + I provide this version as a reality check to start discussion. + Please subscribe to g10@net.lut.ac.uk be sending a mail with + the word "subscribe" in the body to "g10-request@net.lut.ac.uk". + + + See the file COPYING for copyright and warranty information. + + + Due to the fact that G10 does not use use any patented algorithm, + it cannot be compatible to old PGP versions, because those use + IDEA (which is worldwide patented) and RSA (which is patented in + the United States until Sep 20, 2000). I'm sorry about this, but + this is the world we have created (e.g. by using propiertary software). + + + Because the OpenPGP standard is still a draft, G10 is not yet + compatible to it (or PGP 5) - but it will. The data structures + used are compatible with PGP 2.x, so it can parse an list such files + and PGP should be able to parse data created by G10 and complain + about unsupported alogorithms. + + The default algorithms used by G10 are ElGamal for public-key + encryption and signing; Blowfish with a 160 bit key for protecting + the secret-key components, conventional and session encryption; + RIPE MD-160 to create message digest. DSA, SHA-1 and CAST are + also implemented, but not used on default. I decided not + to use DSA as default signing algorithm, cecause it allows only for + 1024 bit keys and this may be not enough in a couple of years. + + Key generation takes a long time and should be improved! + + + + + diff --git a/cipher/Makefile.am b/cipher/Makefile.am index 40b131dd..52de7fab 100644 --- a/cipher/Makefile.am +++ b/cipher/Makefile.am @@ -24,6 +24,6 @@ cipher_SOURCES = blowfish.c \ md.c \ smallprime.c -cipher_LIBADD = rsa.o +##cipher_LIBADD = rsa.o diff --git a/cipher/Makefile.in b/cipher/Makefile.in index 8391d9e9..2747e165 100644 --- a/cipher/Makefile.in +++ b/cipher/Makefile.in @@ -60,8 +60,6 @@ cipher_SOURCES = blowfish.c \ dsa.c \ md.c \ smallprime.c - -cipher_LIBADD = rsa.o mkinstalldirs = $(top_srcdir)/scripts/mkinstalldirs CONFIG_HEADER = ../config.h LIBRARIES = $(noinst_LIBRARIES) @@ -80,6 +78,7 @@ LIBS = @LIBS@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LINK = $(CC) $(LDFLAGS) -o $@ +cipher_LIBADD = cipher_OBJECTS = blowfish.o elgamal.o gost.o md5.o primegen.o random.o \ rmd160.o sha1.o dsa.o md.o smallprime.o EXTRA_cipher_SOURCES = diff --git a/configure.in b/configure.in index 4575bc88..2c09e1a1 100644 --- a/configure.in +++ b/configure.in @@ -22,21 +22,20 @@ fi CFLAGS="-g" dnl -AC_CANONICAL_HOST +AC_CANONICAL_SYSTEM AC_MSG_CHECKING(cached information) -hostcheck="$host" +hostcheck="$target" AC_CACHE_VAL(ac_cv_mpi_hostcheck, [ ac_cv_mpi_hostcheck="$hostcheck" ]) if test "$ac_cv_mpi_hostcheck" != "$hostcheck"; then AC_MSG_RESULT(changed) AC_MSG_WARN(config.cache exists!) AC_MSG_ERROR(you must do 'make distclean' first to compile for -different host or different parameters.) +different target or different parameters.) else AC_MSG_RESULT(ok) fi - dnl Checks for programs. AC_PROG_MAKE_SET @@ -71,8 +70,12 @@ AC_CHECK_FUNCS(strerror strtol strtoul) dnl setup assembler stuff - - +if test -f ./mpi/config.links ; then + . ./mpi/config.links + AC_LINK_FILES( ${mpi_ln_src}, ${mpi_ln_dst} ) +else + AC_MSG_ERROR([mpi/config.links missing!]) +fi @@ -91,6 +94,7 @@ fi AC_SUBST(add_cipher_SOURCES) AC_OUTPUT([ Makefile scripts/Makefile util/Makefile mpi/Makefile \ + mpi/generic/Makefile mpi/i386/Makefile \ cipher/Makefile \ include/Makefile \ g10/Makefile tools/Makefile ], diff --git a/mpi/Makefile.am b/mpi/Makefile.am index f05972ca..33e1ac45 100644 --- a/mpi/Makefile.am +++ b/mpi/Makefile.am @@ -5,6 +5,10 @@ CFLAGS += -O2 SUFFIXES = .S .s +SUBDIRS = generic i386 +EXTRA_DIST = config.links + + noinst_LIBRARIES = mpi noinst_HEADERS = sysdep.h diff --git a/mpi/Makefile.in b/mpi/Makefile.in index d51dcd0f..382a222c 100644 --- a/mpi/Makefile.in +++ b/mpi/Makefile.in @@ -42,6 +42,9 @@ INCLUDES = -I$(top_srcdir)/include SUFFIXES = .S .s +SUBDIRS = generic i386 +EXTRA_DIST = config.links + noinst_LIBRARIES = mpi noinst_HEADERS = sysdep.h @@ -158,13 +161,45 @@ libmpi.a: $(mpi_OBJECTS) $(mpi_LIBADD) $(AR) cru libmpi.a $(mpi_OBJECTS) $(mpi_LIBADD) $(RANLIB) libmpi.a -ID: $(HEADERS) $(SOURCES) - here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS) +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive \ +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + for subdir in $(SUBDIRS); do \ + target=`echo $@ | sed s/-recursive//`; \ + echo making $$target in $$subdir; \ + (cd $$subdir && $(MAKE) $$target) \ + || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" tags: TAGS -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) - here=`pwd` && cd $(srcdir) && etags $(ETAGS_ARGS) $(SOURCES) $(HEADERS) -o $$here/TAGS +tags-recursive: + list="$(SUBDIRS)"; for subdir in $$list; do \ + (cd $$subdir && $(MAKE) tags); \ + done + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(CONFIG_HEADER) \ + $(TAGS_DEPENDENCIES) + tags=; \ + here=`pwd`; \ + for subdir in $(SUBDIRS); do \ + test -f $$subdir/TAGS && { \ + tags="$$tags -i $$here/$$subdir/TAGS"; \ + }; \ + done; \ + test -z "$(ETAGS_ARGS)$(CONFIG_HEADER)$(SOURCES)$(HEADERS)$$tags" \ + || etags $(ETAGS_ARGS) $$tags $(CONFIG_HEADER) $(SOURCES) $(HEADERS) mostlyclean-tags: @@ -183,6 +218,14 @@ distdir: $(DEP_DISTFILES) || ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir)/$$file; \ done + for subdir in $(SUBDIRS); do \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + done # This fragment is probably only useful for maintainers. It relies on # GNU make and gcc. It is only included in the generated Makefile.in @@ -210,28 +253,30 @@ $(srcdir)/.deps/%.P: $(srcdir)/%.c fi # End of maintainer-only section -info: +info: info-recursive + +dvi: dvi-recursive -dvi: +check: all check-recursive -check: all +installcheck: installcheck-recursive -installcheck: +all-am: $(LIBFILES) $(HEADERS) Makefile -install-exec: +install-exec: install-exec-recursive -install-data: +install-data: install-data-recursive -install: install-exec install-data all +install: install-recursive @: -uninstall: +uninstall: uninstall-recursive -all: $(LIBFILES) $(HEADERS) Makefile +all: all-recursive all-am install-strip: $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install -installdirs: +installdirs: installdirs-recursive mostlyclean-generic: @@ -247,29 +292,42 @@ distclean-generic: maintainer-clean-generic: test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \ +mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \ mostlyclean-tags mostlyclean-generic -clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \ - mostlyclean +clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \ + mostlyclean-am -distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \ - distclean-generic clean - rm -f config.status +distclean-am: distclean-noinstLIBRARIES distclean-compile \ + distclean-tags distclean-generic clean-am -maintainer-clean: maintainer-clean-noinstLIBRARIES \ +maintainer-clean-am: maintainer-clean-noinstLIBRARIES \ maintainer-clean-compile maintainer-clean-tags \ - maintainer-clean-generic distclean + maintainer-clean-generic distclean-am + +mostlyclean: mostlyclean-am mostlyclean-recursive + +clean: clean-am clean-recursive + +distclean: distclean-am distclean-recursive + rm -f config.status + +maintainer-clean: maintainer-clean-am maintainer-clean-recursive @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." .PHONY: default mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ mostlyclean-compile distclean-compile clean-compile \ -maintainer-clean-compile tags mostlyclean-tags distclean-tags \ -clean-tags maintainer-clean-tags distdir info dvi check installcheck \ -install-exec install-data install uninstall all installdirs \ -mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-compile install-data-recursive \ +uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info dvi check \ +installcheck all-am install-exec install-data install uninstall all \ +installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean CFLAGS += -O2 diff --git a/mpi/config.links b/mpi/config.links new file mode 100644 index 00000000..e48cf7a0 --- /dev/null +++ b/mpi/config.links @@ -0,0 +1,51 @@ +# sourced my ../configure to get the list of files to link +# this should set $mpi_ln_src and mpi_ln_dst. +# Note: this is called from the above directory. + +echo '# created by config.links - do not edit' >./mpi/asm-syntax.h + +case "${target}" in + i[3456]86*-*-*) + echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h + echo '#include "./i386/syntax.h"' >>./mpi/asm-syntax.h + path="i386" + ;; + i[56]86*-*-* | pentium-*-* | pentiumpro-*-*) + echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h + echo '#include "./i586/syntax.h"' >>./mpi/asm-syntax.h + path="i586" + ;; + *) + echo '/* No assembler modules configured */' >>./mpi/asm-syntax.h + path="" + ;; +esac + + +# fixme: grep these modules from Makefile.in +mpi_ln_modules="mpih-add1 mpih-mul1 mpih-mul2 mpih-mul3 \ + mpih-shift mpih-sub1" + +mpi_ln_objects= +mpi_ln_src= +mpi_ln_dst= + +# try to get file to link from the assembler subdirectory and +# if this fails get it from the generic subdirectory. +path="$path generic" +for fn in $mpi_ln_modules ; do + mpi_ln_objects="$mpi_ln_objects $fn.o" + for dir in $path ; do + rm -f ./mpi/$fn.[Sc] + if test -f ./mpi/$dir/$fn.S ; then + mpi_ln_src="$mpi_ln_src mpi/$dir/$fn.S" + mpi_ln_dst="$mpi_ln_dst mpi/$fn.S" + break; + elif test -f ./mpi/$dir/$fn.c ; then + mpi_ln_src="$mpi_ln_src mpi/$dir/$fn.c" + mpi_ln_dst="$mpi_ln_dst mpi/$fn.c" + break; + fi + done +done + |