Hello,
sine wrote:we have implemented and released our open source implementation of "offline nested" attack, tested on Mac OS X and Linux. You can try it here http://www.nethemba.com/mfoc.tar.bz2
Nice job ! But that's better than "our open source implementation", that your Free/Libre implementation (under GPLv2) !
sine wrote:Feel free to provide any feedback, ideas and bug reports. Thanks.
* First, maybe you should release the archive produced using "make dist" or better "make distcheck" instead of compress whole directory (with svn files).
* About subversion, you don't need to put "aclocal.m4", "config.h", "config.h.in" "configure" and "Makefile.in" under VCS, theses files are generated using usual autogen.sh (or sometimes named bootstrap.sh).
Note: if you don't have this file look in libnfc's development repository.
* In configure.ac, you wrote "AC_PREREQ([2.63])" but as far as I see, you don't need 2.63 version, that works fine with 2.61 (version present in Debian Lenny).
* In src/mfoc.c (function "usage"), you should use information provide by autotools (in generated config.h) like PACKAGE_STRING.
ie. instead of
fprintf(stream, "%s, version 0.03\n\n", "mfoc");
you can write
#include "../config.h"
...
fprintf(stream, "%s\n\n", PACKAGE_STRING);
Of course, you need to correctly setup "configure.ac" on each release: ie. for 0.03 version
AC_INIT([mfoc], [0.03], [mifare@nethemba.com])
* In "configure.ac", following lines
AC_SUBST(DEPS_CFLAGS)
AC_SUBST(DEPS_LIBS)
should be replace by
AC_SUBST(LIBNFC_CFLAGS)
AC_SUBST(LIBNFC_LIBS)
because you previously use:
PKG_CHECK_MODULES(LIBNFC, libnfc, [WITH_LIBNFC="1"], [WITH_LIBNFC="0"])
but not
PKG_CHECK_MODULES(DEPS, libnfc, [WITH_LIBNFC="1"], [WITH_LIBNFC="0"])
And you can use theses values in "src/Makefile.am", instead of hardcoded path "-I/usr/local/..."
bin_PROGRAMS = mfoc
# set the include path found by configure
INCLUDES = $(all_includes)
AM_CFLAGS = @LIBNFC_CFLAGS@
AM_LDFLAGS = @LIBNFC_LIBS@
mfoc_SOURCES = mfoc.c crapto1.c crypto1.c
Hope it helps.
Romuald Conty