diff --git a/AUTHORS b/AUTHORS index b05750a..e373a15 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,4 +1,5 @@ 程序编写 + hyrathb HustMoon form HUST kkHAIKE from XTU @@ -8,3 +9,6 @@ deb包脚本 Cheese Lee from SYSU +逆向 + hyrathb + 紫禁北归 \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index d97a98e..27bfa2e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,21 +1,21 @@ -ACLOCAL_AMFLAGS = -I m4 - -SUBDIRS = src po +SUBDIRS = src dist_doc_DATA = README dist_man_MANS = mentohust.1 -EXTRA_DIST = @PACKAGE_NAME@.spec.in m4 debian/changelog debian/compat debian/control debian/copyright debian/rules debian/watch +SPEC = mentohust.spec + +EXTRA_DIST = $(SPEC) debian/changelog debian/compat debian/control debian/copyright debian/rules debian/watch -rpm: dist @PACKAGE_NAME@.spec - rpmbuild -bb \ - --define "_sourcedir `pwd`" \ - --define "_builddir `pwd`" \ - --define "_specdir `pwd`" \ - --define "_rpmdir `pwd`" \ - --define "_srcrpmdir `pwd`" \ - @PACKAGE_NAME@.spec +rpm: dist-gzip + mkdir -p ~/rpmbuild/SOURCES/ + mv mentohust-*.tar.gz ~/rpmbuild/SOURCES/ + if [ -z "$(TARGET)" ] ;then \ + rpmbuild -bb $(top_srcdir)/$(SPEC) ; \ + else rpmbuild -bb $(top_srcdir)/$(SPEC) --target=$(TARGET) ; fi + mv ~/rpmbuild/RPMS/*$(TARGET)/mentohust-*$(TARGET).rpm ./ + rm ~/rpmbuild/SOURCES/mentohust* deb: debian/rules dpkg-buildpackage -rfakeroot -uc -b -d diff --git a/README b/README index 90131c6..e2563aa 100644 --- a/README +++ b/README @@ -1,32 +1,21 @@ +完全没怎么看原来的代码,瞎改的。 +加入了V4支持。具体算法看checkV4.c + +所有hash都是从算法在rhash和ampheck借来魔改的……。 + #使用方法 #安装mentohust:建议Ubuntu用户使用Deb包安装,Fedora用户使用RPM包安装 #如果确定自己可以使用xrgsu认证成功,打开终端输入sudo mentohust运行即可 -如果不确定,切换到锐捷所在目录,然后输入以下命令: +#如果不确定,切换到锐捷所在目录,然后输入以下命令: sudo mkdir /etc/mentohust sudo cp ./8021x.exe /etc/mentohust -sudo cp ./W32N55.dll /etc/mentohust -然后打开终端输入sudo mentohust运行。如果认证失败,再切换到锐捷所在目录,输入以下命令: -sudo cp ./SuConfig.dat /etc/mentohust -然后打开终端输入sudo mentohust运行即可。 -如果准确按以上步骤操作后还是认证失败,请下载MentoHUSTTool,在Windows下抓包并保存为data.mpf, +#如果准确按以上步骤操作后还是认证失败,请下载MentoHUSTTool,在Windows下抓包并保存为data.mpf, 然后回到Linux,切换到data.mpf所在目录,输入以下命令: sudo cp ./data.mpf /etc/mentohust 然后打开终端输入sudo mentohust -f/etc/mentohust/data.mpf -w运行即可。以后也只需输入sudo mentohust。 -#您也可以按下面的方法操作: -1、静态IP用户请事先设置好IP; -2、打开终端,输入sudo mentohust,回车; -3、[正确]输入相应信息,如果认证成功,跳到第8步;如果提示“不允许使用的客户端类型”,按Ctrl+C结束认证; -4、打开终端,输入sudo mentohust -w -f'锐捷目录下任意文件路径',回车; -5、如果认证成功,跳到第8步;如果提示“客户端完整性被破坏”,按Ctrl+C结束认证; -6、将锐捷安装目录下的SuConfig.dat重命名为其他名字; -7、打开终端,输入sudo mentohust,回车; -8、如果是动态IP且不是Linux,打开相应设置去更新IP。 -9、以后认证只需打开终端,输入sudo mentohust,回车。 -10、要修改某些参数请输入mentohust -h查看帮助信息并据此修改,例如修改密码sudo mentohust -pNewPassword -w,要临时修改则不加-w参数。 - #如何退出:不以后台模式运行mentohust时,按Ctrl+C即可退出;后台运行时使用sudo mentohust -k退出认证。 #查看帮助信息请输入:mentohust -h diff --git a/configure.ac b/configure.ac index d1d79f1..7a6db40 100644 --- a/configure.ac +++ b/configure.ac @@ -8,8 +8,6 @@ AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/myconfig.h]) AC_CONFIG_HEADERS([config.h]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) - # Checks for programs. AS_IF([test "x$prefix" = "xNONE"], [prefix="/usr"]) AC_ARG_ENABLE([debug], [AC_HELP_STRING([ --enable-debug], [Build a debug version])], @@ -51,24 +49,16 @@ AS_IF([test "x$enable_notify" = "xno"], [AC_DEFINE(NO_NOTIFY, [], [Define NO_NOTIFY to disable notification])], [AC_CHECK_LIB([dl], [dlsym])]) -AS_IF([test -z "$enable_nls"], [enable_nls="yes"]) - -GETTEXT_PACKAGE="$PACKAGE_NAME" -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext.]) -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION(0.16.1) - # Checks for header files. -AC_CHECK_HEADERS([iconv.h arpa/inet.h fcntl.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h libintl.h locale.h]) +AC_CHECK_HEADERS([iconv.h arpa/inet.h fcntl.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T # Checks for library functions. -AC_CHECK_FUNCS([atexit memmove memset socket strrchr setlocale]) +AC_CHECK_FUNCS([atexit memmove memset socket strrchr]) -AC_CONFIG_FILES([Makefile src/Makefile po/Makefile.in mentohust.spec]) +AC_CONFIG_FILES([Makefile src/Makefile]) -AC_MSG_RESULT([config result: host($host_os) pcap($with_pcap) notify($enable_notify) encode($enable_encodepass) arp($enable_arp) nls($enable_nls)]) +AC_MSG_RESULT([config result: host($host_os) pcap($with_pcap) notify($enable_notify) encode($enable_encodepass) arp($enable_arp)]) AC_OUTPUT diff --git a/src/.checkV4.c.un~ b/src/.checkV4.c.un~ new file mode 100644 index 0000000..f798ccf Binary files /dev/null and b/src/.checkV4.c.un~ differ diff --git a/src/.deps/byte_order.Po b/src/.deps/byte_order.Po new file mode 100644 index 0000000..96aae45 --- /dev/null +++ b/src/.deps/byte_order.Po @@ -0,0 +1,90 @@ +byte_order.o: byte_order.c /usr/include/stdc-predef.h byte_order.h ustd.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/bits/wchar.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-float.h + +/usr/include/stdc-predef.h: + +byte_order.h: + +ustd.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/bits/wchar.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: diff --git a/src/.deps/checkV4.Po b/src/.deps/checkV4.Po new file mode 100644 index 0000000..24ceab2 --- /dev/null +++ b/src/.deps/checkV4.Po @@ -0,0 +1,127 @@ +checkV4.o: checkV4.c /usr/include/stdc-predef.h rjwhirlpool.h ustd.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/bits/wchar.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-float.h rjmd5.h rjtiger.h rjripemd128.h \ + rjsha1.h md5.h types.h checkV4.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/xlocale.h + +/usr/include/stdc-predef.h: + +rjwhirlpool.h: + +ustd.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/bits/wchar.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: + +rjmd5.h: + +rjtiger.h: + +rjripemd128.h: + +rjsha1.h: + +md5.h: + +types.h: + +checkV4.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/string.h: + +/usr/include/xlocale.h: diff --git a/src/.deps/dlfunc.Po b/src/.deps/dlfunc.Po new file mode 100644 index 0000000..c5250ab --- /dev/null +++ b/src/.deps/dlfunc.Po @@ -0,0 +1,60 @@ +dlfunc.o: dlfunc.c /usr/include/stdc-predef.h dlfunc.h ../config.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h + +/usr/include/stdc-predef.h: + +dlfunc.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/sys/time.h: + +/usr/include/time.h: + +/usr/include/bits/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: diff --git a/src/.deps/md5.Po b/src/.deps/md5.Po new file mode 100644 index 0000000..970736c --- /dev/null +++ b/src/.deps/md5.Po @@ -0,0 +1,28 @@ +md5.o: md5.c /usr/include/stdc-predef.h md5.h types.h \ + /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/xlocale.h + +/usr/include/stdc-predef.h: + +md5.h: + +types.h: + +/usr/include/string.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/xlocale.h: diff --git a/src/.deps/mentohust.Po b/src/.deps/mentohust.Po new file mode 100644 index 0000000..9ed4ba1 --- /dev/null +++ b/src/.deps/mentohust.Po @@ -0,0 +1,174 @@ +mentohust.o: mentohust.c /usr/include/stdc-predef.h ../config.h \ + myconfig.h mystate.h myfunc.h /usr/include/sys/types.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/time.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h dlfunc.h \ + /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ + /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/sys/time.h /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/sys/ucontext.h /usr/include/bits/sigthread.h \ + /usr/include/string.h /usr/include/xlocale.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/alloca.h /usr/include/bits/stdlib-float.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/bits/wchar.h \ + /usr/include/sys/socket.h /usr/include/sys/uio.h /usr/include/bits/uio.h \ + /usr/include/bits/socket.h /usr/include/bits/socket_type.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm-generic/socket.h /usr/include/asm/sockios.h \ + /usr/include/asm-generic/sockios.h /usr/include/bits/in.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/iconv.h + +/usr/include/stdc-predef.h: + +../config.h: + +myconfig.h: + +mystate.h: + +myfunc.h: + +/usr/include/sys/types.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/time.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +dlfunc.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/sys/time.h: + +/usr/include/signal.h: + +/usr/include/bits/signum.h: + +/usr/include/bits/siginfo.h: + +/usr/include/bits/sigaction.h: + +/usr/include/bits/sigcontext.h: + +/usr/include/bits/sigstack.h: + +/usr/include/sys/ucontext.h: + +/usr/include/bits/sigthread.h: + +/usr/include/string.h: + +/usr/include/xlocale.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: + +/usr/include/netinet/in.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/bits/wchar.h: + +/usr/include/sys/socket.h: + +/usr/include/sys/uio.h: + +/usr/include/bits/uio.h: + +/usr/include/bits/socket.h: + +/usr/include/bits/socket_type.h: + +/usr/include/bits/sockaddr.h: + +/usr/include/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/bits/in.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/iconv.h: diff --git a/src/.deps/mycheck.Po b/src/.deps/mycheck.Po new file mode 100644 index 0000000..40ee86e --- /dev/null +++ b/src/.deps/mycheck.Po @@ -0,0 +1,94 @@ +mycheck.o: mycheck.c /usr/include/stdc-predef.h mycheck.h types.h md5.h \ + /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/bits/byteswap.h \ + /usr/include/bits/byteswap-16.h /usr/include/sys/types.h \ + /usr/include/time.h /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \ + /usr/include/alloca.h /usr/include/bits/stdlib-float.h \ + /usr/include/string.h /usr/include/xlocale.h + +/usr/include/stdc-predef.h: + +mycheck.h: + +types.h: + +md5.h: + +/usr/include/stdio.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: + +/usr/include/string.h: + +/usr/include/xlocale.h: diff --git a/src/.deps/myconfig.Po b/src/.deps/myconfig.Po new file mode 100644 index 0000000..8b0a7c6 --- /dev/null +++ b/src/.deps/myconfig.Po @@ -0,0 +1,185 @@ +myconfig.o: myconfig.c /usr/include/stdc-predef.h ../config.h myconfig.h \ + myini.h /usr/include/stdlib.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \ + /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-float.h myfunc.h dlfunc.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/sys/time.h /usr/include/string.h /usr/include/xlocale.h \ + /usr/include/arpa/inet.h /usr/include/netinet/in.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/bits/wchar.h \ + /usr/include/sys/socket.h /usr/include/sys/uio.h /usr/include/bits/uio.h \ + /usr/include/bits/socket.h /usr/include/bits/socket_type.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm-generic/socket.h /usr/include/asm/sockios.h \ + /usr/include/asm-generic/sockios.h /usr/include/bits/in.h \ + /usr/include/fcntl.h /usr/include/bits/fcntl.h \ + /usr/include/bits/fcntl-linux.h /usr/include/bits/stat.h \ + /usr/include/signal.h /usr/include/bits/signum.h \ + /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \ + /usr/include/bits/sigcontext.h /usr/include/bits/sigstack.h \ + /usr/include/sys/ucontext.h /usr/include/bits/sigthread.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/sys/stat.h + +/usr/include/stdc-predef.h: + +../config.h: + +myconfig.h: + +myini.h: + +/usr/include/stdlib.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: + +myfunc.h: + +dlfunc.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/sys/time.h: + +/usr/include/string.h: + +/usr/include/xlocale.h: + +/usr/include/arpa/inet.h: + +/usr/include/netinet/in.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/bits/wchar.h: + +/usr/include/sys/socket.h: + +/usr/include/sys/uio.h: + +/usr/include/bits/uio.h: + +/usr/include/bits/socket.h: + +/usr/include/bits/socket_type.h: + +/usr/include/bits/sockaddr.h: + +/usr/include/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/bits/in.h: + +/usr/include/fcntl.h: + +/usr/include/bits/fcntl.h: + +/usr/include/bits/fcntl-linux.h: + +/usr/include/bits/stat.h: + +/usr/include/signal.h: + +/usr/include/bits/signum.h: + +/usr/include/bits/siginfo.h: + +/usr/include/bits/sigaction.h: + +/usr/include/bits/sigcontext.h: + +/usr/include/bits/sigstack.h: + +/usr/include/sys/ucontext.h: + +/usr/include/bits/sigthread.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/sys/stat.h: diff --git a/src/.deps/myfunc.Po b/src/.deps/myfunc.Po new file mode 100644 index 0000000..1bb99e9 --- /dev/null +++ b/src/.deps/myfunc.Po @@ -0,0 +1,180 @@ +myfunc.o: myfunc.c /usr/include/stdc-predef.h myfunc.h \ + /usr/include/sys/types.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \ + /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/time.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h md5.h \ + types.h mycheck.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/xlocale.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/alloca.h /usr/include/bits/stdlib-float.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/bits/wchar.h \ + /usr/include/sys/socket.h /usr/include/sys/uio.h /usr/include/bits/uio.h \ + /usr/include/bits/socket.h /usr/include/bits/socket_type.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm-generic/socket.h /usr/include/asm/sockios.h \ + /usr/include/asm-generic/sockios.h /usr/include/bits/in.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h /usr/include/bits/confname.h \ + /usr/include/getopt.h /usr/include/sys/ioctl.h \ + /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \ + /usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \ + /usr/include/asm/ioctl.h /usr/include/asm-generic/ioctl.h \ + /usr/include/bits/ioctl-types.h /usr/include/sys/ttydefaults.h \ + /usr/include/net/if.h /usr/include/arpa/inet.h /usr/include/sys/poll.h \ + /usr/include/bits/poll.h + +/usr/include/stdc-predef.h: + +myfunc.h: + +/usr/include/sys/types.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/time.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +md5.h: + +types.h: + +mycheck.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/string.h: + +/usr/include/xlocale.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: + +/usr/include/netinet/in.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/bits/wchar.h: + +/usr/include/sys/socket.h: + +/usr/include/sys/uio.h: + +/usr/include/bits/uio.h: + +/usr/include/bits/socket.h: + +/usr/include/bits/socket_type.h: + +/usr/include/bits/sockaddr.h: + +/usr/include/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/bits/in.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/sys/ioctl.h: + +/usr/include/bits/ioctls.h: + +/usr/include/asm/ioctls.h: + +/usr/include/asm-generic/ioctls.h: + +/usr/include/linux/ioctl.h: + +/usr/include/asm/ioctl.h: + +/usr/include/asm-generic/ioctl.h: + +/usr/include/bits/ioctl-types.h: + +/usr/include/sys/ttydefaults.h: + +/usr/include/net/if.h: + +/usr/include/arpa/inet.h: + +/usr/include/sys/poll.h: + +/usr/include/bits/poll.h: diff --git a/src/.deps/myini.Po b/src/.deps/myini.Po new file mode 100644 index 0000000..d8ca35a --- /dev/null +++ b/src/.deps/myini.Po @@ -0,0 +1,90 @@ +myini.o: myini.c /usr/include/stdc-predef.h myini.h /usr/include/stdlib.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-float.h /usr/include/stdio.h \ + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/string.h /usr/include/xlocale.h + +/usr/include/stdc-predef.h: + +myini.h: + +/usr/include/stdlib.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/string.h: + +/usr/include/xlocale.h: diff --git a/src/.deps/mystate.Po b/src/.deps/mystate.Po new file mode 100644 index 0000000..40c003c --- /dev/null +++ b/src/.deps/mystate.Po @@ -0,0 +1,140 @@ +mystate.o: mystate.c /usr/include/stdc-predef.h mystate.h myfunc.h \ + /usr/include/sys/types.h /usr/include/features.h \ + /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \ + /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/time.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/select.h /usr/include/bits/select.h \ + /usr/include/bits/sigset.h /usr/include/bits/time.h \ + /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h dlfunc.h \ + ../config.h /usr/include/stdio.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/sys/time.h checkV4.h /usr/include/string.h \ + /usr/include/xlocale.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/alloca.h /usr/include/bits/stdlib-float.h \ + /usr/include/netinet/in.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/bits/wchar.h \ + /usr/include/sys/socket.h /usr/include/sys/uio.h /usr/include/bits/uio.h \ + /usr/include/bits/socket.h /usr/include/bits/socket_type.h \ + /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \ + /usr/include/asm-generic/socket.h /usr/include/asm/sockios.h \ + /usr/include/asm-generic/sockios.h /usr/include/bits/in.h + +/usr/include/stdc-predef.h: + +mystate.h: + +myfunc.h: + +/usr/include/sys/types.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/time.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +dlfunc.h: + +../config.h: + +/usr/include/stdio.h: + +/usr/include/libio.h: + +/usr/include/_G_config.h: + +/usr/include/wchar.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdarg.h: + +/usr/include/bits/stdio_lim.h: + +/usr/include/bits/sys_errlist.h: + +/usr/include/sys/time.h: + +checkV4.h: + +/usr/include/string.h: + +/usr/include/xlocale.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: + +/usr/include/netinet/in.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/bits/wchar.h: + +/usr/include/sys/socket.h: + +/usr/include/sys/uio.h: + +/usr/include/bits/uio.h: + +/usr/include/bits/socket.h: + +/usr/include/bits/socket_type.h: + +/usr/include/bits/sockaddr.h: + +/usr/include/asm/socket.h: + +/usr/include/asm-generic/socket.h: + +/usr/include/asm/sockios.h: + +/usr/include/asm-generic/sockios.h: + +/usr/include/bits/in.h: diff --git a/src/.deps/rjmd5.Po b/src/.deps/rjmd5.Po new file mode 100644 index 0000000..0777bd3 --- /dev/null +++ b/src/.deps/rjmd5.Po @@ -0,0 +1,28 @@ +rjmd5.o: rjmd5.c /usr/include/stdc-predef.h /usr/include/memory.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/string.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/xlocale.h rjmd5.h + +/usr/include/stdc-predef.h: + +/usr/include/memory.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/string.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/xlocale.h: + +rjmd5.h: diff --git a/src/.deps/rjripemd128.Po b/src/.deps/rjripemd128.Po new file mode 100644 index 0000000..b0eddf3 --- /dev/null +++ b/src/.deps/rjripemd128.Po @@ -0,0 +1,35 @@ +rjripemd128.o: rjripemd128.c /usr/include/stdc-predef.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/bits/wchar.h \ + /usr/include/string.h /usr/include/xlocale.h ampheck.h rjripemd128.h + +/usr/include/stdc-predef.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/bits/wchar.h: + +/usr/include/string.h: + +/usr/include/xlocale.h: + +ampheck.h: + +rjripemd128.h: diff --git a/src/.deps/rjsha1.Po b/src/.deps/rjsha1.Po new file mode 100644 index 0000000..4acc399 --- /dev/null +++ b/src/.deps/rjsha1.Po @@ -0,0 +1,97 @@ +rjsha1.o: rjsha1.c /usr/include/stdc-predef.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/xlocale.h byte_order.h ustd.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-float.h rjsha1.h + +/usr/include/stdc-predef.h: + +/usr/include/string.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/xlocale.h: + +byte_order.h: + +ustd.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/bits/wchar.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: + +rjsha1.h: diff --git a/src/.deps/rjtiger.Po b/src/.deps/rjtiger.Po new file mode 100644 index 0000000..36a0d2b --- /dev/null +++ b/src/.deps/rjtiger.Po @@ -0,0 +1,97 @@ +rjtiger.o: rjtiger.c /usr/include/stdc-predef.h /usr/include/string.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/xlocale.h byte_order.h ustd.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-float.h rjtiger.h + +/usr/include/stdc-predef.h: + +/usr/include/string.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/xlocale.h: + +byte_order.h: + +ustd.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/bits/wchar.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: + +rjtiger.h: diff --git a/src/.deps/rjtiger_sbox.Po b/src/.deps/rjtiger_sbox.Po new file mode 100644 index 0000000..c457357 --- /dev/null +++ b/src/.deps/rjtiger_sbox.Po @@ -0,0 +1,90 @@ +rjtiger_sbox.o: rjtiger_sbox.c /usr/include/stdc-predef.h byte_order.h \ + ustd.h /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/bits/wchar.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-float.h + +/usr/include/stdc-predef.h: + +byte_order.h: + +ustd.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/bits/wchar.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: diff --git a/src/.deps/rjwhirlpool.Po b/src/.deps/rjwhirlpool.Po new file mode 100644 index 0000000..65c8484 --- /dev/null +++ b/src/.deps/rjwhirlpool.Po @@ -0,0 +1,99 @@ +rjwhirlpool.o: rjwhirlpool.c /usr/include/stdc-predef.h \ + /usr/include/assert.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/string.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/xlocale.h byte_order.h ustd.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \ + /usr/include/bits/types.h /usr/include/bits/typesizes.h \ + /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-float.h rjwhirlpool.h + +/usr/include/stdc-predef.h: + +/usr/include/assert.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/string.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/xlocale.h: + +byte_order.h: + +ustd.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/bits/wchar.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: + +rjwhirlpool.h: diff --git a/src/.deps/rjwhirlpool_sbox.Po b/src/.deps/rjwhirlpool_sbox.Po new file mode 100644 index 0000000..230d716 --- /dev/null +++ b/src/.deps/rjwhirlpool_sbox.Po @@ -0,0 +1,91 @@ +rjwhirlpool_sbox.o: rjwhirlpool_sbox.c /usr/include/stdc-predef.h \ + byte_order.h ustd.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h \ + /usr/include/stdint.h /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ + /usr/include/gnu/stubs-64.h /usr/include/bits/wchar.h \ + /usr/include/unistd.h /usr/include/bits/posix_opt.h \ + /usr/include/bits/environments.h /usr/include/bits/types.h \ + /usr/include/bits/typesizes.h \ + /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h \ + /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/stdlib.h \ + /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \ + /usr/include/endian.h /usr/include/bits/endian.h \ + /usr/include/bits/byteswap.h /usr/include/bits/byteswap-16.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/bits/stdlib-float.h + +/usr/include/stdc-predef.h: + +byte_order.h: + +ustd.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stdint.h: + +/usr/include/stdint.h: + +/usr/include/features.h: + +/usr/include/sys/cdefs.h: + +/usr/include/bits/wordsize.h: + +/usr/include/gnu/stubs.h: + +/usr/include/gnu/stubs-64.h: + +/usr/include/bits/wchar.h: + +/usr/include/unistd.h: + +/usr/include/bits/posix_opt.h: + +/usr/include/bits/environments.h: + +/usr/include/bits/types.h: + +/usr/include/bits/typesizes.h: + +/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/stddef.h: + +/usr/include/bits/confname.h: + +/usr/include/getopt.h: + +/usr/include/stdlib.h: + +/usr/include/bits/waitflags.h: + +/usr/include/bits/waitstatus.h: + +/usr/include/endian.h: + +/usr/include/bits/endian.h: + +/usr/include/bits/byteswap.h: + +/usr/include/bits/byteswap-16.h: + +/usr/include/sys/types.h: + +/usr/include/time.h: + +/usr/include/sys/select.h: + +/usr/include/bits/select.h: + +/usr/include/bits/sigset.h: + +/usr/include/bits/time.h: + +/usr/include/sys/sysmacros.h: + +/usr/include/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/bits/stdlib-float.h: diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..acfba55 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,652 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# src/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2014 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/mentohust +pkgincludedir = $(includedir)/mentohust +pkglibdir = $(libdir)/mentohust +pkglibexecdir = $(libexecdir)/mentohust +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +bin_PROGRAMS = mentohust$(EXEEXT) +subdir = src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(dist_sysconf_DATA) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)" +PROGRAMS = $(bin_PROGRAMS) +am_mentohust_OBJECTS = myini.$(OBJEXT) md5.$(OBJEXT) mycheck.$(OBJEXT) \ + dlfunc.$(OBJEXT) myfunc.$(OBJEXT) mystate.$(OBJEXT) \ + myconfig.$(OBJEXT) mentohust.$(OBJEXT) byte_order.$(OBJEXT) \ + checkV4.$(OBJEXT) rjmd5.$(OBJEXT) rjripemd128.$(OBJEXT) \ + rjsha1.$(OBJEXT) rjtiger.$(OBJEXT) rjtiger_sbox.$(OBJEXT) \ + rjwhirlpool.$(OBJEXT) rjwhirlpool_sbox.$(OBJEXT) +mentohust_OBJECTS = $(am_mentohust_OBJECTS) +am__DEPENDENCIES_1 = +mentohust_DEPENDENCIES = $(am__DEPENDENCIES_1) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(mentohust_SOURCES) +DIST_SOURCES = $(mentohust_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +DATA = $(dist_sysconf_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = aclocal-1.15 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AUTOCONF = autoconf +AUTOHEADER = autoheader +AUTOMAKE = automake-1.15 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -Os -Wall -g +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /usr/bin/grep -E +EXEEXT = +GREP = /usr/bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDADD = +LDFLAGS = +LIBOBJS = +LIBS = -lpcap +LTLIBOBJS = +MAKEINFO = makeinfo +MKDIR_P = /usr/bin/mkdir -p +OBJEXT = o +PACKAGE = mentohust +PACKAGE_BUGREPORT = http://code.google.com/p/mentohust/issues/list +PACKAGE_NAME = mentohust +PACKAGE_STRING = mentohust 0.3.1 +PACKAGE_TARNAME = mentohust +PACKAGE_URL = +PACKAGE_VERSION = 0.3.1 +PATH_SEPARATOR = : +SET_MAKE = +SHELL = /bin/sh +STRIP = +VERSION = 0.3.1 +abs_builddir = /home/hyr/rjsupplicant/OpenWrt-SDK/package/mentohust-0.3.1/src +abs_srcdir = /home/hyr/rjsupplicant/OpenWrt-SDK/package/mentohust-0.3.1/src +abs_top_builddir = /home/hyr/rjsupplicant/OpenWrt-SDK/package/mentohust-0.3.1 +abs_top_srcdir = /home/hyr/rjsupplicant/OpenWrt-SDK/package/mentohust-0.3.1 +ac_ct_CC = gcc +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/hyr/rjsupplicant/OpenWrt-SDK/package/mentohust-0.3.1/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = /etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +dist_sysconf_DATA = mentohust.conf +mentohust_SOURCES = myini.c md5.c mycheck.c dlfunc.c myfunc.c \ + mystate.c myconfig.c mentohust.c byte_order.c checkV4.c \ + rjmd5.c rjripemd128.c rjsha1.c rjtiger.c rjtiger_sbox.c \ + rjwhirlpool.c rjwhirlpool_sbox.c types.h myini.h md5.h \ + mycheck.h dlfunc.h myfunc.h mystate.h myconfig.h byte_order.h \ + checkV4.h rjmd5.h rjripemd128.h rjsha1.h rjtiger.h \ + rjwhirlpool.h ustd.h +mentohust_LDADD = $(LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +mentohust$(EXEEXT): $(mentohust_OBJECTS) $(mentohust_DEPENDENCIES) $(EXTRA_mentohust_DEPENDENCIES) + @rm -f mentohust$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mentohust_OBJECTS) $(mentohust_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/byte_order.Po +include ./$(DEPDIR)/checkV4.Po +include ./$(DEPDIR)/dlfunc.Po +include ./$(DEPDIR)/md5.Po +include ./$(DEPDIR)/mentohust.Po +include ./$(DEPDIR)/mycheck.Po +include ./$(DEPDIR)/myconfig.Po +include ./$(DEPDIR)/myfunc.Po +include ./$(DEPDIR)/myini.Po +include ./$(DEPDIR)/mystate.Po +include ./$(DEPDIR)/rjmd5.Po +include ./$(DEPDIR)/rjripemd128.Po +include ./$(DEPDIR)/rjsha1.Po +include ./$(DEPDIR)/rjtiger.Po +include ./$(DEPDIR)/rjtiger_sbox.Po +include ./$(DEPDIR)/rjwhirlpool.Po +include ./$(DEPDIR)/rjwhirlpool_sbox.Po + +.c.o: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-dist_sysconfDATA: $(dist_sysconf_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ + done + +uninstall-dist_sysconfDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-dist_sysconfDATA + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-dist_sysconfDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-binPROGRAMS install-data install-data-am \ + install-dist_sysconfDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-dist_sysconfDATA + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/Makefile.am b/src/Makefile.am index f1985f5..73c1c20 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,9 +4,9 @@ sysconfdir = /etc dist_sysconf_DATA = mentohust.conf -mentohust_SOURCES = myini.c md5.c mycheck.c dlfunc.c myfunc.c mystate.c myconfig.c mentohust.c +mentohust_SOURCES = myini.c md5.c mycheck.c dlfunc.c myfunc.c mystate.c myconfig.c mentohust.c byte_order.c checkV4.c rjmd5.c rjripemd128.c rjsha1.c rjtiger.c rjtiger_sbox.c rjwhirlpool.c rjwhirlpool_sbox.c -mentohust_SOURCES += i18n.h types.h myini.h md5.h mycheck.h dlfunc.h myfunc.h mystate.h myconfig.h +mentohust_SOURCES += types.h myini.h md5.h mycheck.h dlfunc.h myfunc.h mystate.h myconfig.h byte_order.h checkV4.h rjmd5.h rjripemd128.h rjsha1.h rjtiger.h rjwhirlpool.h ustd.h mentohust_LDADD = $(LDADD) diff --git a/src/Makefile.in b/src/Makefile.in new file mode 100644 index 0000000..bb79c74 --- /dev/null +++ b/src/Makefile.in @@ -0,0 +1,652 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = mentohust$(EXEEXT) +subdir = src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(dist_sysconf_DATA) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)" +PROGRAMS = $(bin_PROGRAMS) +am_mentohust_OBJECTS = myini.$(OBJEXT) md5.$(OBJEXT) mycheck.$(OBJEXT) \ + dlfunc.$(OBJEXT) myfunc.$(OBJEXT) mystate.$(OBJEXT) \ + myconfig.$(OBJEXT) mentohust.$(OBJEXT) byte_order.$(OBJEXT) \ + checkV4.$(OBJEXT) rjmd5.$(OBJEXT) rjripemd128.$(OBJEXT) \ + rjsha1.$(OBJEXT) rjtiger.$(OBJEXT) rjtiger_sbox.$(OBJEXT) \ + rjwhirlpool.$(OBJEXT) rjwhirlpool_sbox.$(OBJEXT) +mentohust_OBJECTS = $(am_mentohust_OBJECTS) +am__DEPENDENCIES_1 = +mentohust_DEPENDENCIES = $(am__DEPENDENCIES_1) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(mentohust_SOURCES) +DIST_SOURCES = $(mentohust_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +DATA = $(dist_sysconf_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDADD = @LDADD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = /etc +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +dist_sysconf_DATA = mentohust.conf +mentohust_SOURCES = myini.c md5.c mycheck.c dlfunc.c myfunc.c \ + mystate.c myconfig.c mentohust.c byte_order.c checkV4.c \ + rjmd5.c rjripemd128.c rjsha1.c rjtiger.c rjtiger_sbox.c \ + rjwhirlpool.c rjwhirlpool_sbox.c types.h myini.h md5.h \ + mycheck.h dlfunc.h myfunc.h mystate.h myconfig.h byte_order.h \ + checkV4.h rjmd5.h rjripemd128.h rjsha1.h rjtiger.h \ + rjwhirlpool.h ustd.h +mentohust_LDADD = $(LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +mentohust$(EXEEXT): $(mentohust_OBJECTS) $(mentohust_DEPENDENCIES) $(EXTRA_mentohust_DEPENDENCIES) + @rm -f mentohust$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mentohust_OBJECTS) $(mentohust_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/byte_order.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkV4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlfunc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mentohust.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mycheck.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/myconfig.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/myfunc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/myini.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mystate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rjmd5.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rjripemd128.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rjsha1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rjtiger.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rjtiger_sbox.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rjwhirlpool.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rjwhirlpool_sbox.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-dist_sysconfDATA: $(dist_sysconf_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \ + done + +uninstall-dist_sysconfDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-dist_sysconfDATA + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-dist_sysconfDATA + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-binPROGRAMS install-data install-data-am \ + install-dist_sysconfDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-dist_sysconfDATA + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/ampheck.h b/src/ampheck.h new file mode 100644 index 0000000..c8c70fa --- /dev/null +++ b/src/ampheck.h @@ -0,0 +1,97 @@ + +/* + Copyright (C) 2009 Gabriel A. Petursson + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef AMPHECK_H +#define AMPHECK_H +#include + +#define ROR(x, y) (((x) >> (y)) ^ ((x) << ((sizeof(x) * 8) - (y)))) +#define ROL(x, y) ((x) << (y) ^ ((x) >> (32 - (y)))) + +#define UNPACK_32_BE(x, str) { \ + *((str)) = (uint8_t) ((x) >> 24); \ + *((str) + 1) = (uint8_t) ((x) >> 16); \ + *((str) + 2) = (uint8_t) ((x) >> 8); \ + *((str) + 3) = (uint8_t) (x); \ +} + +#define UNPACK_64_BE(x, str) { \ + *((str)) = (uint8_t) ((x) >> 56); \ + *((str) + 1) = (uint8_t) ((x) >> 48); \ + *((str) + 2) = (uint8_t) ((x) >> 40); \ + *((str) + 3) = (uint8_t) ((x) >> 32); \ + *((str) + 4) = (uint8_t) ((x) >> 24); \ + *((str) + 5) = (uint8_t) ((x) >> 16); \ + *((str) + 6) = (uint8_t) ((x) >> 8); \ + *((str) + 7) = (uint8_t) (x); \ +} + +#define PACK_32_BE(str, x) { \ + *(x) = ((uint32_t) *((str) ) << 24) \ + ^ ((uint32_t) *((str) + 1) << 16) \ + ^ ((uint32_t) *((str) + 2) << 8) \ + ^ ((uint32_t) *((str) + 3)); \ +} + +#define PACK_64_BE(str, x) { \ + *(x) = ((uint64_t) *((str) ) << 56) \ + ^ ((uint64_t) *((str) + 1) << 48) \ + ^ ((uint64_t) *((str) + 2) << 40) \ + ^ ((uint64_t) *((str) + 3) << 32) \ + ^ ((uint64_t) *((str) + 4) << 24) \ + ^ ((uint64_t) *((str) + 5) << 16) \ + ^ ((uint64_t) *((str) + 6) << 8) \ + ^ ((uint64_t) *((str) + 7)); \ +} + +#define UNPACK_32_LE(x, str) { \ + *((str)) = (uint8_t) (x); \ + *((str) + 1) = (uint8_t) ((x) >> 8); \ + *((str) + 2) = (uint8_t) ((x) >> 16); \ + *((str) + 3) = (uint8_t) ((x) >> 24); \ +} + +#define UNPACK_64_LE(x, str) { \ + *((str)) = (uint8_t) (x); \ + *((str) + 1) = (uint8_t) ((x) >> 8); \ + *((str) + 2) = (uint8_t) ((x) >> 16); \ + *((str) + 3) = (uint8_t) ((x) >> 24); \ + *((str) + 4) = (uint8_t) ((x) >> 32); \ + *((str) + 5) = (uint8_t) ((x) >> 40); \ + *((str) + 6) = (uint8_t) ((x) >> 48); \ + *((str) + 7) = (uint8_t) ((x) >> 56); \ +} + +#define PACK_32_LE(str, x) { \ + *(x) = ((uint32_t) *((str) )) \ + ^ ((uint32_t) *((str) + 1) << 8) \ + ^ ((uint32_t) *((str) + 2) << 16) \ + ^ ((uint32_t) *((str) + 3) << 24); \ +} + +#define PACK_64_LE(str, x) { \ + *(x) = ((uint64_t) *((str) )) \ + ^ ((uint64_t) *((str) + 1) << 8) \ + ^ ((uint64_t) *((str) + 2) << 16) \ + ^ ((uint64_t) *((str) + 3) << 24) \ + ^ ((uint64_t) *((str) + 4) << 32) \ + ^ ((uint64_t) *((str) + 5) << 40) \ + ^ ((uint64_t) *((str) + 6) << 48) \ + ^ ((uint64_t) *((str) + 7) << 56); \ +} +#endif diff --git a/src/byte_order.c b/src/byte_order.c new file mode 100644 index 0000000..8ce6fc8 --- /dev/null +++ b/src/byte_order.c @@ -0,0 +1,150 @@ +/* byte_order.c - byte order related platform dependent routines, + * + * Copyright: 2008-2012 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + */ +#include "byte_order.h" + +#if !(__GNUC__ >= 4 || (__GNUC__ ==3 && __GNUC_MINOR__ >= 4)) /* if !GCC or GCC < 4.3 */ + +# if _MSC_VER >= 1300 && (_M_IX86 || _M_AMD64 || _M_IA64) /* if MSVC++ >= 2002 on x86/x64 */ +# include +# pragma intrinsic(_BitScanForward) + +/** + * Returns index of the trailing bit of x. + * + * @param x the number to process + * @return zero-based index of the trailing bit + */ +unsigned rhash_ctz(unsigned x) +{ + unsigned long index; + unsigned char isNonzero = _BitScanForward(&index, x); /* MSVC intrinsic */ + return (isNonzero ? (unsigned)index : 0); +} +# else /* _MSC_VER >= 1300... */ + +/** + * Returns index of the trailing bit of a 32-bit number. + * This is a plain C equivalent for GCC __builtin_ctz() bit scan. + * + * @param x the number to process + * @return zero-based index of the trailing bit + */ +unsigned rhash_ctz(unsigned x) +{ + /* array for conversion to bit position */ + static unsigned char bit_pos[32] = { + 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, + 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 + }; + + /* The De Bruijn bit-scan was devised in 1997, according to Donald Knuth + * by Martin Lauter. The constant 0x077CB531UL is a De Bruijn sequence, + * which produces a unique pattern of bits into the high 5 bits for each + * possible bit position that it is multiplied against. + * See http://graphics.stanford.edu/~seander/bithacks.html + * and http://chessprogramming.wikispaces.com/BitScan */ + return (unsigned)bit_pos[((uint32_t)((x & -x) * 0x077CB531U)) >> 27]; +} +# endif /* _MSC_VER >= 1300... */ +#endif /* !(GCC >= 4.3) */ + +/** + * Copy a memory block with simultaneous exchanging byte order. + * The byte order is changed from little-endian 32-bit integers + * to big-endian (or vice-versa). + * + * @param to the pointer where to copy memory block + * @param index the index to start writing from + * @param from the source block to copy + * @param length length of the memory block + */ +void rhash_swap_copy_str_to_u32(void* to, int index, const void* from, size_t length) +{ + /* if all pointers and length are 32-bits aligned */ + if ( 0 == (( (int)((char*)to - (char*)0) | ((char*)from - (char*)0) | index | length ) & 3) ) { + /* copy memory as 32-bit words */ + const uint32_t* src = (const uint32_t*)from; + const uint32_t* end = (const uint32_t*)((const char*)src + length); + uint32_t* dst = (uint32_t*)((char*)to + index); + while (src < end) *(dst++) = bswap_32( *(src++) ); + } else { + const char* src = (const char*)from; + for (length += index; (size_t)index < length; index++) ((char*)to)[index ^ 3] = *(src++); + } +} + +/** + * Copy a memory block with changed byte order. + * The byte order is changed from little-endian 64-bit integers + * to big-endian (or vice-versa). + * + * @param to the pointer where to copy memory block + * @param index the index to start writing from + * @param from the source block to copy + * @param length length of the memory block + */ +void rhash_swap_copy_str_to_u64(void* to, int index, const void* from, size_t length) +{ + /* if all pointers and length are 64-bits aligned */ + if ( 0 == (( (int)((char*)to - (char*)0) | ((char*)from - (char*)0) | index | length ) & 7) ) { + /* copy aligned memory block as 64-bit integers */ + const uint64_t* src = (const uint64_t*)from; + const uint64_t* end = (const uint64_t*)((const char*)src + length); + uint64_t* dst = (uint64_t*)((char*)to + index); + while (src < end) *(dst++) = bswap_64( *(src++) ); + } else { + const char* src = (const char*)from; + for (length += index; (size_t)index < length; index++) ((char*)to)[index ^ 7] = *(src++); + } +} + +/** + * Copy data from a sequence of 64-bit words to a binary string of given length, + * while changing byte order. + * + * @param to the binary string to receive data + * @param from the source sequence of 64-bit words + * @param length the size in bytes of the data being copied + */ +void rhash_swap_copy_u64_to_str(void* to, const void* from, size_t length) +{ + /* if all pointers and length are 64-bits aligned */ + if ( 0 == (( (int)((char*)to - (char*)0) | ((char*)from - (char*)0) | length ) & 7) ) { + /* copy aligned memory block as 64-bit integers */ + const uint64_t* src = (const uint64_t*)from; + const uint64_t* end = (const uint64_t*)((const char*)src + length); + uint64_t* dst = (uint64_t*)to; + while (src < end) *(dst++) = bswap_64( *(src++) ); + } else { + size_t index; + char* dst = (char*)to; + for (index = 0; index < length; index++) *(dst++) = ((char*)from)[index ^ 7]; + } +} + +/** + * Exchange byte order in the given array of 32-bit integers. + * + * @param arr the array to process + * @param length array length + */ +void rhash_u32_mem_swap(unsigned *arr, int length) +{ + unsigned* end = arr + length; + for (; arr < end; arr++) { + *arr = bswap_32(*arr); + } +} diff --git a/src/byte_order.h b/src/byte_order.h new file mode 100644 index 0000000..77b8bb9 --- /dev/null +++ b/src/byte_order.h @@ -0,0 +1,171 @@ +/* byte_order.h */ +#ifndef BYTE_ORDER_H +#define BYTE_ORDER_H +#include "ustd.h" +#include + +#ifdef IN_RHASH +#include "config.h" +#endif + +#ifdef __GLIBC__ +# include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* if x86 compatible cpu */ +#if defined(i386) || defined(__i386__) || defined(__i486__) || \ + defined(__i586__) || defined(__i686__) || defined(__pentium__) || \ + defined(__pentiumpro__) || defined(__pentium4__) || \ + defined(__nocona__) || defined(prescott) || defined(__core2__) || \ + defined(__k6__) || defined(__k8__) || defined(__athlon__) || \ + defined(__amd64) || defined(__amd64__) || \ + defined(__x86_64) || defined(__x86_64__) || defined(_M_IX86) || \ + defined(_M_AMD64) || defined(_M_IA64) || defined(_M_X64) +/* detect if x86-64 instruction set is supported */ +# if defined(_LP64) || defined(__LP64__) || defined(__x86_64) || \ + defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64) +# define CPU_X64 +# else +# define CPU_IA32 +# endif +#endif + + +/* detect CPU endianness */ +#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \ + __BYTE_ORDER == __LITTLE_ENDIAN) || \ + defined(CPU_IA32) || defined(CPU_X64) || \ + defined(__ia64) || defined(__ia64__) || defined(__alpha__) || defined(_M_ALPHA) || \ + defined(vax) || defined(MIPSEL) || defined(_ARM_) || defined(__arm__) +# define CPU_LITTLE_ENDIAN +# define IS_BIG_ENDIAN 0 +# define IS_LITTLE_ENDIAN 1 +#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && \ + __BYTE_ORDER == __BIG_ENDIAN) || \ + defined(__sparc) || defined(__sparc__) || defined(sparc) || \ + defined(_ARCH_PPC) || defined(_ARCH_PPC64) || defined(_POWER) || \ + defined(__POWERPC__) || defined(POWERPC) || defined(__powerpc) || \ + defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || \ + defined(__hpux) || defined(_MIPSEB) || defined(mc68000) || \ + defined(__s390__) || defined(__s390x__) || defined(sel) +# define CPU_BIG_ENDIAN +# define IS_BIG_ENDIAN 1 +# define IS_LITTLE_ENDIAN 0 +#else +# error "Can't detect CPU architechture" +#endif + +#define IS_ALIGNED_32(p) (0 == (3 & ((const char*)(p) - (const char*)0))) +#define IS_ALIGNED_64(p) (0 == (7 & ((const char*)(p) - (const char*)0))) + +#if defined(_MSC_VER) +#define ALIGN_ATTR(n) __declspec(align(n)) +#elif defined(__GNUC__) +#define ALIGN_ATTR(n) __attribute__((aligned (n))) +#else +#define ALIGN_ATTR(n) /* nothing */ +#endif + + +#if defined(_MSC_VER) || defined(__BORLANDC__) +#define I64(x) x##ui64 +#else +#define I64(x) x##LL +#endif + +/* convert a hash flag to index */ +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) /* GCC < 3.4 */ +# define rhash_ctz(x) __builtin_ctz(x) +#else +unsigned rhash_ctz(unsigned); /* define as function */ +#endif + +void rhash_swap_copy_str_to_u32(void* to, int index, const void* from, size_t length); +void rhash_swap_copy_str_to_u64(void* to, int index, const void* from, size_t length); +void rhash_swap_copy_u64_to_str(void* to, const void* from, size_t length); +void rhash_u32_mem_swap(unsigned *p, int length_in_u32); + +/* define bswap_32 */ +#if defined(__GNUC__) && defined(CPU_IA32) && !defined(__i386__) +/* for intel x86 CPU */ +static inline uint32_t bswap_32(uint32_t x) { + __asm("bswap\t%0" : "=r" (x) : "0" (x)); + return x; +} +#elif defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3) +/* for GCC >= 4.3 */ +# define bswap_32(x) __builtin_bswap32(x) +#elif (_MSC_VER > 1300) && (defined(CPU_IA32) || defined(CPU_X64)) /* MS VC */ +# define bswap_32(x) _byteswap_ulong((unsigned long)x) +#elif !defined(__STRICT_ANSI__) +/* general bswap_32 definition */ +static inline uint32_t bswap_32(uint32_t x) { + x = ((x << 8) & 0xFF00FF00) | ((x >> 8) & 0x00FF00FF); + return (x >> 16) | (x << 16); +} +#else +#define bswap_32(x) ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) +#endif /* bswap_32 */ + +#if defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3) +# define bswap_64(x) __builtin_bswap64(x) +#elif (_MSC_VER > 1300) && (defined(CPU_IA32) || defined(CPU_X64)) /* MS VC */ +# define bswap_64(x) _byteswap_uint64((__int64)x) +#elif !defined(__STRICT_ANSI__) +static inline uint64_t bswap_64(uint64_t x) { + union { + uint64_t ll; + uint32_t l[2]; + } w, r; + w.ll = x; + r.l[0] = bswap_32(w.l[1]); + r.l[1] = bswap_32(w.l[0]); + return r.ll; +} +#else +#error "bswap_64 unsupported" +#endif + +#ifdef CPU_BIG_ENDIAN +# define be2me_32(x) (x) +# define be2me_64(x) (x) +# define le2me_32(x) bswap_32(x) +# define le2me_64(x) bswap_64(x) + +# define be32_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define le32_copy(to, index, from, length) rhash_swap_copy_str_to_u32((to), (index), (from), (length)) +# define be64_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define le64_copy(to, index, from, length) rhash_swap_copy_str_to_u64((to), (index), (from), (length)) +# define me64_to_be_str(to, from, length) memcpy((to), (from), (length)) +# define me64_to_le_str(to, from, length) rhash_swap_copy_u64_to_str((to), (from), (length)) + +#else /* CPU_BIG_ENDIAN */ +# define be2me_32(x) bswap_32(x) +# define be2me_64(x) bswap_64(x) +# define le2me_32(x) (x) +# define le2me_64(x) (x) + +# define be32_copy(to, index, from, length) rhash_swap_copy_str_to_u32((to), (index), (from), (length)) +# define le32_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define be64_copy(to, index, from, length) rhash_swap_copy_str_to_u64((to), (index), (from), (length)) +# define le64_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define me64_to_be_str(to, from, length) rhash_swap_copy_u64_to_str((to), (from), (length)) +# define me64_to_le_str(to, from, length) memcpy((to), (from), (length)) +#endif /* CPU_BIG_ENDIAN */ + +/* ROTL/ROTR macros rotate a 32/64-bit word left/right by n bits */ +#define ROTL32(dword, n) ((dword) << (n) ^ ((dword) >> (32 - (n)))) +#define ROTR32(dword, n) ((dword) >> (n) ^ ((dword) << (32 - (n)))) +#define ROTL64(qword, n) ((qword) << (n) ^ ((qword) >> (64 - (n)))) +#define ROTR64(qword, n) ((qword) >> (n) ^ ((qword) << (64 - (n)))) + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* BYTE_ORDER_H */ diff --git a/src/checkV4.c b/src/checkV4.c new file mode 100644 index 0000000..b7829a1 --- /dev/null +++ b/src/checkV4.c @@ -0,0 +1,1188 @@ +#include "rjwhirlpool.h" +#include "rjmd5.h" +#include "rjtiger.h" +#include "rjripemd128.h" +#include "rjsha1.h" +#include "md5.h" +#include "checkV4.h" +#include +#include + +extern char userName[]; +extern char password[]; + +const unsigned char array[1820] = +{ + 0x20, 0x12, 0x05, 0x03, + 0x21, 0x57, 0x00, 0x00, + 0xd4, 0xf6, 0x7c, 0x00, + 0xf8, 0xfa, 0x7c, 0x99, + 0x0c, 0x82, 0x4c, 0x00, + 0xdc, 0x00, 0x21, 0x01, + 0x08, 0xfb, 0x7c, 0x00, + 0xb2, 0x26, 0x40, 0x58, + 0xe4, 0x6e, 0x21, 0x01, + 0xd4, 0xf6, 0x7c, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x97, + 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0x41, + 0x00, 0x00, 0xf0, 0x41, + 0x00, 0x00, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x40, + 0x00, 0xc0, 0x15, 0x44, + 0x00, 0x00, 0x16, 0x44, + 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xd7, 0xe1, 0x40, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x52, 0xe3, 0x40, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xd7, 0xe1, 0x40, + 0x5a, 0x00, 0x00, 0x00, + 0x00, 0x6f, 0x21, 0x01, + 0x00, 0x00, 0x00, 0x00, + 0xa8, 0xfc, 0x7c, 0x00, + 0xca, 0x26, 0x40, 0x00, + 0x5e, 0x2e, 0x00, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0x67, 0x69, 0x4c, 0x01, + 0x30, 0x31, 0x40, 0x00, + 0x89, 0x2e, 0x40, 0x00, + 0x97, 0x2e, 0x40, 0x00, + 0x00, 0x35, 0x40, 0x00, + 0x87, 0x69, 0x4c, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x06, 0x75, 0x40, 0x00, + 0x14, 0x6f, 0x21, 0x01, + 0x08, 0x00, 0x7c, 0x00, + 0x84, 0xf7, 0x7c, 0x00, + 0x90, 0xf7, 0x7c, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0xe8, 0x1e, 0x98, 0x81, + 0x10, 0xfb, 0x06, 0xc9, + 0xed, 0xb7, 0xdd, 0xd6, + 0xa4, 0xf9, 0x7c, 0x00, + 0x10, 0x00, 0x7c, 0x00, + 0x3c, 0xf8, 0x7c, 0x00, + 0x14, 0xf8, 0x7c, 0x00, + 0xe0, 0xfa, 0x7c, 0x00, + 0xd5, 0x68, 0xf7, 0xbf, + 0x10, 0xfb, 0x00, 0x00, + 0x24, 0xf8, 0x7c, 0x00, + 0xeb, 0x82, 0xf8, 0xbf, + 0x08, 0xf9, 0x7c, 0x00, + 0x10, 0xfb, 0x7c, 0x00, + 0x3c, 0xf8, 0x7c, 0x00, + 0x14, 0xf8, 0x7c, 0x00, + 0x5e, 0x69, 0x4c, 0x00, + 0xcc, 0xf9, 0x7c, 0x00, + 0x7c, 0xf9, 0x7c, 0x00, + 0xe4, 0x6e, 0x21, 0x01, + 0x1a, 0xd0, 0xa1, 0xcd, + 0xf5, 0x20, 0xc9, 0xed, + 0xb7, 0xdd, 0xd6, 0xa4, + 0x34, 0x31, 0x30, 0x31, + 0x30, 0x33, 0x37, 0x39, + 0x31, 0x30, 0x32, 0x34, + 0x31, 0x34, 0x35, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0x20, 0xf8, 0x7c, 0x00, + 0x2e, 0xde, 0xf9, 0xbf, + 0x08, 0xf9, 0x7c, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x14, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x00, 0x00, 0x00, + 0x04, 0x30, 0x30, 0x30, + 0x32, 0x00, 0x00, 0x00, + 0xd4, 0xf6, 0x7c, 0x00, + 0xf8, 0xfa, 0x7c, 0x00, + 0x0c, 0x82, 0x4c, 0x00, + 0xdc, 0x00, 0x21, 0x01, + 0x08, 0xfb, 0x7c, 0x00, + 0xb2, 0x26, 0x40, 0x00, + 0xe4, 0x6e, 0x21, 0x01, + 0xd4, 0xf6, 0x7c, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x70, 0x42, + 0x00, 0x00, 0x70, 0x42, + 0x00, 0x00, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x96, 0x44, + 0x00, 0x00, 0x96, 0x44, + 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xd7, 0xe1, 0x40, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x52, 0xe3, 0x40, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xd7, 0xe1, 0x40, + 0x5a, 0x00, 0x00, 0x00, + 0x00, 0x6f, 0x21, 0x01, + 0x00, 0x00, 0x00, 0x00, + 0xa8, 0xfc, 0x7c, 0x00, + 0xca, 0x26, 0x40, 0x00, + 0x5e, 0x2e, 0x00, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0x67, 0x69, 0x4c, 0x01, + 0x30, 0x31, 0x40, 0x00, + 0x89, 0x2e, 0x40, 0x00, + 0x97, 0x2e, 0x40, 0x00, + 0x00, 0x35, 0x40, 0x00, + 0x87, 0x69, 0x4c, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x06, 0x75, 0x40, 0x00, + 0x14, 0x6f, 0x21, 0x01, + 0x08, 0x00, 0x7c, 0x00, + 0x84, 0xf7, 0x7c, 0x00, + 0x90, 0xf7, 0x7c, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0xe8, 0x1e, 0x98, 0x81, + 0x10, 0xfb, 0x06, 0xc9, + 0xed, 0xb7, 0xdd, 0xd6, + 0xa4, 0xf9, 0x7c, 0x00, + 0x10, 0x00, 0x7c, 0x00, + 0x3c, 0xf8, 0x7c, 0x00, + 0x14, 0xf8, 0x7c, 0x00, + 0xe0, 0xfa, 0x7c, 0x00, + 0xd5, 0x68, 0xf7, 0xbf, + 0x10, 0xfb, 0x00, 0x00, + 0x24, 0xf8, 0x7c, 0x00, + 0xeb, 0x82, 0xf8, 0xbf, + 0x08, 0xf9, 0x7c, 0x00, + 0x10, 0xfb, 0x7c, 0x00, + 0x3c, 0xf8, 0x7c, 0x00, + 0x14, 0xf8, 0x7c, 0x00, + 0x5e, 0x69, 0x4c, 0x00, + 0xcc, 0xf9, 0x7c, 0x00, + 0x7c, 0xf9, 0x7c, 0x00, + 0xe4, 0x6e, 0x21, 0x01, + 0x1a, 0xd0, 0xa1, 0xd5, + 0xc5, 0x20, 0xc9, 0xed, + 0xb7, 0xdd, 0xd6, 0xa4, + 0x35, 0x31, 0x30, 0x31, + 0x30, 0x33, 0x37, 0x39, + 0x31, 0x30, 0x32, 0x34, + 0x31, 0x31, 0x34, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0x20, 0xf8, 0x7c, 0x00, + 0x2e, 0xde, 0xf9, 0xbf, + 0x08, 0xf9, 0x7c, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x14, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x00, 0x00, 0x00, + 0x04, 0x30, 0x30, 0x30, + 0x33, 0x00, 0x00, 0x00, + 0xd4, 0xf6, 0x7c, 0x00, + 0xf8, 0xfa, 0x7c, 0x00, + 0x0c, 0x82, 0x4c, 0x00, + 0xdc, 0x00, 0x21, 0x01, + 0x08, 0xfb, 0x7c, 0x00, + 0xb2, 0x26, 0x40, 0x00, + 0xe4, 0x6e, 0x21, 0x01, + 0xd4, 0xf6, 0x7c, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x70, 0x41, + 0x00, 0x00, 0x70, 0x41, + 0x00, 0x00, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x96, 0x43, + 0x00, 0x00, 0x96, 0x43, + 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xd7, 0xe1, 0x40, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x52, 0xe3, 0x40, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xd7, 0xe1, 0x40, + 0x5a, 0x00, 0x00, 0x00, + 0x00, 0x6f, 0x21, 0x01, + 0x00, 0x00, 0x00, 0x00, + 0xa8, 0xfc, 0x7c, 0x00, + 0xca, 0x26, 0x40, 0x00, + 0x5e, 0x2e, 0x00, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0x67, 0x69, 0x4c, 0x01, + 0x30, 0x31, 0x40, 0x00, + 0x89, 0x2e, 0x40, 0x00, + 0x97, 0x2e, 0x40, 0x00, + 0x00, 0x35, 0x40, 0x00, + 0x87, 0x69, 0x4c, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x06, 0x75, 0x40, 0x00, + 0x14, 0x6f, 0x21, 0x01, + 0x08, 0x00, 0x7c, 0x00, + 0x84, 0xf7, 0x7c, 0x00, + 0x90, 0xf7, 0x7c, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0xe8, 0x1e, 0x98, 0x81, + 0x10, 0xfb, 0x06, 0xc9, + 0xed, 0xb7, 0xdd, 0xd6, + 0xa4, 0xf9, 0x7c, 0x00, + 0x10, 0x00, 0x7c, 0x00, + 0x3c, 0xf8, 0x7c, 0x00, + 0x14, 0xf8, 0x7c, 0x00, + 0xe0, 0xfa, 0x7c, 0x00, + 0xd5, 0x68, 0xf7, 0xbf, + 0x10, 0xfb, 0x00, 0x00, + 0x24, 0xf8, 0x7c, 0x00, + 0xeb, 0x82, 0xf8, 0xbf, + 0x08, 0xf9, 0x7c, 0x00, + 0x10, 0xfb, 0x7c, 0x00, + 0x3c, 0xf8, 0x7c, 0x00, + 0x14, 0xf8, 0x7c, 0x00, + 0x5e, 0x69, 0x4c, 0x00, + 0xcc, 0xf9, 0x7c, 0x00, + 0x7c, 0xf9, 0x7c, 0x00, + 0xe4, 0x6e, 0x21, 0x01, + 0x1a, 0xd0, 0xa1, 0xc2, + 0xed, 0x20, 0xc9, 0xed, + 0xb7, 0xdd, 0xd6, 0xa4, + 0x34, 0x31, 0x30, 0x31, + 0x30, 0x33, 0x38, 0x31, + 0x31, 0x30, 0x32, 0x34, + 0x31, 0x38, 0x37, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0x20, 0xf8, 0x7c, 0x00, + 0x2e, 0xde, 0xf9, 0xbf, + 0x08, 0xf9, 0x7c, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x14, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x00, 0x00, 0x00, + 0x08, 0x57, 0x61, 0x6e, + 0x67, 0x44, 0x6f, 0x6e, + 0x67, 0xf6, 0x7c, 0x00, + 0xf8, 0xfa, 0x7c, 0x00, + 0x0c, 0x82, 0x4c, 0x00, + 0xdc, 0x00, 0x21, 0x01, + 0x08, 0xfb, 0x7c, 0x00, + 0xb2, 0x26, 0x40, 0x00, + 0xe4, 0x6e, 0x21, 0x01, + 0xd4, 0xf6, 0x7c, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xc8, 0x42, + 0x00, 0x00, 0xc8, 0x42, + 0x00, 0x00, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x16, 0x45, + 0x00, 0x00, 0x16, 0x45, + 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xd7, 0xe1, 0x40, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x52, 0xe3, 0x40, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xd7, 0xe1, 0x40, + 0x5a, 0x00, 0x00, 0x00, + 0x00, 0x6f, 0x21, 0x01, + 0x00, 0x00, 0x00, 0x00, + 0xa8, 0xfc, 0x7c, 0x00, + 0xca, 0x26, 0x40, 0x00, + 0x5e, 0x2e, 0x00, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0x67, 0x69, 0x4c, 0x01, + 0x30, 0x31, 0x40, 0x00, + 0x89, 0x2e, 0x40, 0x00, + 0x97, 0x2e, 0x40, 0x00, + 0x00, 0x35, 0x40, 0x00, + 0x87, 0x69, 0x4c, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x06, 0x75, 0x40, 0x00, + 0x14, 0x6f, 0x21, 0x01, + 0x08, 0x00, 0x7c, 0x00, + 0x84, 0xf7, 0x7c, 0x00, + 0x90, 0xf7, 0x7c, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0xe8, 0x1e, 0x98, 0x81, + 0x10, 0xfb, 0x06, 0xc9, + 0xed, 0xb7, 0xdd, 0xd6, + 0xa4, 0xf9, 0x7c, 0x00, + 0x10, 0x00, 0x7c, 0x00, + 0x3c, 0xf8, 0x7c, 0x00, + 0x14, 0xf8, 0x7c, 0x00, + 0xe0, 0xfa, 0x7c, 0x00, + 0xd5, 0x68, 0xf7, 0xbf, + 0x10, 0xfb, 0x00, 0x00, + 0x24, 0xf8, 0x7c, 0x00, + 0xeb, 0x82, 0xf8, 0xbf, + 0x08, 0xf9, 0x7c, 0x00, + 0x10, 0xfb, 0x7c, 0x00, + 0x3c, 0xf8, 0x7c, 0x00, + 0x14, 0xf8, 0x7c, 0x00, + 0x5e, 0x69, 0x4c, 0x00, + 0xcc, 0xf9, 0x7c, 0x00, + 0x7c, 0xf9, 0x7c, 0x00, + 0xe4, 0x6e, 0x21, 0x01, + 0x00, 0xd0, 0xa1, 0xc2, + 0xed, 0x20, 0xc9, 0xed, + 0xb7, 0xdd, 0xd6, 0xa4, + 0x34, 0x31, 0x30, 0x31, + 0x30, 0x33, 0x38, 0x31, + 0x31, 0x30, 0x32, 0x34, + 0x31, 0x38, 0x37, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0x20, 0xf8, 0x7c, 0x00, + 0x2e, 0xde, 0xf9, 0xbf, + 0x08, 0xf9, 0x7c, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x14, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x00, 0x00, 0x00, + 0x03, 0x72, 0x65, 0x64, + 0x67, 0x44, 0x6f, 0x6e, + 0x67, 0xf6, 0x7c, 0x00, + 0xf8, 0xfa, 0x7c, 0x00, + 0x0c, 0x82, 0x4c, 0x00, + 0xdc, 0x06, 0x3a, 0x30, + 0x3a, 0x3d, 0x2c, 0x24, + 0xb2, 0x26, 0x40, 0x00, + 0xe4, 0x6e, 0x21, 0x01, + 0xd4, 0xf6, 0x7c, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xf0, 0x41, + 0x00, 0x00, 0xf0, 0x41, + 0x00, 0x00, 0x40, 0x40, + 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x16, 0x44, + 0x00, 0x00, 0x16, 0x44, + 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xd7, 0xe1, 0x40, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x52, 0xe3, 0x40, + 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xd7, 0xe1, 0x40, + 0x5a, 0x00, 0x00, 0x00, + 0x00, 0x6f, 0x21, 0x01, + 0x00, 0x00, 0x00, 0x00, + 0xa8, 0xfc, 0x7c, 0x00, + 0xca, 0x26, 0x40, 0x00, + 0x5e, 0x2e, 0x00, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0x67, 0x69, 0x4c, 0x01, + 0x30, 0x31, 0x40, 0x00, + 0x89, 0x2e, 0x40, 0x00, + 0x97, 0x2e, 0x40, 0x00, + 0x00, 0x35, 0x40, 0x00, + 0x87, 0x69, 0x4c, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x06, 0x75, 0x40, 0x00, + 0x14, 0x6f, 0x21, 0x01, + 0x08, 0x00, 0x7c, 0x00, + 0x84, 0xf7, 0x7c, 0x00, + 0x90, 0xf7, 0x7c, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0xe8, 0x1e, 0x98, 0x81, + 0x10, 0xfb, 0x06, 0xc9, + 0xed, 0xb7, 0xdd, 0xd6, + 0xa4, 0xf9, 0x7c, 0x00, + 0x10, 0x00, 0x7c, 0x00, + 0x3c, 0xf8, 0x7c, 0x00, + 0x14, 0xf8, 0x7c, 0x00, + 0xe0, 0xfa, 0x7c, 0x00, + 0xd5, 0x68, 0xf7, 0xbf, + 0x10, 0xfb, 0x00, 0x00, + 0x24, 0xf8, 0x7c, 0x00, + 0xeb, 0x82, 0xf8, 0xbf, + 0x08, 0xf9, 0x7c, 0x00, + 0x10, 0xfb, 0x7c, 0x00, + 0x3c, 0xf8, 0x7c, 0x00, + 0x14, 0xf8, 0x7c, 0x00, + 0x5e, 0x69, 0x4c, 0x00, + 0xcc, 0xf9, 0x7c, 0x00, + 0x7c, 0xf9, 0x7c, 0x00, + 0xe4, 0x6e, 0x21, 0x01, + 0x00, 0xd0, 0xa1, 0xc2, + 0xed, 0x20, 0xc9, 0xed, + 0xb7, 0xdd, 0xd6, 0xa4, + 0x34, 0x31, 0x30, 0x31, + 0x30, 0x33, 0x38, 0x31, + 0x31, 0x30, 0x32, 0x34, + 0x31, 0x38, 0x37, 0x00, + 0x08, 0xf9, 0x7c, 0x00, + 0x20, 0xf8, 0x7c, 0x00, + 0x2e, 0xde, 0xf9, 0xbf, + 0x08, 0xf9, 0x7c, 0x00, + 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x14, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x31, 0x31, 0x31, + 0x31, 0x00, 0x00, 0x00 +}; + +const unsigned char array_1[2035] = +{ + 0x20, 0x12, 0x05, 0x03, + 0x21, 0x57, 0x74, 0x2e, + 0x63, 0x70, 0x70, 0x20, + 0x3a, 0x20, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x65, + 0x73, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x20, + 0x62, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, + 0x73, 0x20, 0x66, 0x6f, + 0x72, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x0d, 0x0a, + 0x2f, 0x2f, 0x0d, 0x0a, + 0x0d, 0x0a, 0x23, 0x69, + 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x20, 0x22, + 0x73, 0x74, 0x64, 0x61, + 0x66, 0x78, 0x2e, 0x68, + 0x22, 0x0d, 0x0a, 0x23, + 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x20, + 0x22, 0x54, 0x65, 0x73, + 0x74, 0x2e, 0x68, 0x22, + 0x0d, 0x0a, 0x23, 0x69, + 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x20, 0x22, + 0x54, 0x65, 0x73, 0x74, + 0x44, 0x6c, 0x67, 0x2e, + 0x68, 0x22, 0x0d, 0x0a, + 0x0d, 0x0a, 0x23, 0x69, + 0x66, 0x64, 0x65, 0x66, + 0x20, 0x5f, 0x44, 0x45, + 0x42, 0x55, 0x47, 0x0d, + 0x0a, 0x23, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x65, + 0x20, 0x6e, 0x65, 0x77, + 0x20, 0x44, 0x45, 0x42, + 0x55, 0x47, 0x5f, 0x4e, + 0x45, 0x57, 0x0d, 0x0a, + 0x23, 0x75, 0x6e, 0x64, + 0x65, 0x66, 0x20, 0x54, + 0x48, 0x49, 0x53, 0x5f, + 0x46, 0x49, 0x4c, 0x45, + 0x0d, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x63, + 0x20, 0x63, 0x68, 0x61, + 0x72, 0x20, 0x54, 0x48, + 0x49, 0x53, 0x5f, 0x46, + 0x49, 0x4c, 0x45, 0x5b, + 0x5d, 0x20, 0x3d, 0x20, + 0x5f, 0x5f, 0x46, 0x49, + 0x4c, 0x45, 0x5f, 0x5f, + 0x3b, 0x0d, 0x0a, 0x23, + 0x65, 0x6e, 0x64, 0x69, + 0x66, 0x0d, 0x0a, 0x0d, + 0x0a, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x0d, 0x0a, + 0x2f, 0x2f, 0x20, 0x43, + 0x54, 0x65, 0x73, 0x74, + 0x41, 0x70, 0x70, 0x0d, + 0x0a, 0x0d, 0x0a, 0x42, + 0x45, 0x47, 0x49, 0x4e, + 0x5f, 0x4d, 0x45, 0x53, + 0x53, 0x41, 0x47, 0x45, + 0x5f, 0x4d, 0x41, 0x50, + 0x28, 0x43, 0x54, 0x65, + 0x73, 0x74, 0x41, 0x70, + 0x70, 0x2c, 0x20, 0x43, + 0x57, 0x69, 0x6e, 0x41, + 0x70, 0x70, 0x29, 0x0d, + 0x0a, 0x09, 0x2f, 0x2f, + 0x7b, 0x7b, 0x41, 0x46, + 0x58, 0x5f, 0x4d, 0x53, + 0x47, 0x5f, 0x4d, 0x41, + 0x50, 0x28, 0x43, 0x54, + 0x65, 0x73, 0x74, 0x41, + 0x70, 0x70, 0x29, 0x0d, + 0x0a, 0x09, 0x09, 0x2f, + 0x2f, 0x20, 0x4e, 0x4f, + 0x54, 0x45, 0x20, 0x2d, + 0x20, 0x74, 0x68, 0x65, + 0x20, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x57, 0x69, + 0x7a, 0x61, 0x72, 0x64, + 0x20, 0x77, 0x69, 0x6c, + 0x6c, 0x20, 0x61, 0x64, + 0x64, 0x20, 0x61, 0x6e, + 0x64, 0x20, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, + 0x20, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, + 0x20, 0x6d, 0x61, 0x63, + 0x72, 0x6f, 0x73, 0x20, + 0x68, 0x65, 0x72, 0x65, + 0x2e, 0x0d, 0x0a, 0x09, + 0x09, 0x2f, 0x2f, 0x20, + 0x20, 0x20, 0x20, 0x44, + 0x4f, 0x20, 0x4e, 0x4f, + 0x54, 0x20, 0x45, 0x44, + 0x49, 0x54, 0x20, 0x77, + 0x68, 0x61, 0x74, 0x20, + 0x79, 0x6f, 0x75, 0x20, + 0x73, 0x65, 0x65, 0x20, + 0x69, 0x6e, 0x20, 0x74, + 0x68, 0x65, 0x73, 0x65, + 0x20, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x20, + 0x6f, 0x66, 0x20, 0x67, + 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, + 0x20, 0x63, 0x6f, 0x64, + 0x65, 0x21, 0x0d, 0x0a, + 0x09, 0x2f, 0x2f, 0x7d, + 0x7d, 0x41, 0x46, 0x58, + 0x5f, 0x4d, 0x53, 0x47, + 0x0d, 0x0a, 0x09, 0x4f, + 0x4e, 0x5f, 0x43, 0x4f, + 0x4d, 0x4d, 0x41, 0x4e, + 0x44, 0x28, 0x49, 0x44, + 0x5f, 0x48, 0x45, 0x4c, + 0x50, 0x2c, 0x20, 0x43, + 0x57, 0x69, 0x6e, 0x41, + 0x70, 0x70, 0x3a, 0x3a, + 0x4f, 0x6e, 0x48, 0x65, + 0x6c, 0x70, 0x29, 0x0d, + 0x0a, 0x45, 0x4e, 0x44, + 0x5f, 0x4d, 0x45, 0x53, + 0x53, 0x41, 0x47, 0x45, + 0x5f, 0x4d, 0x41, 0x50, + 0x28, 0x29, 0x0d, 0x0a, + 0x0d, 0x0a, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x0d, + 0x0a, 0x2f, 0x2f, 0x20, + 0x43, 0x54, 0x65, 0x73, + 0x74, 0x41, 0x70, 0x70, + 0x20, 0x63, 0x6f, 0x6e, + 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x0d, 0x0a, 0x0d, + 0x0a, 0x43, 0x54, 0x65, + 0x73, 0x74, 0x41, 0x70, + 0x70, 0x3a, 0x3a, 0x43, + 0x54, 0x65, 0x73, 0x74, + 0x41, 0x70, 0x70, 0x28, + 0x29, 0x0d, 0x0a, 0x7b, + 0x0d, 0x0a, 0x09, 0x2f, + 0x2f, 0x20, 0x54, 0x4f, + 0x44, 0x4f, 0x3a, 0x20, + 0x61, 0x64, 0x64, 0x20, + 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x63, 0x6f, 0x64, + 0x65, 0x20, 0x68, 0x65, + 0x72, 0x65, 0x2c, 0x0d, + 0x0a, 0x09, 0x2f, 0x2f, + 0x20, 0x50, 0x6c, 0x61, + 0x63, 0x65, 0x20, 0x61, + 0x6c, 0x6c, 0x20, 0x73, + 0x69, 0x67, 0x6e, 0x69, + 0x66, 0x69, 0x63, 0x61, + 0x6e, 0x74, 0x20, 0x69, + 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x69, 0x6e, + 0x20, 0x49, 0x6e, 0x69, + 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x0d, 0x0a, 0x7d, + 0x0d, 0x0a, 0x0d, 0x0a, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x0d, 0x0a, 0x2f, + 0x2f, 0x20, 0x54, 0x68, + 0x65, 0x20, 0x6f, 0x6e, + 0x65, 0x20, 0x61, 0x6e, + 0x64, 0x20, 0x6f, 0x6e, + 0x6c, 0x79, 0x20, 0x43, + 0x54, 0x65, 0x73, 0x74, + 0x41, 0x70, 0x70, 0x20, + 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x0d, 0x0a, + 0x0d, 0x0a, 0x43, 0x54, + 0x65, 0x73, 0x74, 0x41, + 0x70, 0x70, 0x20, 0x74, + 0x68, 0x65, 0x41, 0x70, + 0x70, 0x3b, 0x0d, 0x0a, + 0x0d, 0x0a, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x2f, + 0x2f, 0x2f, 0x2f, 0x0d, + 0x0a, 0x2f, 0x2f, 0x20, + 0x43, 0x54, 0x65, 0x73, + 0x74, 0x41, 0x70, 0x70, + 0x20, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x0d, + 0x0a, 0x0d, 0x0a, 0x42, + 0x4f, 0x4f, 0x4c, 0x20, + 0x43, 0x54, 0x65, 0x73, + 0x74, 0x41, 0x70, 0x70, + 0x3a, 0x3a, 0x49, 0x6e, + 0x69, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x28, 0x29, + 0x0d, 0x0a, 0x7b, 0x0d, + 0x0a, 0x09, 0x41, 0x66, + 0x78, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x28, + 0x29, 0x3b, 0x0d, 0x0a, + 0x0d, 0x0a, 0x09, 0x2f, + 0x2f, 0x20, 0x53, 0x74, + 0x61, 0x6e, 0x64, 0x61, + 0x72, 0x64, 0x20, 0x69, + 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x0d, 0x0a, 0x09, + 0x2f, 0x2f, 0x20, 0x49, + 0x66, 0x20, 0x79, 0x6f, + 0x75, 0x20, 0x61, 0x72, + 0x65, 0x20, 0x6e, 0x6f, + 0x74, 0x20, 0x75, 0x73, + 0x69, 0x6e, 0x67, 0x20, + 0x74, 0x68, 0x65, 0x73, + 0x65, 0x20, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x20, 0x61, + 0x6e, 0x64, 0x20, 0x77, + 0x69, 0x73, 0x68, 0x20, + 0x74, 0x6f, 0x20, 0x72, + 0x65, 0x64, 0x75, 0x63, + 0x65, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x73, 0x69, + 0x7a, 0x65, 0x0d, 0x0a, + 0x09, 0x2f, 0x2f, 0x20, + 0x20, 0x6f, 0x66, 0x20, + 0x79, 0x6f, 0x75, 0x72, + 0x20, 0x66, 0x69, 0x6e, + 0x61, 0x6c, 0x20, 0x65, + 0x78, 0x65, 0x63, 0x75, + 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x2c, 0x20, 0x79, + 0x6f, 0x75, 0x20, 0x73, + 0x68, 0x6f, 0x75, 0x6c, + 0x64, 0x20, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, + 0x20, 0x66, 0x72, 0x6f, + 0x6d, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x66, 0x6f, + 0x6c, 0x6c, 0x6f, 0x77, + 0x69, 0x6e, 0x67, 0x0d, + 0x0a, 0x09, 0x2f, 0x2f, + 0x20, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, + 0x69, 0x63, 0x20, 0x69, + 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x72, 0x6f, + 0x75, 0x74, 0x69, 0x6e, + 0x65, 0x73, 0x20, 0x79, + 0x6f, 0x75, 0x20, 0x64, + 0x6f, 0x20, 0x6e, 0x6f, + 0x74, 0x20, 0x6e, 0x65, + 0x65, 0x64, 0x2e, 0x0d, + 0x0a, 0x0d, 0x0a, 0x23, + 0x69, 0x66, 0x64, 0x65, + 0x66, 0x20, 0x5f, 0x41, + 0x46, 0x58, 0x44, 0x4c, + 0x4c, 0x0d, 0x0a, 0x09, + 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x33, 0x64, + 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x73, + 0x28, 0x29, 0x3b, 0x09, + 0x09, 0x09, 0x2f, 0x2f, + 0x20, 0x43, 0x61, 0x6c, + 0x6c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x77, + 0x68, 0x65, 0x6e, 0x20, + 0x75, 0x73, 0x69, 0x6e, + 0x67, 0x20, 0x4d, 0x46, + 0x43, 0x20, 0x69, 0x6e, + 0x20, 0x61, 0x20, 0x73, + 0x68, 0x61, 0x72, 0x65, + 0x64, 0x20, 0x44, 0x4c, + 0x4c, 0x0d, 0x0a, 0x23, + 0x65, 0x6c, 0x73, 0x65, + 0x0d, 0x0a, 0x09, 0x45, + 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x33, 0x64, 0x43, + 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x73, 0x53, + 0x74, 0x61, 0x74, 0x69, + 0x63, 0x28, 0x29, 0x3b, + 0x09, 0x2f, 0x2f, 0x20, + 0x43, 0x61, 0x6c, 0x6c, + 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x77, 0x68, + 0x65, 0x6e, 0x20, 0x6c, + 0x69, 0x6e, 0x6b, 0x69, + 0x6e, 0x67, 0x20, 0x74, + 0x6f, 0x20, 0x4d, 0x46, + 0x43, 0x20, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x63, + 0x61, 0x6c, 0x6c, 0x79, + 0x0d, 0x0a, 0x23, 0x65, + 0x6e, 0x64, 0x69, 0x66, + 0x0d, 0x0a, 0x0d, 0x0a, + 0x09, 0x43, 0x54, 0x65, + 0x73, 0x74, 0x44, 0x6c, + 0x67, 0x20, 0x64, 0x6c, + 0x67, 0x3b, 0x0d, 0x0a, + 0x09, 0x6d, 0x5f, 0x70, + 0x4d, 0x61, 0x69, 0x6e, + 0x57, 0x6e, 0x64, 0x20, + 0x3d, 0x20, 0x26, 0x64, + 0x6c, 0x67, 0x3b, 0x0d, + 0x0a, 0x09, 0x69, 0x6e, + 0x74, 0x20, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x20, + 0x3d, 0x20, 0x64, 0x6c, + 0x67, 0x2e, 0x44, 0x6f, + 0x4d, 0x6f, 0x64, 0x61, + 0x6c, 0x28, 0x29, 0x3b, + 0x0d, 0x0a, 0x09, 0x69, + 0x66, 0x20, 0x28, 0x6e, + 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, + 0x20, 0x3d, 0x3d, 0x20, + 0x49, 0x44, 0x4f, 0x4b, + 0x29, 0x0d, 0x0a, 0x09, + 0x7b, 0x0d, 0x0a, 0x09, + 0x09, 0x2f, 0x2f, 0x20, + 0x54, 0x4f, 0x44, 0x4f, + 0x3a, 0x20, 0x50, 0x6c, + 0x61, 0x63, 0x65, 0x20, + 0x63, 0x6f, 0x64, 0x65, + 0x20, 0x68, 0x65, 0x72, + 0x65, 0x20, 0x74, 0x6f, + 0x20, 0x68, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x20, + 0x77, 0x68, 0x65, 0x6e, + 0x20, 0x74, 0x68, 0x65, + 0x20, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x20, + 0x69, 0x73, 0x0d, 0x0a, + 0x09, 0x09, 0x2f, 0x2f, + 0x20, 0x20, 0x64, 0x69, + 0x73, 0x6d, 0x69, 0x73, + 0x73, 0x65, 0x64, 0x20, + 0x77, 0x69, 0x74, 0x68, + 0x20, 0x4f, 0x4b, 0x0d, + 0x0a, 0x09, 0x7d, 0x0d, + 0x0a, 0x09, 0x65, 0x6c, + 0x73, 0x65, 0x20, 0x69, + 0x66, 0x20, 0x28, 0x6e, + 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, + 0x20, 0x3d, 0x3d, 0x20, + 0x49, 0x44, 0x43, 0x41, + 0x4e, 0x43, 0x45, 0x4c, + 0x29, 0x0d, 0x0a, 0x09, + 0x7b, 0x0d, 0x0a, 0x09, + 0x09, 0x2f, 0x2f, 0x20, + 0x54, 0x4f, 0x44, 0x4f, + 0x3a, 0x20, 0x50, 0x6c, + 0x61, 0x63, 0x65, 0x20, + 0x63, 0x6f, 0x64, 0x65, + 0x20, 0x68, 0x65, 0x72, + 0x65, 0x20, 0x74, 0x6f, + 0x20, 0x68, 0x61, 0x6e, + 0x64, 0x6c, 0x65, 0x20, + 0x77, 0x68, 0x65, 0x6e, + 0x20, 0x74, 0x68, 0x65, + 0x20, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x20, + 0x69, 0x73, 0x0d, 0x0a, + 0x09, 0x09, 0x2f, 0x2f, + 0x20, 0x20, 0x64, 0x69, + 0x73, 0x6d, 0x69, 0x73, + 0x73, 0x65, 0x64, 0x20, + 0x77, 0x69, 0x74, 0x68, + 0x20, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x0d, + 0x0a, 0x09, 0x7d, 0x0d, + 0x0a, 0x0d, 0x0a, 0x09, + 0x2f, 0x2f, 0x20, 0x53, + 0x69, 0x6e, 0x63, 0x65, + 0x20, 0x74, 0x68, 0x65, + 0x20, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x20, + 0x68, 0x61, 0x73, 0x20, + 0x62, 0x65, 0x65, 0x6e, + 0x20, 0x63, 0x6c, 0x6f, + 0x73, 0x65, 0x64, 0x2c, + 0x20, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x20, + 0x46, 0x41, 0x4c, 0x53, + 0x45, 0x20, 0x73, 0x6f, + 0x20, 0x74, 0x68, 0x61, + 0x74, 0x20, 0x77, 0x65, + 0x20, 0x65, 0x78, 0x69, + 0x74, 0x20, 0x74, 0x68, + 0x65, 0x0d, 0x0a, 0x09, + 0x2f, 0x2f, 0x20, 0x20, + 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2c, + 0x20, 0x72, 0x61, 0x74, + 0x68, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x61, + 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x27, 0x73, + 0x20, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, + 0x20, 0x70, 0x75, 0x6d, + 0x70, 0x2e, 0x0d, 0x0a, + 0x09, 0x72, 0xe6, 0x74, + 0x75, 0x72, 0x6e, 0x20, + 0x46, 0x41, 0x4c, 0x53, + 0x45, 0x3b, 0x0d, 0x0a, + 0x7d, 0x0d, 0xe6 +}; + + +void display(const unsigned char array[], int length) { + int i; + for (i = 0; i < length; i++) { + if (i%32 == 0) { + printf("\n"); + } + if (i%8 == 0) { + printf(" "); + } + printf("%02X", array[i]); + } +} + +char *computeV4(const char *src, int len) +{ + static unsigned char buf[0x100]; + static unsigned char s[16]; + memcpy(s, src, 16); + + unsigned char wtmp[128]; + int wpos = 0; + int i; + + uint32_t t = (char)s[0] + (char)s[3]; + uint64_t t2 = ((uint64_t)t)*0xcccccccd; + uint64_t t3 = 5*(t2 >> 34); + uint64_t t4 = t - t3; + printf("%llu\n", t4); + switch(t4) + { + case 0: + { + unsigned char mtmp[16]; + rjMD5_CTX mctx; + + rjMD5Init(&mctx); + rjMD5Update(&mctx, array, 0x71c); + rjMD5Final(&mctx, mtmp); + char tbuf[10]; + for (i=0; i<16; ++i) + { + sprintf(wtmp + wpos, "%02x", mtmp[i]); + wpos += 2; + } + + + for (i=0; i<8; ++i) + { + sprintf(tbuf, "%02x", s[2*i]); + strcpy(wtmp + wpos, tbuf); + wpos += strlen(tbuf); + } + + rjMD5Init(&mctx); + rjMD5Update(&mctx, array_1, 0x7f3); + rjMD5Final(&mctx, mtmp); + for (i=0; i<16; ++i) + { + sprintf(wtmp + wpos, "%02x", mtmp[i]); + wpos += 2; + } + for (i=0; i<8; ++i) + { + sprintf(tbuf, "%02x", s[2*i+1]); + strcpy(wtmp + wpos, tbuf); + wpos += strlen(tbuf); + } + wpos = 0x60; + break; + + } + case 1: + { + sha1_ctx sctx; + rhash_sha1_init(&sctx); + rhash_sha1_update(&sctx,array_1,0x7f3); + rhash_sha1_final(&sctx,wtmp); + wpos += 20; + + memcpy(wtmp + wpos, s, 6); + wpos += 6; + + rhash_sha1_init(&sctx); + rhash_sha1_update(&sctx,array,0x71c); + rhash_sha1_final(&sctx,wtmp + wpos); + wpos += 20; + + memcpy(wtmp + wpos, s+6, 10); + wpos += 10; + break; + + } + case 2: + { + sha1_ctx sctx; + rhash_sha1_init(&sctx); + rhash_sha1_update(&sctx,array_1,0x7f3); + rhash_sha1_final(&sctx,wtmp); + wpos += 20; + + memcpy(wtmp + wpos, s, 6); + wpos += 6; + + struct ampheck_ripemd128 rctx; + ampheck_ripemd128_init(&rctx); + ampheck_ripemd128_update(&rctx, array, 0x71c); + ampheck_ripemd128_finish(&rctx, wtmp + wpos); + wpos += 16; + + memcpy(wtmp + wpos, s+6, 10); + wpos += 10; + break; + } + case 3: + { + tiger_ctx tctx; + rhash_tiger_init(&tctx); + rhash_tiger_update(&tctx,array,0x71c); + rhash_tiger_final(&tctx,wtmp); + wpos += 24; + + memcpy(wtmp + wpos, s, 10); + wpos += 10; + + struct ampheck_ripemd128 rctx; + ampheck_ripemd128_init(&rctx); + ampheck_ripemd128_update(&rctx, array_1, 0x7f3); + ampheck_ripemd128_finish(&rctx, wtmp + wpos); + wpos += 16; + + memcpy(wtmp + wpos, s+10, 6); + wpos += 6; + break; + } + case 4: + { + tiger_ctx tctx; + rhash_tiger_init(&tctx); + rhash_tiger_update(&tctx,array_1,0x7f3); + rhash_tiger_final(&tctx,wtmp); + wpos += 24; + + memcpy(wtmp + wpos, s, 8); + wpos += 8; + + sha1_ctx sctx; + rhash_sha1_init(&sctx); + rhash_sha1_update(&sctx,array,0x71c); + rhash_sha1_final(&sctx,wtmp + wpos); + wpos += 20; + + memcpy(wtmp + wpos, s+8, 8); + wpos += 8; + break; + } + default: + { + return NULL; + } + + } + printf("%llu\n", t4); + whirlpool_ctx w; + static unsigned char digest[100]; + + rhash_whirlpool_init(&w); + rhash_whirlpool_update(&w, wtmp, wpos); + rhash_whirlpool_final(&w, digest); + + + char tbuf[2]; + for (i = 0; i<64; ++i) + { + sprintf(tbuf, "%02x", digest[i]); + buf[2*i] = tbuf[0]; + buf[2*i+1] = tbuf[1]; + } + return buf; + +} + +char *computePwd(const char *md5) +{ + static char buf[16]; + + unsigned char tmp[40]; + int tmpl=0; + tmpl = strlen(userName); + strcpy(tmp, userName); + memcpy(tmp + tmpl, md5, 16); + tmpl += 16; + + memcpy(buf, ComputeHash(tmp, tmpl), 16); + + memset(tmp, 0, 16); + strcpy(tmp, password); + + int i; + for (i=0; i<16; ++i) + buf[i] ^= tmp[i]; + return buf; +} diff --git a/src/checkV4.h b/src/checkV4.h new file mode 100644 index 0000000..ef7f785 --- /dev/null +++ b/src/checkV4.h @@ -0,0 +1,6 @@ +#ifndef CHECKV4_H +#define CHECKV4_H + +char *computeV4(const char *src, int len); +char *computePwd(const char *md5); +#endif \ No newline at end of file diff --git a/src/dlfunc.c b/src/dlfunc.c index 5c97954..21433bb 100644 --- a/src/dlfunc.c +++ b/src/dlfunc.c @@ -9,7 +9,6 @@ * 日 期:2009.11.11 */ #include "dlfunc.h" -#include "i18n.h" #ifndef NO_DYLOAD #include @@ -42,7 +41,7 @@ int load_libpcap(void) { error = dlerror(); } if (libpcap == NULL) { - printf(_("!! 打开libpcap失败,请检查是否已安装该库文件。\n")); + printf("!! 打开libpcap失败,请检查是否已安装该库文件。\n"); return -1; } if ((pcap_findalldevs = dlsym(libpcap, "pcap_findalldevs"), error = dlerror()) != NULL @@ -56,7 +55,7 @@ int load_libpcap(void) { || (pcap_close = dlsym(libpcap, "pcap_close"), error = dlerror()) != NULL || (pcap_breakloop = dlsym(libpcap, "pcap_breakloop"), error = dlerror()) != NULL || (pcap_sendpacket = dlsym(libpcap, "pcap_sendpacket"), error = dlerror()) != NULL) { - printf(_("!! 从libpcap获取函数失败: %s\n"), error); + printf("!! 从libpcap获取函数失败: %s\n", error); free_libpcap(); return -1; } @@ -75,7 +74,6 @@ void free_libpcap(void) { #ifndef NO_NOTIFY #include -#include typedef void NotifyNotification, GtkWidget, GError; typedef char gchar; @@ -89,7 +87,7 @@ static gboolean (*notify_notification_show)(NotifyNotification *, GError **); static void *libnotify = NULL; static NotifyNotification *notify = NULL; -static int load_libnotify(void) { +int load_libnotify(void) { char *error; gboolean (*notify_init)(const char *); NotifyNotification *(*notify_notification_new)(const gchar *, const gchar *, @@ -106,7 +104,7 @@ static int load_libnotify(void) { error = dlerror(); } if (libnotify == NULL) { - printf(_("!! 打开libnotify失败,请检查是否已安装该库文件。\n")); + printf("!! 打开libnotify失败,请检查是否已安装该库文件。\n"); return -1; } if ((notify_init = dlsym(libnotify, "notify_init"), error = dlerror()) != NULL @@ -114,16 +112,16 @@ static int load_libnotify(void) { || (notify_notification_show = dlsym(libnotify, "notify_notification_show"), error = dlerror()) != NULL || (notify_notification_update = dlsym(libnotify, "notify_notification_update"), error = dlerror()) != NULL || (notify_notification_set_timeout = dlsym(libnotify, "notify_notification_set_timeout"), error = dlerror()) != NULL) { - printf(_("!! 从libnotify获取函数失败: %s\n"), error); + printf("!! 从libnotify获取函数失败: %s\n", error); free_libnotify(); return -1; } - if (!notify_init("mentohust") || - !(notify = notify_notification_new("MentoHUST", NULL, NULL, NULL))) { - printf(_("!! 初始化libnotify失败。\n")); + if (!notify_init("mentohust")) { + printf("!! 初始化libnotify失败。\n"); free_libnotify(); return -1; } + notify = notify_notification_new("MentoHUST", NULL, NULL, NULL); return 0; } @@ -142,17 +140,14 @@ void free_libnotify(void) { } } -int show_notify(const char *summary, char *body, int timeout) { - seteuid(getuid()); - if (!notify && load_libnotify() < 0) { - seteuid(0); - return -1; - } +void set_timeout(int timeout) { notify_notification_set_timeout(notify, timeout); +} + +void show_notify(const char *summary, char *body) { notify_notification_update(notify, summary, body, NULL); notify_notification_show(notify, NULL); - seteuid(0); - return 0; } #endif /* NO_NOTIFY */ + diff --git a/src/dlfunc.h b/src/dlfunc.h index bb93333..e6dd8fe 100644 --- a/src/dlfunc.h +++ b/src/dlfunc.h @@ -67,8 +67,11 @@ void free_libpcap(void); /* 释放libpcap.so */ #endif /* NO_DYLOAD */ #ifndef NO_NOTIFY +int load_libnotify(void); /* 载入libnotify.so */ void free_libnotify(void); /* 释放libnotify.so */ -int show_notify(const char *summary, char *body, int timeout); /* 显示通知:概要、正文、超时 */ +void set_timeout(int timeout); /* 设置超时间隔 */ +void show_notify(const char *summary, char *body); /* 显示通知:概要、正文 */ #endif /* NO_NOTIFY */ #endif /* HUSTMOON_DLFUNC_H */ + diff --git a/src/mentohust b/src/mentohust new file mode 100755 index 0000000..3d4c29d Binary files /dev/null and b/src/mentohust differ diff --git a/src/mentohust.c b/src/mentohust.c index 6ccf365..38ae9e0 100644 --- a/src/mentohust.c +++ b/src/mentohust.c @@ -9,10 +9,11 @@ */ #ifdef HAVE_CONFIG_H #include "config.h" +#else +#define HAVE_ICONV_H #endif #include "myconfig.h" -#include "i18n.h" #include "mystate.h" #include "myfunc.h" #include "dlfunc.h" @@ -22,6 +23,10 @@ #include #include +#ifdef HAVE_ICONV_H +#include +#endif + extern pcap_t *hPcap; extern volatile int state; extern u_char *fillBuf; @@ -45,10 +50,6 @@ static void showCernetMsg(const u_char *buf); /* 显示赛尔服务器提示信 int main(int argc, char **argv) { -#ifdef ENABLE_NLS - textdomain(GETTEXT_PACKAGE); - setlocale(LC_ALL, ""); -#endif atexit(exit_handle); initConfig(argc, argv); signal(SIGALRM, sig_handle); /* 定时器 */ @@ -62,11 +63,10 @@ int main(int argc, char **argv) else switchState(ID_START); /* 开始认证 */ if (-1 == pcap_loop(hPcap, -1, pcap_handle, NULL)) { /* 开始捕获数据包 */ - printf(_("!! 捕获数据包失败,请检查网络连接!\n")); + printf("!! 捕获数据包失败,请检查网络连接!\n"); #ifndef NO_NOTIFY - if (showNotify && show_notify(_("MentoHUST - 错误提示"), - _("捕获数据包失败,请检查网络连接!"), 1000*showNotify) < 0) - showNotify = 0; + if (showNotify) + show_notify("MentoHUST - 错误提示", "捕获数据包失败,请检查网络连接!"); #endif } exit(EXIT_FAILURE); @@ -88,7 +88,7 @@ static void exit_handle(void) #ifndef NO_DYLOAD free_libpcap(); #endif - printf(_(">> 认证已退出。\n")); + printf(">> 认证已退出。\n"); } static void sig_handle(int sig) @@ -98,11 +98,10 @@ static void sig_handle(int sig) if (-1 == switchState(state)) { pcap_breakloop(hPcap); - printf(_("!! 发送数据包失败, 请检查网络连接!\n")); + printf("!! 发送数据包失败, 请检查网络连接!\n"); #ifndef NO_NOTIFY - if (showNotify && show_notify(_("MentoHUST - 错误提示"), - _("发送数据包失败, 请检查网络连接!"), 1000*showNotify) < 0) - showNotify = 0; + if (showNotify) + show_notify("MentoHUST - 错误提示", "发送数据包失败, 请检查网络连接!"); #endif exit(EXIT_FAILURE); } @@ -126,7 +125,7 @@ static void pcap_handle(u_char *user, const struct pcap_pkthdr *h, const u_char if (buf[0x0F]==0x00 && buf[0x12]==0x01 && buf[0x16]==0x01) { /* 验证用户名 */ if (startMode < 3) { memcpy(destMAC, buf+6, 6); - printf(_("** 认证MAC:\t%s\n"), formatHex(destMAC, 6)); + printf("** 认证MAC:\t%s\n", formatHex(destMAC, 6)); startMode += 3; /* 标记为已获取 */ } if (startMode==3 && memcmp(buf+0x17, "User name", 9)==0) /* 塞尔 */ @@ -136,7 +135,7 @@ static void pcap_handle(u_char *user, const struct pcap_pkthdr *h, const u_char else if (buf[0x0F]==0x00 && buf[0x12]==0x01 && buf[0x16]==0x04) /* 验证密码 */ switchState(ID_CHALLENGE); else if (buf[0x0F]==0x00 && buf[0x12]==0x03) { /* 认证成功 */ - printf(_(">> 认证成功!\n")); + printf(">> 认证成功!\n"); failCount = 0; if (!(startMode%3 == 2)) { getEchoKey(buf); @@ -155,15 +154,15 @@ static void pcap_handle(u_char *user, const struct pcap_pkthdr *h, const u_char switchState(ID_ECHO); else if (buf[0x0F]==0x00 && buf[0x12]==0x04) { /* 认证失败或被踢下线 */ if (state==ID_WAITECHO || state==ID_ECHO) { - printf(_(">> 认证掉线,开始重连!\n")); + printf(">> 认证掉线,开始重连!\n"); switchState(ID_START); } else if (buf[0x1b]!=0 || startMode%3==2) { - printf(_(">> 认证失败!\n")); + printf(">> 认证失败!\n"); if (startMode%3 != 2) showRuijieMsg(buf, h->caplen); if (maxFail && ++failCount>=maxFail) { - printf(_(">> 连续认证失败%u次,退出认证。\n"), maxFail); + printf(">> 连续认证失败%u次,退出认证。\n", maxFail); exit(EXIT_SUCCESS); } restart(); @@ -177,17 +176,18 @@ static void pcap_handle(u_char *user, const struct pcap_pkthdr *h, const u_char char str[50]; if (gateMAC[0] == 0xFF) { memcpy(gateMAC, buf+0x16, 6); - printf(_("** 网关MAC:\t%s\n"), formatHex(gateMAC, 6)); + printf("** 网关MAC:\t%s\n", formatHex(gateMAC, 6)); + fflush(stdout); sprintf(str, "arp -s %s %s", formatIP(gateway), formatHex(gateMAC, 6)); system(str); - } else if (buf[0x15]==0x02 && memcmp(&rip, buf+0x26, 4)==0 + } else if (buf[0x15]==0x02 && *(u_int32_t *)(buf+0x26)==rip && memcmp(gateMAC, buf+0x16, 6)!=0) { - printf(_("** ARP欺骗:\t%s\n"), formatHex(buf+0x16, 6)); + printf("** ARP欺骗:\t%s\n", formatHex(buf+0x16, 6)); + fflush(stdout); #ifndef NO_NOTIFY if (showNotify) { - sprintf(str, _("欺骗源: %s"), formatHex(buf+0x16, 6)); - if (show_notify(_("MentoHUST - ARP提示"), str, 1000*showNotify) < 0) - showNotify = 0; + sprintf(str, "欺骗源: %s", formatHex(buf+0x16, 6)); + show_notify("MentoHUST - ARP提示", str); } #endif } @@ -196,45 +196,78 @@ static void pcap_handle(u_char *user, const struct pcap_pkthdr *h, const u_char #endif } +#ifndef MAC_OS +static char *gbk2utf(char *src, size_t srclen) /* GBK转UTF-8 */ +#else +static char *gbk2utf(const char *src, size_t srclen) /* GBK转UTF-8 */ +#endif +{ +#ifdef HAVE_ICONV_H + /* GBK一汉字俩字节,UTF-8一汉字3字节,二者ASCII字符均一字节 + 所以这样申请是足够的了,要记得释放 */ + size_t dstlen = srclen * 3 / 2 + 1; + size_t left = dstlen; + char *dst, *pdst; + int res; + iconv_t cd = iconv_open("utf-8", "gbk"); + if (cd == (iconv_t)-1) + return NULL; + dst = (char *)malloc(dstlen); + pdst = dst; + res = iconv(cd, &src, &srclen, &pdst, &left); + iconv_close(cd); + if (res == -1) + { + free(dst); + return NULL; + } + dst[dstlen-left] = '\0'; +#else + char *dst = (char *)malloc(srclen+1); + memcpy(dst, src, srclen); + dst[srclen] = '\0'; +#endif + return dst; +} + static void showRuijieMsg(const u_char *buf, unsigned bufLen) { char *serverMsg; int length = buf[0x1b]; - if (length > 0) { + if (length > 0) + { for (serverMsg=(char *)(buf+0x1c); *serverMsg=='\r'||*serverMsg=='\n'; serverMsg++,length--); /* 跳过开头的换行符 */ if (strlen(serverMsg) < length) length = strlen(serverMsg); - if (length>0 && (serverMsg=gbk2utf(serverMsg, length))!=NULL) { - if (strlen(serverMsg)) { - printf(_("$$ 系统提示:\t%s\n"), serverMsg); + if (length>0 && (serverMsg=gbk2utf(serverMsg, length))!=NULL) + { + printf("$$ 系统提示:\t%s\n", serverMsg); #ifndef NO_NOTIFY - if (showNotify && show_notify(_("MentoHUST - 系统提示"), - serverMsg, 1000*showNotify) < 0) - showNotify = 0; + if (showNotify) + show_notify("MentoHUST - 系统提示", serverMsg); #endif - } free(serverMsg); } } - if ((length=0x1c+buf[0x1b]+0x69+39) < bufLen) { + if ((length=0x1c+buf[0x1b]+0x69+39) < bufLen) + { serverMsg=(char *)(buf+length); if (buf[length-1]-2 > bufLen-length) length = bufLen - length; else length = buf[length-1]-2; for (; *serverMsg=='\r'||*serverMsg=='\n'; serverMsg++,length--); - if (length>0 && (serverMsg=gbk2utf(serverMsg, length))!=NULL) { - if (strlen(serverMsg)) { - printf(_("$$ 计费提示:\t%s\n"), serverMsg); + if (length>0 && (serverMsg=gbk2utf(serverMsg, length))!=NULL) + { + printf("$$ 计费提示:\t%s\n", serverMsg); #ifndef NO_NOTIFY - if (showNotify && show_notify(_("MentoHUST - 计费提示"), - serverMsg, 1000*showNotify) < 0) - showNotify = 0; + if (showNotify) + show_notify("MentoHUST - 计费提示", serverMsg); #endif - } free(serverMsg); } } + fflush(stdout); } static void showCernetMsg(const u_char *buf) @@ -245,12 +278,12 @@ static void showCernetMsg(const u_char *buf) length = strlen(serverMsg); if (length>0 && (serverMsg=gbk2utf(serverMsg, length))!=NULL) { - printf(_("$$ 系统提示:\t%s\n"), serverMsg); + printf("$$ 系统提示:\t%s\n", serverMsg); #ifndef NO_NOTIFY - if (showNotify && show_notify(_("MentoHUST - 系统提示"), - serverMsg, 1000*showNotify) < 0) - showNotify = 0; + if (showNotify) + show_notify("MentoHUST - 系统提示", serverMsg); #endif free(serverMsg); } + fflush(stdout); } diff --git a/src/mentohust.conf b/src/mentohust.conf index 718ddad..8d1c8b6 100644 --- a/src/mentohust.conf +++ b/src/mentohust.conf @@ -1,46 +1 @@ -# MentoHUST for Linux By HustMoon Studio -# -# 配置文件名称必须是小写/etc/mentohust.conf,编码格式建议是UTF-8 -# 配置文件中一行开头的空格和Tab会被忽略,其他的会视为参数一部分 -# 配置文件中Section与Key不区分大小写,以#或;开头的行视为注释 -# 同一个参数若在命令行参数和配置文件中均有设置,使用命令行参数 -# 命令行中使用参数-h或-?可查看详细参数信息,建议通过命令行设置参数 -# 命令行中使用参数-w可将配置更新到/etc/mentohust.conf - -[MentoHUST] -;用户名,长度不超过64 -Username= -;密码 -Password= -;网卡 -Nic= -;静态IP用户可以使用非本机IP -IP= -;掩码,无关紧要 -Mask= -;网关,如果指定了就会监视网关ARP信息 -Gateway= -;DNS服务器,无关紧要 -DNS= -;Ping主机,用于掉线检测,0.0.0.0表示关闭该功能 -PingHost= -;每次发包超时时间(秒) -Timeout= -;发送Echo包的间隔(秒) -EchoInterval= -;失败等待(秒)认证失败后等待RestartWait秒或者服务器请求后重启认证 -RestartWait= -;寻找服务器时的组播地址类型 0标准 1锐捷 2将MentoHUST用于赛尔认证 -StartMode= -;DHCP方式 0(不使用) 1(二次认证) 2(认证后) 3(认证前) -DhcpMode= -;是否后台运行: 0(否) 1(是,关闭输出) 2(是,保留输出) 3(是,输出到文件/tmp/mentohust.log) -DaemonMode= -;是否显示通知: 0(否) 1~20(是) -ShowNotify= -;客户端版本号,如果未开启客户端校验但对版本号有要求,可以在此指定,形如3.30 -Version= -;认证数据文件,如果需要校验客户端,就需要正确设置 -DataFile= -;进行DHCP的脚本 -DhcpScript= + diff --git a/src/mycheck.c b/src/mycheck.c index 25649fd..272d8c4 100644 --- a/src/mycheck.c +++ b/src/mycheck.c @@ -4,15 +4,9 @@ * * 文件名称:mycheck.c * 摘 要:客户端校验算法 -* 作 者:kkHAIKE +* 作 者:kkHAIKE & HustMoon */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "mycheck.h" -#include "myini.h" #include "md5.h" #include #include @@ -20,6 +14,7 @@ static BYTE *bin_8021x = NULL; static DWORD size_8021x; +static BYTE hex[][17]={"0123456789ABCDEF", "0123456789abcdef"}; #ifdef WORDS_BIGENDIAN WORD ltobs(WORD x) { @@ -35,7 +30,6 @@ DWORD ltobl(DWORD x) { #endif void hex_to_str(const BYTE *a, char *b, int hexsize, int upper) { - static const BYTE hex[][17]={"0123456789ABCDEF", "0123456789abcdef"}; BYTE *q = (BYTE *)b; int i; for (i=0; i= s_end) - return; - tmp[(m<<7)^n] = d; - } else { - d = tmp[(m<<7)^n]; - } - *dp++ = d; - if (dp >= d_end) { - return; - } - m = n; - n = d; - } - } -} - -int decodeConfig(const char *file, BYTE *dbuf, int dsize) { - char *sbuf; - int ssize = loadFile(&sbuf, file); - if (ssize < 0) - return -1; - decode_dat((BYTE *)sbuf, dbuf, ssize, dsize); - free(sbuf); - return 0; -} - void check_free() { if (bin_8021x) { free(bin_8021x); @@ -230,3 +186,4 @@ DWORD getVer(const char *file) { free(data); return -1; } + diff --git a/src/mycheck.h b/src/mycheck.h index c3762e3..ed51fd3 100644 --- a/src/mycheck.h +++ b/src/mycheck.h @@ -211,7 +211,6 @@ DWORD ltobl(DWORD x); #define LTOBL(x) (x) #endif -int decodeConfig(const char *file, BYTE *dbuf, int dsize); int check_init(const char *dataFile); void V2_check(const BYTE *seed, char *final_str); void check_free(); diff --git a/src/myconfig.c b/src/myconfig.c index e5c1b07..3146c36 100644 --- a/src/myconfig.c +++ b/src/myconfig.c @@ -15,7 +15,6 @@ static const char *PACKAGE_BUGREPORT = "http://code.google.com/p/mentohust/issue #endif #include "myconfig.h" -#include "i18n.h" #include "myini.h" #include "myfunc.h" #include "dlfunc.h" @@ -25,7 +24,6 @@ static const char *PACKAGE_BUGREPORT = "http://code.google.com/p/mentohust/issue #include #include #include -#include #define ACCOUNT_SIZE 65 /* 用户名密码长度*/ #define NIC_SIZE 16 /* 网卡名最大长度 */ @@ -36,15 +34,9 @@ static const char *PACKAGE_BUGREPORT = "http://code.google.com/p/mentohust/issue #define D_STARTMODE 0 /* 默认组播模式 */ #define D_DHCPMODE 0 /* 默认DHCP模式 */ #define D_DAEMONMODE 0 /* 默认daemon模式 */ -#define D_MAXFAIL 8 /* 默认允许失败次数 */ +#define D_MAXFAIL 0 /* 默认允许失败次数 */ -#define ECHOFLAGS (ECHO|ECHOE|ECHOK|ECHONL) /* 控制台输入密码时的模式*/ - -#ifdef MAC_OS -static const char *D_DHCPSCRIPT = "dhcping -v -t 15"; /* 默认DHCP脚本 */ -#else static const char *D_DHCPSCRIPT = "dhclient"; /* 默认DHCP脚本 */ -#endif static const char *CFG_FILE = "/etc/mentohust.conf"; /* 配置文件 */ static const char *LOG_FILE = "/tmp/mentohust.log"; /* 日志文件 */ static const char *LOCK_FILE = "/var/run/mentohust.pid"; /* 锁文件 */ @@ -156,67 +148,33 @@ static int decodePass(char *dst, const char *src) { } #endif -int getpasswd(char passwd[]) -{ - int ret=0; - struct termios termios_buf; - - if(tcgetattr(STDIN_FILENO,&termios_buf)!=0) - { - perror(_("获取终端属性失败")); - return -1; - } - - termios_buf.c_lflag &= ~ECHOFLAGS; - - if(tcsetattr(STDIN_FILENO,TCSAFLUSH,&termios_buf)!=0) - { - perror(_("设置终端属性失败")); - return -2; - } - - if(passwd!=NULL){ - ret=scanf("%s", passwd); - } - - //printf("\nYour passwd is %s\n",passwd); - - if(tcgetattr(STDIN_FILENO,&termios_buf)!=0) - { - perror(_("获取终端属性失败")); - return -1; - } - - termios_buf.c_lflag |= ECHOFLAGS; - - if(tcsetattr(STDIN_FILENO,TCSAFLUSH,&termios_buf)!=0) - { - perror(_("设置终端属性失败")); - return -2; - } - - return ret>0?0:1; -} - - void initConfig(int argc, char **argv) { int saveFlag = 0; /* 是否需要保存参数 */ int exitFlag = 0; /* 0Nothing 1退出 2重启 */ int daemonMode = D_DAEMONMODE; /* 是否后台运行 */ - printf(_("\n欢迎使用MentoHUST\t版本: %s\n" + printf("\n欢迎使用MentoHUST\t版本: %s\n" "Copyright (C) 2009-2010 HustMoon Studio\n" "人到华中大,有甜亦有辣。明德厚学地,求是创新家。\n" - "Bug report to %s\n\n"), VERSION, PACKAGE_BUGREPORT); + "Bug report to %s\n\n", VERSION, PACKAGE_BUGREPORT); saveFlag = (readFile(&daemonMode)==0 ? 0 : 1); readArg(argc, argv, &saveFlag, &exitFlag, &daemonMode); +#ifndef NO_NOTIFY + if (showNotify) { + seteuid(getuid()); + if (load_libnotify() == -1) + showNotify = 0; + else + set_timeout(1000 * showNotify); + seteuid(0); + } +#endif #ifndef NO_DYLOAD if (load_libpcap() == -1) { #ifndef NO_NOTIFY - if (showNotify && show_notify(_("MentoHUST - 错误提示"), - _("载入libpcap失败, 请检查该库文件!"), 1000*showNotify) < 0) - showNotify = 0; + if (showNotify) + show_notify("MentoHUST - 错误提示", "载入libpcap失败, 请检查该库文件!"); #endif exit(EXIT_FAILURE); } @@ -226,9 +184,8 @@ void initConfig(int argc, char **argv) saveFlag = 1; if (getAdapter() == -1) { /* 找不到(第一块)网卡? */ #ifndef NO_NOTIFY - if (showNotify && show_notify(_("MentoHUST - 错误提示"), - _("找不到网卡!"), 1000*showNotify) < 0) - showNotify = 0; + if (showNotify) + show_notify("MentoHUST - 错误提示", "找不到网卡!"); #endif exit(EXIT_FAILURE); } @@ -236,19 +193,14 @@ void initConfig(int argc, char **argv) if (userName[0]=='\0' || password[0]=='\0') /* 未写用户名密码? */ { saveFlag = 1; - printf(_("?? 请输入用户名: ")); + printf("?? 请输入用户名: "); scanf("%s", userName); - - printf(_("?? 请输入密码: ")); - //scanf("%s", password); - getpasswd(password); - //last newline eaten by scanf in getpasswd - printf("\n"); - - printf(_("?? 请选择组播地址(0标准 1锐捷私有 2赛尔): ")); + printf("?? 请输入密码: "); + scanf("%s", password); + printf("?? 请选择组播地址(0标准 1锐捷私有 2赛尔): "); scanf("%u", &startMode); startMode %= 3; - printf(_("?? 请选择DHCP方式(0不使用 1二次认证 2认证后 3认证前): ")); + printf("?? 请选择DHCP方式(0不使用 1二次认证 2认证后 3认证前): "); scanf("%u", &dhcpMode); dhcpMode %= 4; } @@ -264,9 +216,8 @@ void initConfig(int argc, char **argv) printConfig(); if (fillHeader()==-1 || openPcap()==-1) { /* 获取IP、MAC,打开网卡 */ #ifndef NO_NOTIFY - if (showNotify && show_notify(_("MentoHUST - 错误提示"), - _("获取MAC地址或打开网卡失败!"), 1000*showNotify) < 0) - showNotify = 0; + if (showNotify) + show_notify("MentoHUST - 错误提示", "获取MAC地址或打开网卡失败!"); #endif exit(EXIT_FAILURE); } @@ -276,22 +227,21 @@ void initConfig(int argc, char **argv) static int readFile(int *daemonMode) { - char tmp[16], *buf; - if (loadFile(&buf, CFG_FILE) < 0) + char tmp[16]; + char *buf = loadFile(CFG_FILE); + if (buf == NULL) return -1; getString(buf, "MentoHUST", "Username", "", userName, sizeof(userName)); -#ifdef NO_ENCODE_PASS getString(buf, "MentoHUST", "Password", "", password, sizeof(password)); -#else - char pass[ACCOUNT_SIZE*4/3+1]; - getString(buf, "MentoHUST", "Password", "", pass, sizeof(pass)); - if (pass[0] == ' ') { - decodePass(password, pass+1); +#ifndef NO_ENCODE_PASS + char pass[ACCOUNT_SIZE*4/3]; + if (password[0] == '\0') { + getString(buf, "MentoHUST", "EncodePass", "", pass, sizeof(pass)); + decodePass(password, pass); } else { - strncpy(password, pass, sizeof(password)-1); - encodePass(pass+1, password); - pass[0] = ' '; - setString(&buf, "MentoHUST", "Password", pass); + encodePass(pass, password); + setString(&buf, "MentoHUST", "Password", NULL); + setString(&buf, "MentoHUST", "EncodePass", pass); saveFile(buf, CFG_FILE); } #endif @@ -343,10 +293,6 @@ static void readArg(char argc, char **argv, int *saveFlag, int *exitFlag, int *d c = str[1]; if (c=='h' || c=='?' || strcmp(str, "--help")==0) showHelp(argv[0]); - else if (c == 'q') { - printSuConfig(str+2); - exit(EXIT_SUCCESS); - } else if (c == 'w') *saveFlag = 1; else if (c == 'k') { @@ -414,7 +360,7 @@ static void readArg(char argc, char **argv, int *saveFlag, int *exitFlag, int *d static void showHelp(const char *fileName) { char *helpString = - _("用法:\t%s [-选项][参数]\n" + "用法:\t%s [-选项][参数]\n" "选项:\t-h 显示本帮助信息\n" "\t-k -k(退出程序) 其他(重启程序)\n" "\t-w 保存参数到配置文件\n" @@ -427,9 +373,9 @@ static void showHelp(const char *fileName) "\t-s DNS[默认0.0.0.0]\n" "\t-o Ping主机[默认0.0.0.0,表示关闭该功能]\n" "\t-t 认证超时(秒)[默认8]\n" - "\t-e 心跳间隔(秒)[默认30]\n" + "\t-e 响应间隔(秒)[默认30]\n" "\t-r 失败等待(秒)[默认15]\n" - "\t-l 允许失败次数[0表示无限制,默认8]\n" + "\t-l 允许失败次数[默认0,表示无限制]\n" "\t-a 组播地址: 0(标准) 1(锐捷) 2(赛尔) [默认0]\n" "\t-d DHCP方式: 0(不使用) 1(二次认证) 2(认证后) 3(认证前) [默认0]\n" "\t-b 是否后台运行: 0(否) 1(是,关闭输出) 2(是,保留输出) 3(是,输出到文件) [默认0]\n" @@ -439,11 +385,9 @@ static void showHelp(const char *fileName) "\t-v 客户端版本号[默认0.00表示兼容xrgsu]\n" "\t-f 自定义数据文件[默认不使用]\n" "\t-c DHCP脚本[默认dhclient]\n" - "\t-q 显示SuConfig.dat的内容(如-q/path/SuConfig.dat)\n" "例如:\t%s -uusername -ppassword -neth0 -i192.168.0.1 -m255.255.255.0 -g0.0.0.0 -s0.0.0.0 -o0.0.0.0 -t8 -e30 -r15 -a0 -d1 -b0 -v4.10 -fdefault.mpf -cdhclient\n" - "注意:使用时请确保是以root权限运行!\n\n"); + "注意:使用时请确保是以root权限运行!\n\n"; printf(helpString, fileName, fileName); - //cancel the registered funciton:atexit(exit_handle) exit(EXIT_SUCCESS); } @@ -454,7 +398,7 @@ static int getAdapter() char errbuf[PCAP_ERRBUF_SIZE]; if (pcap_findalldevs(&alldevs, errbuf)==-1 || alldevs==NULL) { - printf(_("!! 查找网卡失败: %s\n"), errbuf); + printf("!! 查找网卡失败: %s\n", errbuf); return -1; } for (d=alldevs; d!=NULL; d=d->next) @@ -462,7 +406,7 @@ static int getAdapter() num++; if (!(d->flags & PCAP_IF_LOOPBACK) && strcmp(d->name, "any")!=0) { - printf(_("** 网卡[%d]:\t%s\n"), num, d->name); + printf("** 网卡[%d]:\t%s\n", num, d->name); avail++; i = num; } @@ -470,19 +414,19 @@ static int getAdapter() if (avail == 0) { pcap_freealldevs(alldevs); - printf(_("!! 找不到网卡!\n")); + printf("!! 找不到网卡!\n"); return -1; } if (avail > 1) { - printf(_("?? 请选择网卡[1-%d]: "), num); + printf("?? 请选择网卡[1-%d]: ", num); scanf("%d", &i); if (i < 1) i = 1; else if (i > num) i = num; } - printf(_("** 您选择了第[%d]块网卡。\n"), i); + printf("** 您选择了第[%d]块网卡。\n", i); for (d=alldevs; i>1; d=d->next, i--); strncpy(nic, d->name, sizeof(nic)-1); pcap_freealldevs(alldevs); @@ -491,41 +435,40 @@ static int getAdapter() static void printConfig() { - char *addr[] = {_("标准"), _("锐捷"), _("赛尔")}; - char *dhcp[] = {_("不使用"), _("二次认证"), _("认证后"), _("认证前")}; - printf(_("** 用户名:\t%s\n"), userName); + char *addr[] = {"标准", "锐捷", "赛尔"}; + char *dhcp[] = {"不使用", "二次认证", "认证后", "认证前"}; + printf("** 用户名:\t%s\n", userName); /* printf("** 密码:\t%s\n", password); */ - printf(_("** 网卡: \t%s\n"), nic); + printf("** 网卡: \t%s\n", nic); if (gateway) - printf(_("** 网关地址:\t%s\n"), formatIP(gateway)); + printf("** 网关地址:\t%s\n", formatIP(gateway)); if (dns) - printf(_("** DNS地址:\t%s\n"), formatIP(dns)); + printf("** DNS地址:\t%s\n", formatIP(dns)); if (pingHost) - printf(_("** 智能重连:\t%s\n"), formatIP(pingHost)); - printf(_("** 认证超时:\t%u秒\n"), timeout); - printf(_("** 心跳间隔:\t%u秒\n"), echoInterval); - printf(_("** 失败等待:\t%u秒\n"), restartWait); - if (maxFail) - printf(_("** 允许失败:\t%u次\n"), maxFail); - printf(_("** 组播地址:\t%s\n"), addr[startMode]); - printf(_("** DHCP方式:\t%s\n"), dhcp[dhcpMode]); + printf("** 智能重连:\t%s\n", formatIP(pingHost)); + printf("** 认证超时:\t%u秒\n", timeout); + printf("** 响应间隔:\t%u秒\n", echoInterval); + printf("** 失败等待:\t%u秒\n", restartWait); + printf("** 允许失败:\t%u次\n", maxFail); + printf("** 组播地址:\t%s\n", addr[startMode]); + printf("** DHCP方式:\t%s\n", dhcp[dhcpMode]); #ifndef NO_NOTIFY if (showNotify) - printf(_("** 通知超时:\t%d秒\n"), showNotify); + printf("** 通知超时:\t%d秒\n", showNotify); #endif if (bufType >= 2) - printf(_("** 数据文件:\t%s\n"), dataFile); + printf("** 数据文件:\t%s\n", dataFile); if (dhcpMode != 0) - printf(_("** DHCP脚本:\t%s\n"), dhcpScript); + printf("** DHCP脚本:\t%s\n", dhcpScript); } static int openPcap() { char buf[PCAP_ERRBUF_SIZE], *fmt; struct bpf_program fcode; - if ((hPcap = pcap_open_live(nic, 2048, startMode >= 3 , 1000, buf)) == NULL) + if ((hPcap = pcap_open_live(nic, 2048, 1, 1000, buf)) == NULL) { - printf(_("!! 打开网卡%s失败: %s\n"), nic, buf); + printf("!! 打开网卡%s失败: %s\n", nic, buf); return -1; } fmt = formatHex(localMAC, 6); @@ -539,7 +482,7 @@ static int openPcap() if (pcap_compile(hPcap, &fcode, buf, 0, 0xffffffff) == -1 || pcap_setfilter(hPcap, &fcode) == -1) { - printf(_("!! 设置pcap过滤器失败: %s\n"), pcap_geterr(hPcap)); + printf("!! 设置pcap过滤器失败: %s\n", pcap_geterr(hPcap)); return -1; } pcap_freecode(&fcode); @@ -548,8 +491,8 @@ static int openPcap() static void saveConfig(int daemonMode) { - char *buf; - if (loadFile(&buf, CFG_FILE) < 0) { + char *buf = loadFile(CFG_FILE); + if (buf == NULL) { buf = (char *)malloc(1); buf[0] = '\0'; } @@ -580,16 +523,15 @@ static void saveConfig(int daemonMode) #ifdef NO_ENCODE_PASS setString(&buf, "MentoHUST", "Password", password); #else - char pass[ACCOUNT_SIZE*4/3+1]; - encodePass(pass+1, password); - pass[0] = ' '; - setString(&buf, "MentoHUST", "Password", pass); + char pass[ACCOUNT_SIZE*4/3]; + encodePass(pass, password); + setString(&buf, "MentoHUST", "EncodePass", pass); #endif setString(&buf, "MentoHUST", "Username", userName); if (saveFile(buf, CFG_FILE) != 0) - printf(_("!! 保存认证参数到%s失败!\n"), CFG_FILE); + printf("!! 保存认证参数到%s失败!\n", CFG_FILE); else - printf(_("** 认证参数已成功保存到%s.\n"), CFG_FILE); + printf("** 认证参数已成功保存到%s.\n", CFG_FILE); free(buf); } @@ -598,7 +540,7 @@ static void checkRunning(int exitFlag, int daemonMode) struct flock fl; lockfd = open (LOCK_FILE, O_RDWR|O_CREAT, LOCKMODE); if (lockfd < 0) { - perror(_("!! 打开锁文件失败")); + perror("!! 打开锁文件失败"); /* perror真的很好啊,以前没用它真是太亏了 */ goto error_exit; } fl.l_start = 0; @@ -606,47 +548,45 @@ static void checkRunning(int exitFlag, int daemonMode) fl.l_len = 0; fl.l_type = F_WRLCK; if (fcntl(lockfd, F_GETLK, &fl) < 0) { - perror(_("!! 获取文件锁失败")); + perror("!! 获取文件锁失败"); goto error_exit; } if (exitFlag) { if (fl.l_type != F_UNLCK) { - printf(_(">> 已发送退出信号给MentoHUST进程(PID=%d).\n"), fl.l_pid); + printf(">> 已发送退出信号给MentoHUST进程(PID=%d).\n", fl.l_pid); if (kill(fl.l_pid, SIGINT) == -1) - perror(_("!! 结束进程失败")); + perror("!! 结束进程失败"); } else - printf(_("!! 没有MentoHUST正在运行!\n")); + printf("!! 没有MentoHUST正在运行!\n"); if (exitFlag == 1) exit(EXIT_SUCCESS); } else if (fl.l_type != F_UNLCK) { - printf(_("!! MentoHUST已经运行(PID=%d)!\n"), fl.l_pid); + printf("!! MentoHUST已经运行(PID=%d)!\n", fl.l_pid); exit(EXIT_FAILURE); } if (daemonMode) { /* 貌似我过早进入后台模式了,就给个选项保留输出或者输出到文件吧 */ - printf(_(">> 进入后台运行模式,使用参数-k可退出认证。\n")); + printf(">> 进入后台运行模式,使用参数-k可退出认证。\n"); if (daemon(0, (daemonMode+1)%2)) - perror(_("!! 后台运行失败")); + perror("!! 后台运行失败"); else if (daemonMode == 3) { freopen(LOG_FILE, "w", stdout); - setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ); freopen(LOG_FILE, "a", stderr); } } fl.l_type = F_WRLCK; fl.l_pid = getpid(); if (fcntl(lockfd, F_SETLKW, &fl) < 0) { - perror(_("!! 加锁失败")); + perror("!! 加锁失败"); goto error_exit; } return; error_exit: #ifndef NO_NOTIFY - if (showNotify && show_notify(_("MentoHUST - 错误提示"), - _("操作锁文件失败,请检查是否为root权限!"), 1000*showNotify) < 0) - showNotify = 0; + if (showNotify) + show_notify("MentoHUST - 错误提示", "操作锁文件失败,请检查是否为root权限!"); #endif exit(EXIT_FAILURE); } diff --git a/src/myfunc.c b/src/myfunc.c index d19b78d..d0950d1 100644 --- a/src/myfunc.c +++ b/src/myfunc.c @@ -6,14 +6,7 @@ * 摘 要:认证相关算法及方法 * 作 者:HustMoon@BYHH */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#else -#define HAVE_ICONV_H -#endif - #include "myfunc.h" -#include "i18n.h" #include "md5.h" #include "mycheck.h" #include @@ -31,14 +24,12 @@ #endif #include -#ifdef HAVE_ICONV_H -#include -#endif - const u_char STANDARD_ADDR[] = {0x01,0x80,0xC2,0x00,0x00,0x03}; const u_char RUIJIE_ADDR[] = {0x01,0xD0,0xF8,0x00,0x00,0x03}; static const char *DATAFILE = "/etc/mentohust/"; /* 默认数据文件(目录) */ +/* Frame (527 bytes) */ + static int dataOffset; /* 抓包偏移 */ static u_int32_t echoKey = 0, echoNo = 0; /* Echo阶段所需 */ u_char *fillBuf = NULL; /* 填充包地址 */ @@ -66,33 +57,8 @@ static int setProperty(u_char type, const u_char *value, int length); /* 设置 static int readPacket(int type); /* 读取数据 */ static int Check(const u_char *md5Seed); /* 校验算法 */ -char *gbk2utf(char *src, size_t srclen) { -#ifdef HAVE_ICONV_H - /* GBK一汉字俩字节,UTF-8一汉字3字节,二者ASCII字符均一字节 - 所以这样申请是足够的了,要记得释放 */ - size_t dstlen = srclen * 3 / 2 + 1; - size_t left = dstlen; - char *dst, *pdst; - int res; - iconv_t cd = iconv_open("utf-8", "gbk"); - if (cd == (iconv_t)-1) - return NULL; - dst = (char *)malloc(dstlen); - pdst = dst; - res = iconv(cd, &src, &srclen, &pdst, &left); - iconv_close(cd); - if (res == -1) { - free(dst); - return NULL; - } - dst[dstlen-left] = '\0'; -#else - char *dst = (char *)malloc(srclen+1); - memcpy(dst, src, srclen); - dst[srclen] = '\0'; -#endif - return dst; -} + + char *formatIP(u_int32_t ip) { @@ -137,20 +103,10 @@ static int checkFile() { fileError: if (dataFile[strlen(dataFile)-1] != '/') - printf(_("!! 所选文件%s无效,改用内置数据认证。\n"), dataFile); + printf("!! 所选文件%s无效,改用内置数据认证。\n", dataFile); return -1; } -void printSuConfig(const char *SuConfig) { - char dbuf[2048], *text; - if (decodeConfig(SuConfig, (BYTE *)dbuf, sizeof(dbuf))) { - printf(_("!! 指定的SuConfig.dat文件无效。\n")); - } else if ((text=gbk2utf(dbuf, strlen(dbuf))) != NULL) { - printf("%s\n", text); - free(text); - } -} - static int getVersion() { char file[0x100], *p; DWORD ver; @@ -174,7 +130,7 @@ void newBuffer() getVersion(); if (checkFile() == 0) bufType += 2; - else fillSize = (bufType==0 ? 0x80 : 0x1d7); + else fillSize = 0x1fd;//fillSize = (bufType==0 ? 0x80 : 0x1d7); fillBuf = (u_char *)malloc(fillSize); } @@ -188,7 +144,7 @@ static int getAddress() int sock = socket(AF_INET, SOCK_DGRAM, 0); if (sock < 0) { - printf(_("!! 创建套接字失败!\n")); + printf("!! 创建套接字失败!\n"); return -1; } strcpy(ifr.ifr_name, nic); @@ -223,7 +179,7 @@ static int getAddress() #ifndef NO_ARP gateMAC[0] = 0xFE; if (ioctl(sock, SIOCGIFADDR, &ifr) < 0) - printf(_("!! 在网卡%s上获取IP失败!\n"), nic); + printf("!! 在网卡%s上获取IP失败!\n", nic); else { rip = ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr; if (gateway!=0 && (startMode%3!=2 || ((u_char *)&gateway)[3]!=0x02)) @@ -234,7 +190,7 @@ static int getAddress() #else if (dhcpMode!=0 || ip==-1) { if (ioctl(sock, SIOCGIFADDR, &ifr) < 0) - printf(_("!! 在网卡%s上获取IP失败!\n"), nic); + printf("!! 在网卡%s上获取IP失败!\n", nic); else ip = ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr; } @@ -242,20 +198,20 @@ static int getAddress() if (dhcpMode!=0 || mask==-1) { if (ioctl(sock, SIOCGIFNETMASK, &ifr) < 0) - printf(_("!! 在网卡%s上获取子网掩码失败!\n"), nic); + printf("!! 在网卡%s上获取子网掩码失败!\n", nic); else mask = ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr; } close(sock); - printf(_("** 本机MAC:\t%s\n"), formatHex(localMAC, 6)); - printf(_("** 使用IP:\t%s\n"), formatIP(ip)); - printf(_("** 子网掩码:\t%s\n"), formatIP(mask)); + printf("** 本机MAC:\t%s\n", formatHex(localMAC, 6)); + printf("** 使用IP:\t%s\n", formatIP(ip)); + printf("** 子网掩码:\t%s\n", formatIP(mask)); return 0; getMACError: close(sock); - printf(_("!! 在网卡%s上获取MAC失败!\n"), nic); + printf("!! 在网卡%s上获取MAC失败!\n", nic); return -1; } @@ -378,11 +334,11 @@ static int readPacket(int type) return 0; fileError: - printf(_("!! 所选文件%s无效,改用内置数据认证。\n"), dataFile); + printf("!! 所选文件%s无效,改用内置数据认证。\n", dataFile); bufType -= 2; - if (bufType==1 && fillSize<0x1d7) { + if (bufType==1 && fillSize<0x1f7) { free(fillBuf); - fillSize = 0x1d7; + fillSize = 0x1f7; fillBuf = (u_char *)malloc(fillSize); } return -1; @@ -436,7 +392,10 @@ void fillStartPacket() memcpy(fillBuf+0x17, packet1, sizeof(packet1)); memcpy(fillBuf+0x3b, version, 2); } else - memcpy(fillBuf+0x17, packet0, sizeof(packet0)); + { + // memcpy(fillBuf, pkt1, sizeof(pkt1)); + memcpy(fillBuf+0x17, packet0, sizeof(packet0)); + } setProperty(0x18, dhcp, 1); setProperty(0x2D, localMAC, 6); } @@ -464,15 +423,15 @@ static int Check(const u_char *md5Seed) /* 客户端校验 */ { char final_str[129]; int value; - printf(_("** 客户端版本:\t%d.%d\n"), fillBuf[0x3B], fillBuf[0x3C]); - printf(_("** MD5种子:\t%s\n"), formatHex(md5Seed, 16)); + printf("** 客户端版本:\t%d.%d\n", fillBuf[0x3B], fillBuf[0x3C]); + printf("** MD5种子:\t%s\n", formatHex(md5Seed, 16)); value = check_init(dataFile); if (value == -1) { - printf(_("!! 缺少8021x.exe信息,客户端校验无法继续!\n")); + printf("!! 缺少8021x.exe信息,客户端校验无法继续!\n"); return 1; } V2_check(md5Seed, final_str); - printf(_("** V2校验值:\t%s\n"), final_str); + printf("** V2校验值:\t%s\n", final_str); setProperty(0x17, (u_char *)final_str, 32); check_free(); return 0; @@ -494,10 +453,11 @@ void fillEchoPacket(u_char *echoBuf) void getEchoKey(const u_char *capBuf) { int i, offset = 0x1c+capBuf[0x1b]+0x69+24; /* 通过比较了大量抓包,通用的提取点就是这样的 */ - u_char *base = (u_char *)(&echoKey); + u_char *base; + echoKey = ntohl(*(u_int32_t *)(capBuf+offset)); + base = (u_char *)(&echoKey); for (i=0; i<4; i++) - base[i] = encode(capBuf[offset+i]); - echoKey = ntohl(echoKey); + base[i] = encode(base[i]); } u_char *checkPass(u_char id, const u_char *md5Seed, int seedLen) @@ -562,7 +522,7 @@ int isOnline() return -1; pingError: - perror(_("!! Ping主机出错,关闭该功能")); + perror("!! Ping主机出错,关闭该功能"); if (sock != -1) close(sock); pingHost = 0; diff --git a/src/myfunc.h b/src/myfunc.h index 7f70835..9b7d68c 100644 --- a/src/myfunc.h +++ b/src/myfunc.h @@ -10,10 +10,8 @@ #include -char *gbk2utf(char *src, size_t srclen); /* GBK转UTF-8 */ char *formatIP(u_int32_t ip); /* 格式化IP */ char *formatHex(const void *buf, int length); /* 格式化成十六进制形式 */ -void printSuConfig(const char *SuConfig); /* 显示锐捷配置文件 */ void newBuffer(); /* 检测数据文件有效性并分配内存 */ int fillHeader(); /* 填充网络地址及校验值部分 */ void fillStartPacket(); /* 填充Start包 */ diff --git a/src/myini.c b/src/myini.c index 1cc55c0..c4103ef 100644 --- a/src/myini.c +++ b/src/myini.c @@ -22,23 +22,25 @@ static int findKey(const char *buf, const char *section, const char *key, int *sectionStart, int *valueStart, unsigned long *valueSize); static int getSection(const char *buf, int inStart); -long loadFile(char **buf, const char *fileName) +char *loadFile(const char *fileName) { FILE *fp = NULL; long size = 0; + char *buf = NULL; if ((fp=fopen(fileName, "rb")) == NULL) - return -1; + return NULL; fseek(fp, 0, SEEK_END); size = ftell(fp); rewind(fp); - *buf = (char *)malloc(size+1); - (*buf)[size] = '\0'; - if (fread(*buf, size, 1, fp) < 1) { - free(*buf); - size = -1; + buf = (char *)malloc(size+1); + buf[size] = '\0'; + if (fread(buf, size, 1, fp) < 1) + { + free(buf); + buf = NULL; } fclose(fp); - return size; + return buf; } static void getLine(const char *buf, int inStart, int *lineStart, int *lineEnd) diff --git a/src/myini.h b/src/myini.h index b2caadf..7f65710 100644 --- a/src/myini.h +++ b/src/myini.h @@ -17,7 +17,7 @@ extern "C" { #endif -long loadFile(char **buf, const char *fileName); /* 读取文件 */ +char *loadFile(const char *fileName); /* 读取文件 */ int getString(const char *buf, const char *section, const char *key, const char *defaultValue, char *value, unsigned long size); /* 读取字符串 */ int getInt(const char *buf, const char *section, const char *key, int defaultValue); /* 读取整数 */ diff --git a/src/mystate.c b/src/mystate.c index 789490e..c97ec91 100644 --- a/src/mystate.c +++ b/src/mystate.c @@ -8,9 +8,9 @@ * 邮 箱:www.ehust@gmail.com */ #include "mystate.h" -#include "i18n.h" #include "myfunc.h" #include "dlfunc.h" +#include "checkV4.h" #include #include #include @@ -41,6 +41,210 @@ extern u_char gateMAC[]; static void sendArpPacket(); /* ARP监视 */ #endif +static const char pad[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + +static const unsigned char pkt1[503] = { +/*0x00, 0x00, */0xff, 0xff, 0x37, 0x77, 0x7f, 0xff, /* ....7w.. */ +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* ........ */ +0xff, 0xff, 0xff, 0xac, 0xb1, 0xff, 0xb0, 0xb0, /* ........ */ +0x2d, 0x00, 0x00, 0x13, 0x11, 0x38, 0x30, 0x32, /* -....802 */ +0x31, 0x78, 0x2e, 0x65, 0x78, 0x65, 0x00, 0x00, /* 1x.exe.. */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, /* ........ */ +0x02, 0x00, 0x00, 0x00, 0x13, 0x11, 0x01, 0xb1, /* ........ */ +0x1a, 0x0c, 0x00, 0x00, 0x13, 0x11, 0x18, 0x06, /* ........ */ +0x00, 0x00, 0x00, 0x01, 0x1a, 0x0e, 0x00, 0x00, /* ........ */ +0x13, 0x11, 0x2d, 0x08, 0x08, 0x9e, 0x01, 0x64, /* ..-....d */ +0xe3, 0x15, 0x1a, 0x08, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x2f, 0x02, 0x1a, 0x0f, 0x00, 0x00, 0x13, 0x11, /* /....... */ +0x76, 0x09, 0x38, 0x2e, 0x38, 0x2e, 0x38, 0x2e, /* v.8.8.8. */ +0x38, 0x1a, 0x09, 0x00, 0x00, 0x13, 0x11, 0x35, /* 8......5 */ +0x03, 0x01, 0x1a, 0x18, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x36, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 6....... */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x1a, 0x18, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x38, 0x12, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, /* 8....... */ +0x00, 0x00, 0x0a, 0x9e, 0x01, 0xff, 0xfe, 0x64, /* .......d */ +0xe3, 0x15, 0x1a, 0x18, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x4e, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* N....... */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x1a, 0x88, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x4d, 0x82, 0x62, 0x34, 0x36, 0x34, 0x38, 0x39, /* M.b46489 */ +0x36, 0x64, 0x38, 0x31, 0x33, 0x35, 0x65, 0x65, /* 6d8135ee */ +0x31, 0x64, 0x61, 0x37, 0x64, 0x64, 0x32, 0x39, /* 1da7dd29 */ +0x32, 0x36, 0x62, 0x63, 0x62, 0x62, 0x36, 0x35, /* 26bcbb65 */ +0x61, 0x65, 0x34, 0x65, 0x62, 0x37, 0x37, 0x64, /* ae4eb77d */ +0x66, 0x36, 0x38, 0x31, 0x30, 0x31, 0x32, 0x61, /* f681012a */ +0x38, 0x65, 0x35, 0x32, 0x63, 0x65, 0x38, 0x62, /* 8e52ce8b */ +0x66, 0x35, 0x36, 0x36, 0x31, 0x32, 0x35, 0x31, /* f5661251 */ +0x39, 0x34, 0x65, 0x64, 0x31, 0x39, 0x37, 0x62, /* 94ed197b */ +0x63, 0x66, 0x64, 0x61, 0x38, 0x66, 0x37, 0x32, /* cfda8f72 */ +0x39, 0x66, 0x35, 0x38, 0x32, 0x61, 0x31, 0x64, /* 9f582a1d */ +0x33, 0x33, 0x30, 0x64, 0x35, 0x66, 0x30, 0x33, /* 330d5f03 */ +0x62, 0x61, 0x34, 0x38, 0x32, 0x34, 0x35, 0x61, /* ba48245a */ +0x38, 0x33, 0x32, 0x35, 0x66, 0x31, 0x32, 0x31, /* 8325f121 */ +0x35, 0x65, 0x62, 0x62, 0x65, 0x34, 0x63, 0x66, /* 5ebbe4cf */ +0x39, 0x63, 0x31, 0x63, 0x61, 0x32, 0x35, 0x62, /* 9c1ca25b */ +0x30, 0x62, 0x1a, 0x28, 0x00, 0x00, 0x13, 0x11, /* 0b.(.... */ +0x39, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, /* 9"intern */ +0x65, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* et...... */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x1a, 0x48, 0x00, 0x00, 0x13, 0x11, /* ...H.... */ +0x54, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* TB...... */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x1a, 0x08, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x55, 0x02, 0x1a, 0x09, 0x00, 0x00, 0x13, 0x11, /* U....... */ +0x62, 0x03, 0x00, 0x1a, 0x09, 0x00, 0x00, 0x13, /* b....... */ +0x11, 0x70, 0x03, 0x40, 0x1a, 0x1d, 0x00, 0x00, /* .p.@.... */ +0x13, 0x11, 0x6f, 0x17, 0x52, 0x47, 0x2d, 0x53, /* ..o.RG-S */ +0x55, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x4c, 0x69, /* U For Li */ +0x6e, 0x75, 0x78, 0x20, 0x56, 0x31, 0x2e, 0x30, /* nux V1.0 */ +0x00 /* . */ +}; + +static const unsigned char pkt2[503] = { +/*0x32, */0xff, 0xff, 0x37, 0x77, 0x7f, 0xff, 0xff, /* 2..7w... */ +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* ........ */ +0xff, 0xff, 0xac, 0xb1, 0xff, 0xb0, 0xb0, 0x2d, /* .......- */ +0x00, 0x00, 0x13, 0x11, 0x38, 0x30, 0x32, 0x31, /* ....8021 */ +0x78, 0x2e, 0x65, 0x78, 0x65, 0x00, 0x00, 0x00, /* x.exe... */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, /* ........ */ +0x00, 0x00, 0x00, 0x13, 0x11, 0x01, 0xb1, 0x1a, /* ........ */ +0x0c, 0x00, 0x00, 0x13, 0x11, 0x18, 0x06, 0x00, /* ........ */ +0x00, 0x00, 0x01, 0x1a, 0x0e, 0x00, 0x00, 0x13, /* ........ */ +0x11, 0x2d, 0x08, 0x08, 0x9e, 0x01, 0x64, 0xe3, /* .-....d. */ +0x15, 0x1a, 0x08, 0x00, 0x00, 0x13, 0x11, 0x2f, /* ......./ */ +0x02, 0x1a, 0x0f, 0x00, 0x00, 0x13, 0x11, 0x76, /* .......v */ +0x09, 0x38, 0x2e, 0x38, 0x2e, 0x38, 0x2e, 0x38, /* .8.8.8.8 */ +0x1a, 0x09, 0x00, 0x00, 0x13, 0x11, 0x35, 0x03, /* ......5. */ +0x01, 0x1a, 0x18, 0x00, 0x00, 0x13, 0x11, 0x36, /* .......6 */ +0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x1a, 0x18, 0x00, 0x00, 0x13, 0x11, 0x38, /* .......8 */ +0x12, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x0a, 0x9e, 0x01, 0xff, 0xfe, 0x64, 0xe3, /* ......d. */ +0x15, 0x1a, 0x18, 0x00, 0x00, 0x13, 0x11, 0x4e, /* .......N */ +0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x1a, 0x88, 0x00, 0x00, 0x13, 0x11, 0x4d, /* .......M */ +0x82, 0x62, 0x34, 0x36, 0x34, 0x38, 0x39, 0x36, /* .b464896 */ +0x64, 0x38, 0x31, 0x33, 0x35, 0x65, 0x65, 0x31, /* d8135ee1 */ +0x64, 0x61, 0x37, 0x64, 0x64, 0x32, 0x39, 0x32, /* da7dd292 */ +0x36, 0x62, 0x63, 0x62, 0x62, 0x36, 0x35, 0x61, /* 6bcbb65a */ +0x65, 0x34, 0x65, 0x62, 0x37, 0x37, 0x64, 0x66, /* e4eb77df */ +0x36, 0x38, 0x31, 0x30, 0x31, 0x32, 0x61, 0x38, /* 681012a8 */ +0x65, 0x35, 0x32, 0x63, 0x65, 0x38, 0x62, 0x66, /* e52ce8bf */ +0x35, 0x36, 0x36, 0x31, 0x32, 0x35, 0x31, 0x39, /* 56612519 */ +0x34, 0x65, 0x64, 0x31, 0x39, 0x37, 0x62, 0x63, /* 4ed197bc */ +0x66, 0x64, 0x61, 0x38, 0x66, 0x37, 0x32, 0x39, /* fda8f729 */ +0x66, 0x35, 0x38, 0x32, 0x61, 0x31, 0x64, 0x33, /* f582a1d3 */ +0x33, 0x30, 0x64, 0x35, 0x66, 0x30, 0x33, 0x62, /* 30d5f03b */ +0x61, 0x34, 0x38, 0x32, 0x34, 0x35, 0x61, 0x38, /* a48245a8 */ +0x33, 0x32, 0x35, 0x66, 0x31, 0x32, 0x31, 0x35, /* 325f1215 */ +0x65, 0x62, 0x62, 0x65, 0x34, 0x63, 0x66, 0x39, /* ebbe4cf9 */ +0x63, 0x31, 0x63, 0x61, 0x32, 0x35, 0x62, 0x30, /* c1ca25b0 */ +0x62, 0x1a, 0x28, 0x00, 0x00, 0x13, 0x11, 0x39, /* b.(....9 */ +0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, /* "interne */ +0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* t....... */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x1a, 0x48, 0x00, 0x00, 0x13, 0x11, 0x54, /* ..H....T */ +0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* B....... */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x1a, 0x08, 0x00, 0x00, 0x13, 0x11, 0x55, /* .......U */ +0x02, 0x1a, 0x09, 0x00, 0x00, 0x13, 0x11, 0x62, /* .......b */ +0x03, 0x00, 0x1a, 0x09, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x70, 0x03, 0x40, 0x1a, 0x1d, 0x00, 0x00, 0x13, /* p.@..... */ +0x11, 0x6f, 0x17, 0x52, 0x47, 0x2d, 0x53, 0x55, /* .o.RG-SU */ +0x20, 0x46, 0x6f, 0x72, 0x20, 0x4c, 0x69, 0x6e, /* For Lin */ +0x75, 0x78, 0x20, 0x56, 0x31, 0x2e, 0x30, 0x00 /* ux V1.0. */ +}; + +static const unsigned char pkt3[519] = { +/*0x32, 0x32, */0xff, 0xff, 0x37, 0x77, 0x7f, 0xff, /* 22..7w.. */ +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* ........ */ +0xff, 0xff, 0xff, 0xac, 0xb1, 0xff, 0xb0, 0xb0, /* ........ */ +0x2d, 0x00, 0x00, 0x13, 0x11, 0x38, 0x30, 0x32, /* -....802 */ +0x31, 0x78, 0x2e, 0x65, 0x78, 0x65, 0x00, 0x00, /* 1x.exe.. */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, /* ........ */ +0x02, 0x00, 0x00, 0x00, 0x13, 0x11, 0x01, 0xc1, /* ........ */ +0x1a, 0x0c, 0x00, 0x00, 0x13, 0x11, 0x18, 0x06, /* ........ */ +0x00, 0x00, 0x00, 0x01, 0x1a, 0x0e, 0x00, 0x00, /* ........ */ +0x13, 0x11, 0x2d, 0x08, 0x08, 0x9e, 0x01, 0x64, /* ..-....d */ +0xe3, 0x15, 0x1a, 0x18, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x2f, 0x12, 0x08, 0xc8, 0x6f, 0xb1, 0xdb, 0xb7, /* /...o... */ +0x83, 0x4b, 0x52, 0x1d, 0xb2, 0x71, 0x55, 0xec, /* .KR..qU. */ +0xd6, 0xb2, 0x1a, 0x0f, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x76, 0x09, 0x38, 0x2e, 0x38, 0x2e, 0x38, 0x2e, /* v.8.8.8. */ +0x38, 0x1a, 0x09, 0x00, 0x00, 0x13, 0x11, 0x35, /* 8......5 */ +0x03, 0x01, 0x1a, 0x18, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x36, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 6....... */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x1a, 0x18, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x38, 0x12, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, /* 8....... */ +0x00, 0x00, 0x0a, 0x9e, 0x01, 0xff, 0xfe, 0x64, /* .......d */ +0xe3, 0x15, 0x1a, 0x18, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x4e, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* N....... */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x1a, 0x88, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x4d, 0x82, 0x39, 0x36, 0x64, 0x30, 0x37, 0x62, /* M.96d07b */ +0x35, 0x63, 0x64, 0x35, 0x38, 0x34, 0x62, 0x36, /* 5cd584b6 */ +0x62, 0x62, 0x65, 0x64, 0x32, 0x35, 0x65, 0x64, /* bbed25ed */ +0x39, 0x38, 0x38, 0x64, 0x34, 0x32, 0x66, 0x66, /* 988d42ff */ +0x30, 0x65, 0x37, 0x39, 0x39, 0x63, 0x33, 0x39, /* 0e799c39 */ +0x63, 0x38, 0x64, 0x37, 0x32, 0x31, 0x36, 0x61, /* c8d7216a */ +0x38, 0x65, 0x35, 0x66, 0x61, 0x32, 0x66, 0x61, /* 8e5fa2fa */ +0x64, 0x37, 0x66, 0x38, 0x64, 0x33, 0x35, 0x37, /* d7f8d357 */ +0x61, 0x31, 0x38, 0x62, 0x33, 0x66, 0x66, 0x65, /* a18b3ffe */ +0x65, 0x30, 0x64, 0x31, 0x38, 0x34, 0x65, 0x30, /* e0d184e0 */ +0x32, 0x65, 0x32, 0x39, 0x31, 0x32, 0x38, 0x64, /* 2e29128d */ +0x33, 0x30, 0x63, 0x61, 0x64, 0x33, 0x65, 0x36, /* 30cad3e6 */ +0x36, 0x31, 0x38, 0x37, 0x36, 0x32, 0x33, 0x63, /* 6187623c */ +0x31, 0x37, 0x31, 0x35, 0x31, 0x63, 0x61, 0x39, /* 17151ca9 */ +0x36, 0x65, 0x35, 0x61, 0x32, 0x34, 0x32, 0x31, /* 6e5a2421 */ +0x65, 0x39, 0x35, 0x35, 0x37, 0x61, 0x37, 0x38, /* e9557a78 */ +0x35, 0x35, 0x1a, 0x28, 0x00, 0x00, 0x13, 0x11, /* 55.(.... */ +0x39, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, /* 9"intern */ +0x65, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* et...... */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x1a, 0x48, 0x00, 0x00, 0x13, 0x11, /* ...H.... */ +0x54, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* TB...... */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ +0x00, 0x00, 0x1a, 0x08, 0x00, 0x00, 0x13, 0x11, /* ........ */ +0x55, 0x02, 0x1a, 0x09, 0x00, 0x00, 0x13, 0x11, /* U....... */ +0x62, 0x03, 0x00, 0x1a, 0x09, 0x00, 0x00, 0x13, /* b....... */ +0x11, 0x70, 0x03, 0x40, 0x1a, 0x1d, 0x00, 0x00, /* .p.@.... */ +0x13, 0x11, 0x6f, 0x17, 0x52, 0x47, 0x2d, 0x53, /* ..o.RG-S */ +0x55, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x4c, 0x69, /* U For Li */ +0x6e, 0x75, 0x78, 0x20, 0x56, 0x31, 0x2e, 0x30, /* nux V1.0 */ +0x00 /* . */ +}; + static void setTimer(unsigned interval); /* 设置定时器 */ static int renewIP(); /* 更新IP */ static void fillEtherAddr(u_int32_t protocol); /* 填充MAC地址和协议 */ @@ -75,16 +279,16 @@ int switchState(int type) switch (type) { case ID_START: - printf(_(">> 找不到服务器,重启认证!\n")); + printf(">> 找不到服务器,重启认证!\n"); break; case ID_IDENTITY: - printf(_(">> 发送用户名超时,重启认证!\n")); + printf(">> 发送用户名超时,重启认证!\n"); break; case ID_CHALLENGE: - printf(_(">> 发送密码超时,重启认证!\n")); + printf(">> 发送密码超时,重启认证!\n"); break; case ID_WAITECHO: - printf(_(">> 等候响应包超时,自行响应!\n")); + printf(">> 等候响应包超时,自行响应!\n"); return switchState(ID_ECHO); } return restart(); @@ -104,7 +308,7 @@ int switchState(int type) case ID_ECHO: if (pingHost && sendCount*echoInterval > 60) { /* 1分钟左右 */ if (isOnline() == -1) { - printf(_(">> 认证掉线,开始重连!\n")); + printf(">> 认证掉线,开始重连!\n"); return switchState(ID_START); } sendCount = 1; @@ -133,9 +337,9 @@ int restart() static int renewIP() { setTimer(0); /* 取消定时器 */ - printf(_(">> 正在获取IP...\n")); + printf(">> 正在获取IP...\n"); system(dhcpScript); - printf(_(">> 操作结束。\n")); + printf(">> 操作结束。\n"); dhcpMode += 3; /* 标记为已获取,123变为456,5不需再认证*/ if (fillHeader() == -1) exit(EXIT_FAILURE); @@ -158,7 +362,7 @@ static int sendStartPacket() { if (sendCount == 0) { - printf(_(">> 寻找服务器...\n")); + printf(">> 寻找服务器...\n"); memcpy(sendPacket, STANDARD_ADDR, 6); memcpy(sendPacket+0x06, localMAC, 6); *(u_int32_t *)(sendPacket+0x0C) = htonl(0x888E0101); @@ -170,13 +374,14 @@ static int sendStartPacket() } if (sendCount == 0) { - printf(_(">> 寻找服务器...\n")); - fillStartPacket(); + printf(">> 寻找服务器...\n"); + //fillStartPacket(); fillEtherAddr(0x888E0101); - memcpy(sendPacket+0x12, fillBuf, fillSize); + memcpy(sendPacket + 0x12, pkt1, sizeof(pkt1)); + memcpy(sendPacket + 0xe2, computeV4(pad, 16), 0x80); setTimer(timeout); } - return pcap_sendpacket(hPcap, sendPacket, 0x3E8); + return pcap_sendpacket(hPcap, sendPacket, 521); } static int sendIdentityPacket() @@ -186,7 +391,7 @@ static int sendIdentityPacket() { if (sendCount == 0) { - printf(_(">> 发送用户名...\n")); + printf(">> 发送用户名...\n"); *(u_int16_t *)(sendPacket+0x0E) = htons(0x0100); *(u_int16_t *)(sendPacket+0x10) = *(u_int16_t *)(sendPacket+0x14) = htons(nameLen+30); sendPacket[0x12] = 0x02; @@ -202,7 +407,7 @@ static int sendIdentityPacket() } if (sendCount == 0) { - printf(_(">> 发送用户名...\n")); + printf(">> 发送用户名...\n"); fillEtherAddr(0x888E0100); nameLen = strlen(userName); *(u_int16_t *)(sendPacket+0x14) = *(u_int16_t *)(sendPacket+0x10) = htons(nameLen+5); @@ -210,10 +415,11 @@ static int sendIdentityPacket() sendPacket[0x13] = capBuf[0x13]; sendPacket[0x16] = 0x01; memcpy(sendPacket+0x17, userName, nameLen); - memcpy(sendPacket+0x17+nameLen, fillBuf, fillSize); + memcpy(sendPacket+0x17+nameLen, pkt2, sizeof(pkt2)); + memcpy(sendPacket + 0xe7 + nameLen, computeV4(pad, 16), 0x80); setTimer(timeout); } - return pcap_sendpacket(hPcap, sendPacket, 0x3E8); + return pcap_sendpacket(hPcap, sendPacket, 536); } static int sendChallengePacket() @@ -223,7 +429,7 @@ static int sendChallengePacket() { if (sendCount == 0) { - printf(_(">> 发送密码...\n")); + printf(">> 发送密码...\n"); *(u_int16_t *)(sendPacket+0x0E) = htons(0x0100); *(u_int16_t *)(sendPacket+0x10) = *(u_int16_t *)(sendPacket+0x14) = htons(nameLen+22); sendPacket[0x12] = 0x02; @@ -238,8 +444,8 @@ static int sendChallengePacket() } if (sendCount == 0) { - printf(_(">> 发送密码...\n")); - fillMd5Packet(capBuf+0x18); + printf(">> 发送密码...\n"); + //fillMd5Packet(capBuf+0x18); fillEtherAddr(0x888E0100); *(u_int16_t *)(sendPacket+0x14) = *(u_int16_t *)(sendPacket+0x10) = htons(nameLen+22); sendPacket[0x12] = 0x02; @@ -248,10 +454,15 @@ static int sendChallengePacket() sendPacket[0x17] = 16; memcpy(sendPacket+0x18, checkPass(capBuf[0x13], capBuf+0x18, capBuf[0x17]), 16); memcpy(sendPacket+0x28, userName, nameLen); - memcpy(sendPacket+0x28+nameLen, fillBuf, fillSize); + + memcpy(sendPacket+0x28+nameLen, pkt3, sizeof(pkt3)); + memcpy(sendPacket + 0x90 + nameLen, computePwd(capBuf+0x18), 0x10); + //memcpy(sendPacket + 0xa0 +nameLen, fillBuf + 0x68, fillSize-0x68); + memcpy(sendPacket + 0x108 + nameLen, computeV4(capBuf+0x18, capBuf[0x17]), 0x80); + //sendPacket[0x77] = 0xc7; setTimer(timeout); } - return pcap_sendpacket(hPcap, sendPacket, 0x3E8); + return pcap_sendpacket(hPcap, sendPacket, 569); } static int sendEchoPacket() @@ -271,7 +482,7 @@ static int sendEchoPacket() 0x00,0x1E,0xFF,0xFF,0x37,0x77,0x7F,0x9F,0xFF,0xFF,0xD9,0x13,0xFF,0xFF,0x37,0x77, 0x7F,0x9F,0xFF,0xFF,0xF7,0x2B,0xFF,0xFF,0x37,0x77,0x7F,0x3F,0xFF }; - printf(_(">> 发送心跳包以保持在线...\n")); + printf(">> 发送心跳包以保持在线...\n"); fillEtherAddr(0x888E01BF); memcpy(sendPacket+0x10, echo, sizeof(echo)); setTimer(echoInterval); diff --git a/src/rjmd5.c b/src/rjmd5.c new file mode 100644 index 0000000..b24655c --- /dev/null +++ b/src/rjmd5.c @@ -0,0 +1,161 @@ + #include + #include "rjmd5.h" + + unsigned char PADDING[]={0x80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + + void rjMD5Init(rjMD5_CTX *context) + { + context->count[0] = 0; + context->count[1] = 0; + context->state[0] = 0x50137246; + context->state[1] = 0x8acf9dbe; + context->state[2] = 0xc9efaced; + context->state[3] = 0x25647013L; + } + void rjMD5Update(rjMD5_CTX *context,unsigned const char *input,unsigned int inputlen) + { + unsigned int i = 0,index = 0,partlen = 0; + index = (context->count[0] >> 3) & 0x3F; + partlen = 64 - index; + context->count[0] += inputlen << 3; + if(context->count[0] < (inputlen << 3)) + context->count[1]++; + context->count[1] += inputlen >> 29; + + if(inputlen >= partlen) + { + memcpy(&context->buffer[index],input,partlen); + MD5Transform(context->state,context->buffer); + for(i = partlen;i+64 <= inputlen;i+=64) + MD5Transform(context->state,&input[i]); + index = 0; + } + else + { + i = 0; + } + memcpy(&context->buffer[index],&input[i],inputlen-i); + } + void rjMD5Final(rjMD5_CTX *context,unsigned char digest[16]) + { + unsigned int index = 0,padlen = 0; + unsigned char bits[8]; + index = (context->count[0] >> 3) & 0x3F; + padlen = (index < 56)?(56-index):(120-index); + MD5Encode(bits,context->count,8); + rjMD5Update(context,PADDING,padlen); + rjMD5Update(context,bits,8); + MD5Encode(digest,context->state,16); + } + void MD5Encode(unsigned char *output,unsigned int *input,unsigned int len) + { + unsigned int i = 0,j = 0; + while(j < len) + { + output[j] = input[i] & 0xFF; + output[j+1] = (input[i] >> 8) & 0xFF; + output[j+2] = (input[i] >> 16) & 0xFF; + output[j+3] = (input[i] >> 24) & 0xFF; + i++; + j+=4; + } + } + void MD5Decode(unsigned int *output,unsigned const char *input,unsigned int len) + { + unsigned int i = 0,j = 0; + while(j < len) + { + output[i] = (input[j]) | + (input[j+1] << 8) | + (input[j+2] << 16) | + (input[j+3] << 24); + i++; + j+=4; + } + } + void MD5Transform(unsigned int state[4],unsigned const char block[64]) + { + unsigned int a = state[0]; + unsigned int b = state[1]; + unsigned int c = state[2]; + unsigned int d = state[3]; + unsigned int x[64]; + MD5Decode(x,block,64); + FF(a, b, c, d, x[ 0], 7, 0xd76aa478); /* 1 */ + FF(d, a, b, c, x[ 1], 12, 0xe8c7b756); /* 2 */ + FF(c, d, a, b, x[ 2], 17, 0x242070db); /* 3 */ + FF(b, c, d, a, x[ 3], 22, 0xc1bdceee); /* 4 */ + FF(a, b, c, d, x[ 4], 7, 0xf57c0faf); /* 5 */ + FF(d, a, b, c, x[ 5], 12, 0x4787c62a); /* 6 */ + FF(c, d, a, b, x[ 6], 17, 0xa8304613); /* 7 */ + FF(b, c, d, a, x[ 7], 22, 0xfd469501); /* 8 */ + FF(a, b, c, d, x[ 8], 7, 0x698098d8); /* 9 */ + FF(d, a, b, c, x[ 9], 12, 0x8b44f7af); /* 10 */ + FF(c, d, a, b, x[10], 17, 0xffff5bb1); /* 11 */ + FF(b, c, d, a, x[11], 22, 0x895cd7be); /* 12 */ + FF(a, b, c, d, x[12], 7, 0x6b901122); /* 13 */ + FF(d, a, b, c, x[13], 12, 0xfd987163); /* 14 */ + FF(c, d, a, b, x[14], 17, 0xa679438e); /* 15 */ + FF(b, c, d, a, x[15], 22, 0x49b40821); /* 16 */ + + /* Round 2 */ + GG(a, b, c, d, x[ 1], 5, 0xf61e2562); /* 17 */ + GG(d, a, b, c, x[ 6], 9, 0xc040b340); /* 18 */ + GG(c, d, a, b, x[11], 14, 0x265e5a51); /* 19 */ + GG(b, c, d, a, x[ 0], 20, 0xe9b6c7aa); /* 20 */ + GG(a, b, c, d, x[ 5], 5, 0xd62f105d); /* 21 */ + GG(d, a, b, c, x[10], 9, 0x02442453); /* 22 */ + GG(c, d, a, b, x[15], 14, 0xd8a1e681); /* 23 */ + GG(b, c, d, a, x[ 4], 20, 0xe7d3fbc8); /* 24 */ + GG(a, b, c, d, x[ 9], 5, 0x21e1cde6); /* 25 */ + GG(d, a, b, c, x[14], 9, 0xc33707d6); /* 26 */ + GG(c, d, a, b, x[ 3], 14, 0xf4d50d87); /* 27 */ + GG(b, c, d, a, x[ 8], 20, 0x455a14ed); /* 28 */ + GG(a, b, c, d, x[13], 5, 0xa9e3e905); /* 29 */ + GG(d, a, b, c, x[ 2], 9, 0xfcefa3f8); /* 30 */ + GG(c, d, a, b, x[ 7], 14, 0x676f02d9); /* 31 */ + GG(b, c, d, a, x[12], 20, 0x8d2a4c8a); /* 32 */ + + /* Round 3 */ + HH(a, b, c, d, x[ 5], 5, 0xfffa3492); /* 33 */ + HH(d, a, b, c, x[ 8], 11, 0x8771f681); /* 34 */ + HH(c, d, a, b, x[11], 16, 0x6d9d6122); /* 35 */ + HH(b, c, d, a, x[14], 23, 0xfde5380c); /* 36 */ + HH(a, b, c, d, x[ 1], 5, 0xa4beea44); /* 37 */ + HH(d, a, b, c, x[ 4], 11, 0x4bdecfa9); /* 38 */ + HH(c, d, a, b, x[ 7], 16, 0xf6bb4b60); /* 39 */ + HH(b, c, d, a, x[10], 23, 0xbebfbc70); /* 40 */ + HH(a, b, c, d, x[13], 5, 0x289b7ec6); /* 41 */ + HH(d, a, b, c, x[ 0], 11, 0xeaa127fa); /* 42 */ + HH(c, d, a, b, x[ 3], 16, 0xd4ef3085); /* 43 */ + HH(b, c, d, a, x[ 6], 23, block[9] + 0x4881d05); /* 44 */ + HH(a, b, c, d, x[ 9], 5, 0xd9d4d039); /* 45 */ + HH(d, a, b, c, x[12], 11, 0xe6db99e5); /* 46 */ + HH(c, d, a, b, x[15], 16, 0x1fa27cf8); /* 47 */ + HH(b, c, d, a, x[ 2], 23, 0xc4ac5665); /* 48 */ + + /* Round 4 */ + II(a, b, c, d, x[ 0], 6, 0xf4292244); /* 49 */ + II(d, a, b, c, x[ 7], 10, 0x432aff97); /* 50 */ + II(c, d, a, b, x[14], 15, 0xab9423a7); /* 51 */ + II(b, c, d, a, x[ 5], 19, 0xfc93a039); /* 52 */ + II(a, b, c, d, x[12], 6, 0x655659c3); /* 53 */ + II(d, a, b, c, x[ 3], 10, 0x8f0ccc92); /* 54 */ + II(c, d, a, b, x[10], 15, 0xffeff47d); /* 55 */ + II(b, c, d, a, x[ 1], 19, 0x85845dd1); /* 56 */ + II(a, b, c, d, x[ 8], 6, 0x6fa87e4f); /* 57 */ + II(d, a, b, c, x[15], 10, 0xfe2ce6e0); /* 58 */ + II(c, d, a, b, x[ 6], 15, 0xa3014314); /* 59 */ + II(b, c, d, a, x[13], 19, 0x4e0811a1); /* 60 */ + II(a, b, c, d, x[ 4], 6, 0xf7537e82); /* 61 */ + II(d, a, b, c, x[11], 10, 0xbd3af335); /* 62 */ + II(c, d, a, b, x[ 2], 15, 0x2ad7d2bb); /* 63 */ + II(b, c, d, a, x[ 9], 19, 0xeb866391); /* 64 */ + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + } diff --git a/src/rjmd5.h b/src/rjmd5.h new file mode 100644 index 0000000..b319286 --- /dev/null +++ b/src/rjmd5.h @@ -0,0 +1,53 @@ + #ifndef RJMD5_H + #define RJMD5_H + + typedef struct + { + unsigned int count[2]; + unsigned int state[4]; + unsigned char buffer[64]; + }rjMD5_CTX; + + + #define F(x,y,z) ((x & y) | (~x & z)) + #define G(x,y,z) ((x & z) | (y & ~z)) + #define H(x,y,z) (x^y^z) + #define I(x,y,z) (y ^ (x | ~z)) + #define ROTATE_LEFT(x,n) ((x << n) | (x >> (32-n))) + #define FF(a,b,c,d,x,s,ac) \ + { \ + a += F(b,c,d) + x + ac; \ + a = ROTATE_LEFT(a,s); \ + a += b + 2;\ + } + /*******************8 + a += b; + } + modified + ******************/ + #define GG(a,b,c,d,x,s,ac) \ + { \ + a += G(b,c,d) + x + ac; \ + a = ROTATE_LEFT(a,s); \ + a += b - 2; \ + } + #define HH(a,b,c,d,x,s,ac) \ + { \ + a += H(b,c,d) + x + ac; \ + a = ROTATE_LEFT(a,s); \ + a += b - 1; \ + } + #define II(a,b,c,d,x,s,ac) \ + { \ + a += I(b,c,d) + x + ac; \ + a = ROTATE_LEFT(a,s); \ + a += b + 1; \ + } + void rjMD5Init(rjMD5_CTX *context); + void rjMD5Update(rjMD5_CTX *context,unsigned const char *input,unsigned int inputlen); + void rjMD5Final(rjMD5_CTX *context,unsigned char digest[16]); + void MD5Transform(unsigned int state[4],unsigned const char block[64]); + void MD5Encode(unsigned char *output,unsigned int *input,unsigned int len); + void MD5Decode(unsigned int *output,unsigned const char *input,unsigned int len); + + #endif diff --git a/src/rjripemd128.c b/src/rjripemd128.c new file mode 100644 index 0000000..b19f808 --- /dev/null +++ b/src/rjripemd128.c @@ -0,0 +1,298 @@ + +/* + Copyright (C) 2009 Gabriel A. Petursson + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include +#include +#include + +#include "ampheck.h" +#include "rjripemd128.h" + +#define RIPEMD128_R1(x, y, z) ((x ^ y ^ z) + 2) +#define RIPEMD128_R2(x, y, z) (((x & y) | (~x & z)) + 0x325b99a1) +#define RIPEMD128_R3(x, y, z) (((x | ~y) ^ z) + 0x1baed69c) +#define RIPEMD128_R4(x, y, z) (((x & z) | (y & ~z)) + 0xbcdcb1f9) +#define RIPEMD128_R5(x, y, z) (((x & z) | (y & ~z)) + 0x5a82798a) +#define RIPEMD128_R6(x, y, z) (((x | ~y) ^ z) + 0x41d42d5d) +#define RIPEMD128_R7(x, y, z) (((x & y) | (~x & z)) + 0x30ed3f68) +#define RIPEMD128_R8 RIPEMD128_R1 + +#define RIPEMD128_PRC(a, b, c, d, idx, rot, rnd) { \ + wv[a] = ROL(wv[a] + RIPEMD128_R##rnd(wv[b], wv[c], wv[d]) + idx, rot); \ +} + +void ampheck_ripemd128_init(struct ampheck_ripemd128 *ctx) +{ + ctx->h[0] = 0x10257436; + ctx->h[1] = 0xa8bd9cfe; + ctx->h[2] = 0x9efcad8b; + ctx->h[3] = 0x12375460; + + ctx->length = 0; +} + +void ampheck_ripemd128_transform(struct ampheck_ripemd128 *ctx, const uint8_t *data, size_t blocks) +{ + for (size_t i = 0; i < blocks; ++i) + { + uint32_t wv[8]; + uint32_t w[16]; + + PACK_32_LE(&data[(i << 6) ], &w[ 0]); + PACK_32_LE(&data[(i << 6) + 4], &w[ 1]); + PACK_32_LE(&data[(i << 6) + 8], &w[ 2]); + PACK_32_LE(&data[(i << 6) + 12], &w[ 3]); + PACK_32_LE(&data[(i << 6) + 16], &w[ 4]); + PACK_32_LE(&data[(i << 6) + 20], &w[ 5]); + PACK_32_LE(&data[(i << 6) + 24], &w[ 6]); + PACK_32_LE(&data[(i << 6) + 28], &w[ 7]); + PACK_32_LE(&data[(i << 6) + 32], &w[ 8]); + PACK_32_LE(&data[(i << 6) + 36], &w[ 9]); + PACK_32_LE(&data[(i << 6) + 40], &w[10]); + PACK_32_LE(&data[(i << 6) + 44], &w[11]); + PACK_32_LE(&data[(i << 6) + 48], &w[12]); + PACK_32_LE(&data[(i << 6) + 52], &w[13]); + PACK_32_LE(&data[(i << 6) + 56], &w[14]); + PACK_32_LE(&data[(i << 6) + 60], &w[15]); + + wv[0] = ctx->h[0]; + wv[1] = ctx->h[1]; + wv[2] = ctx->h[2]; + wv[3] = ctx->h[3]; + memcpy(&wv[4], wv, 4 * sizeof(uint32_t)); + + RIPEMD128_PRC(0, 1, 2, 3, w[ 0], 11, 1); + RIPEMD128_PRC(3, 0, 1, 2, w[ 1], 14, 1); + RIPEMD128_PRC(2, 3, 0, 1, w[ 2], 15, 1); + RIPEMD128_PRC(1, 2, 3, 0, w[ 3], 12, 1); + RIPEMD128_PRC(0, 1, 2, 3, w[ 4], 5, 1); + RIPEMD128_PRC(3, 0, 1, 2, w[ 5], 8, 1); + RIPEMD128_PRC(2, 3, 0, 1, w[ 6], 7, 1); + RIPEMD128_PRC(1, 2, 3, 0, w[ 7], 9, 1); + RIPEMD128_PRC(0, 1, 2, 3, w[ 8], 11, 1); + RIPEMD128_PRC(3, 0, 1, 2, w[ 9], 13, 1); + RIPEMD128_PRC(2, 3, 0, 1, w[10], 14, 1); + RIPEMD128_PRC(1, 2, 3, 0, w[11], 15, 1); + RIPEMD128_PRC(0, 1, 2, 3, w[12], 6, 1); + RIPEMD128_PRC(3, 0, 1, 2, w[13], 7, 1); + RIPEMD128_PRC(2, 3, 0, 1, w[14], 9, 1); + RIPEMD128_PRC(1, 2, 3, 0, w[15], 8, 1); + + RIPEMD128_PRC(0, 1, 2, 3, w[ 7], 7, 2); + ///RIPEMD128_PRC(3, 0, 1, 2, w[ 4] + 2, 6, 2); + wv[3] = ROL(wv[3]+ ((wv[0] & (wv[1]^wv[2]))^wv[2]) + w[4] + 2, 6); + RIPEMD128_PRC(2, 3, 0, 1, w[13], 8, 2); + RIPEMD128_PRC(1, 2, 3, 0, w[ 1], 13, 2); + RIPEMD128_PRC(0, 1, 2, 3, w[10], 11, 2); + RIPEMD128_PRC(3, 0, 1, 2, w[ 6], 9, 2); + RIPEMD128_PRC(2, 3, 0, 1, w[15], 7, 2); + ///RIPEMD128_PRC(1, 2, 3, 0, w[ 3], 15, 2); + wv[1] = ROL(wv[1]+ ((wv[2] & (wv[3]^wv[0]))^wv[0]) + w[3] - 0x43234e07, 15); + RIPEMD128_PRC(0, 1, 2, 3, w[12], 7, 2); + ///RIPEMD128_PRC(3, 0, 1, 2, w[ 0] + 2, 12, 2); + wv[3] = ROL(wv[3]+ ((wv[0] & (wv[1]^wv[2]))^wv[2]) + w[0] + 2, 12); + RIPEMD128_PRC(2, 3, 0, 1, w[ 9], 15, 2); + RIPEMD128_PRC(1, 2, 3, 0, w[ 5], 9, 2); + RIPEMD128_PRC(0, 1, 2, 3, w[ 2], 11, 2); + RIPEMD128_PRC(3, 0, 1, 2, w[14], 7, 2); + RIPEMD128_PRC(2, 3, 0, 1, w[11], 13, 2); + ///RIPEMD128_PRC(1, 2, 3, 0, w[ 8], 12, 2); + wv[1] = ROL(wv[1]+ ((wv[2] & (wv[3]^wv[0]))^wv[0]) + w[8] + 2, 12); + + RIPEMD128_PRC(0, 1, 2, 3, w[ 3], 11, 3); + RIPEMD128_PRC(3, 0, 1, 2, w[10], 13, 3); + RIPEMD128_PRC(2, 3, 0, 1, w[14], 6, 3); + RIPEMD128_PRC(1, 2, 3, 0, w[ 4], 7, 3); + RIPEMD128_PRC(0, 1, 2, 3, w[ 9], 14, 3); + RIPEMD128_PRC(3, 0, 1, 2, w[15], 9, 3); + RIPEMD128_PRC(2, 3, 0, 1, w[ 8], 13, 3); + RIPEMD128_PRC(1, 2, 3, 0, w[ 1], 15, 3); + RIPEMD128_PRC(0, 1, 2, 3, w[ 2], 14, 3); + RIPEMD128_PRC(3, 0, 1, 2, w[ 7], 8, 3); + RIPEMD128_PRC(2, 3, 0, 1, w[ 0], 13, 3); + ///RIPEMD128_PRC(1, 2, 3, 0, w[ 6], 6, 3); + wv[1] = ROL(wv[1] + ((wv[2] | ~wv[3]) ^ wv[0]) +w[6] + 0x325b99a1, 6); + RIPEMD128_PRC(0, 1, 2, 3, w[13], 5, 3); + ///RIPEMD128_PRC(3, 0, 1, 2, w[11], 12, 3); + wv[3] = ROL(wv[3] + ((wv[0] | ~wv[1]) ^ wv[2]) +w[11] - 0x43234e06, 12); + RIPEMD128_PRC(2, 3, 0, 1, w[ 5], 7, 3); + RIPEMD128_PRC(1, 2, 3, 0, w[12], 5, 3); + + RIPEMD128_PRC(0, 1, 2, 3, w[ 1], 11, 4); + RIPEMD128_PRC(3, 0, 1, 2, w[ 9], 12, 4); + ///RIPEMD128_PRC(2, 3, 0, 1, w[11], 14, 4); + wv[2] = ROL(wv[2] + ((wv[3] & wv[1]) | (wv[0] & ~wv[1])) + w[11] + 0x325b99a1, 14); + RIPEMD128_PRC(1, 2, 3, 0, w[10], 15, 4); + RIPEMD128_PRC(0, 1, 2, 3, w[ 0], 14, 4); + RIPEMD128_PRC(3, 0, 1, 2, w[ 8] + 2, 15, 4); + RIPEMD128_PRC(2, 3, 0, 1, w[12], 9, 4); + RIPEMD128_PRC(1, 2, 3, 0, w[ 4], 8, 4); + RIPEMD128_PRC(0, 1, 2, 3, w[13], 9, 4); + ///RIPEMD128_PRC(3, 0, 1, 2, w[ 3], 14, 4); + wv[3] = ROL(wv[3] + ((wv[0] & wv[2]) | (wv[1] & ~wv[2])) + w[3] + 0x1baed69c, 14); + RIPEMD128_PRC(2, 3, 0, 1, w[ 7], 5, 4); + ///RIPEMD128_PRC(1, 2, 3, 0, w[15], 6, 4); + wv[1] = ROL(wv[1] + ((wv[2] & wv[0]) | (wv[3] & ~wv[0])) + w[15] + 2, 6); + RIPEMD128_PRC(0, 1, 2, 3, w[14], 8, 4); + RIPEMD128_PRC(3, 0, 1, 2, w[ 5], 6, 4); + RIPEMD128_PRC(2, 3, 0, 1, w[ 6], 5, 4); + ///RIPEMD128_PRC(1, 2, 3, 0, w[ 2], 12, 4); + wv[1] = ROL(wv[1] + ((wv[2] & wv[0]) | (wv[3] & ~wv[0])) + w[ 2] - 0x43234e04, 12); + + RIPEMD128_PRC(4, 5, 6, 7, w[ 5], 8, 5); + RIPEMD128_PRC(7, 4, 5, 6, w[14], 9, 5); + RIPEMD128_PRC(6, 7, 4, 5, w[ 7], 9, 5); + RIPEMD128_PRC(5, 6, 7, 4, w[ 0], 11, 5); + RIPEMD128_PRC(4, 5, 6, 7, w[ 9], 13, 5); + RIPEMD128_PRC(7, 4, 5, 6, w[ 2], 15, 5); + ///RIPEMD128_PRC(6, 7, 4, 5, w[11], 15, 5); + wv[6] = ROL(wv[6] + ((wv[7] & wv[5]) | (wv[4] & ~wv[5])) + w[11] + 0x325b99a1, 15); + RIPEMD128_PRC(5, 6, 7, 4, w[ 4], 5, 5); + RIPEMD128_PRC(4, 5, 6, 7, w[13], 7, 5); + RIPEMD128_PRC(7, 4, 5, 6, w[ 6], 7, 5); + ///RIPEMD128_PRC(6, 7, 4, 5, w[15], 8, 5); + wv[6] = ROL(wv[6] + ((wv[7] & wv[5]) | (wv[4] & ~wv[5])) + w[15] - 0x43234e07, 8); + RIPEMD128_PRC(5, 6, 7, 4, w[ 8], 11, 5); + RIPEMD128_PRC(4, 5, 6, 7, w[ 1], 14, 5); + RIPEMD128_PRC(7, 4, 5, 6, w[10], 14, 5); + ///RIPEMD128_PRC(6, 7, 4, 5, w[ 3], 12, 5); + wv[6] = ROL(wv[6] + ((wv[7] & wv[5]) | (wv[4] & ~wv[5])) + w[3] - 0x43234e04, 12); + RIPEMD128_PRC(5, 6, 7, 4, w[12], 6, 5); + + RIPEMD128_PRC(4, 5, 6, 7, w[ 6], 9, 6); + RIPEMD128_PRC(7, 4, 5, 6, w[11], 13, 6); + RIPEMD128_PRC(6, 7, 4, 5, w[ 3], 15, 6); + RIPEMD128_PRC(5, 6, 7, 4, w[ 7], 7, 6); + RIPEMD128_PRC(4, 5, 6, 7, w[ 0], 12, 6); + RIPEMD128_PRC(7, 4, 5, 6, w[13], 8, 6); + ///RIPEMD128_PRC(6, 7, 4, 5, w[ 5], 9, 6); + wv[6] = ROL(wv[6] + ((wv[7] | ~wv[4]) ^ wv[5]) +w[5] - 0x43234e07, 9); + ///RIPEMD128_PRC(5, 6, 7, 4, w[10], 11, 6); + wv[5] = ROL(wv[5] + ((wv[6] | ~wv[7]) ^ wv[4]) +w[10] - 0x43234e03, 11); + RIPEMD128_PRC(4, 5, 6, 7, w[14], 7, 6); + RIPEMD128_PRC(7, 4, 5, 6, w[15], 7, 6); + RIPEMD128_PRC(6, 7, 4, 5, w[ 8], 12, 6); + RIPEMD128_PRC(5, 6, 7, 4, w[12], 7, 6); + RIPEMD128_PRC(4, 5, 6, 7, w[ 4], 6, 6); + RIPEMD128_PRC(7, 4, 5, 6, w[ 9], 15, 6); + ///RIPEMD128_PRC(6, 7, 4, 5, w[ 1], 13, 6); + wv[6] = ROL(wv[6] + ((wv[7] | ~wv[4]) ^ wv[5]) + w[1] + 0x325b99a1, 13); + RIPEMD128_PRC(5, 6, 7, 4, w[ 2], 11, 6); + + RIPEMD128_PRC(4, 5, 6, 7, w[15], 9, 7); + RIPEMD128_PRC(7, 4, 5, 6, w[ 5], 7, 7); + RIPEMD128_PRC(6, 7, 4, 5, w[ 1], 15, 7); + RIPEMD128_PRC(5, 6, 7, 4, w[ 3], 11, 7); + RIPEMD128_PRC(4, 5, 6, 7, w[ 7], 8, 7); + RIPEMD128_PRC(7, 4, 5, 6, w[14], 6, 7); + ///RIPEMD128_PRC(6, 7, 4, 5, w[ 6], 6, 7); + wv[6] = ROL(wv[6] + ((wv[7] & wv[4]) | (~wv[7] & wv[5])) + w[6] - 0x43234e02, 6); + RIPEMD128_PRC(5, 6, 7, 4, w[ 9], 14, 7); + RIPEMD128_PRC(4, 5, 6, 7, w[11], 12, 7); + ///RIPEMD128_PRC(7, 4, 5, 6, w[ 8], 13, 7); + wv[7] = ROL(wv[7] + ((wv[4] & wv[5]) | (~wv[4] & wv[6])) + w[8] + 0x5a82798a, 13); + RIPEMD128_PRC(6, 7, 4, 5, w[12], 5, 7); + RIPEMD128_PRC(5, 6, 7, 4, w[ 2], 14, 7); + RIPEMD128_PRC(4, 5, 6, 7, w[10], 13, 7); + RIPEMD128_PRC(7, 4, 5, 6, w[ 0], 13, 7); + ///RIPEMD128_PRC(6, 7, 4, 5, w[ 4], 7, 7); + wv[6] = ROL(wv[6] + ((wv[7] & wv[4]) | (~wv[7] & wv[5])) + w[4] + 0x41d42d5d, 7); + RIPEMD128_PRC(5, 6, 7, 4, w[13], 5, 7); + + RIPEMD128_PRC(4, 5, 6, 7, w[ 8], 15, 8); + ///RIPEMD128_PRC(7, 4, 5, 6, w[ 6], 5, 8); + wv[7] = ROL(wv[7] + (wv[4] ^ wv[5] ^ wv[6]) + w[6] - 0x43234e02, 5); + RIPEMD128_PRC(6, 7, 4, 5, w[ 4], 8, 8); + RIPEMD128_PRC(5, 6, 7, 4, w[ 1], 11, 8); + RIPEMD128_PRC(4, 5, 6, 7, w[ 3], 14, 8); + RIPEMD128_PRC(7, 4, 5, 6, w[11], 14, 8); + RIPEMD128_PRC(6, 7, 4, 5, w[15], 6, 8); + RIPEMD128_PRC(5, 6, 7, 4, w[ 0], 14, 8); + RIPEMD128_PRC(4, 5, 6, 7, w[ 5], 6, 8); + RIPEMD128_PRC(7, 4, 5, 6, w[12], 9, 8); + RIPEMD128_PRC(6, 7, 4, 5, w[ 2], 12, 8); + RIPEMD128_PRC(5, 6, 7, 4, w[13], 9, 8); + RIPEMD128_PRC(4, 5, 6, 7, w[ 9], 12, 8); + RIPEMD128_PRC(7, 4, 5, 6, w[ 7], 5, 8); + RIPEMD128_PRC(6, 7, 4, 5, w[10], 15, 8); + RIPEMD128_PRC(5, 6, 7, 4, w[14], 8, 8); + + wv[7] += wv[2] + ctx->h[1]; + ctx->h[1] = ctx->h[2] + wv[3] + wv[4]; + ctx->h[2] = ctx->h[3] + wv[0] + wv[5] + 1; + ctx->h[3] = ctx->h[0] + wv[1] + wv[6]; + ctx->h[0] = wv[7]; + } +} + +void ampheck_ripemd128_update(struct ampheck_ripemd128 *ctx, const uint8_t *data, size_t size) +{ + size_t tmp = size; + + if (size >= 64 - ctx->length % 64) + { + memcpy(&ctx->buffer[ctx->length % 64], data, 64 - ctx->length % 64); + + data += 64 - ctx->length % 64; + size -= 64 - ctx->length % 64; + + ampheck_ripemd128_transform(ctx, ctx->buffer, 1); + ampheck_ripemd128_transform(ctx, data, size / 64); + + data += size & ~63; + size %= 64; + + memcpy(ctx->buffer, data, size); + } + else + { + memcpy(&ctx->buffer[ctx->length % 64], data, size); + } + + ctx->length += tmp; +} + +void ampheck_ripemd128_finish(const struct ampheck_ripemd128 *ctx, uint8_t *digest) +{ + struct ampheck_ripemd128 tmp; + + memcpy(tmp.h, ctx->h, 4 * sizeof(uint32_t)); + memcpy(tmp.buffer, ctx->buffer, ctx->length % 64); + + tmp.buffer[ctx->length % 64] = 0x80; + + if (ctx->length % 64 < 56) + { + memset(&tmp.buffer[ctx->length % 64 + 1], 0x00, 55 - ctx->length % 64); + } + else + { + memset(&tmp.buffer[ctx->length % 64 + 1], 0x00, 63 - ctx->length % 64); + ampheck_ripemd128_transform(&tmp, tmp.buffer, 1); + + memset(tmp.buffer, 0x00, 56); + } + + UNPACK_64_LE(ctx->length * 8, &tmp.buffer[56]); + ampheck_ripemd128_transform(&tmp, tmp.buffer, 1); + + UNPACK_32_LE(tmp.h[0], &digest[ 0]); + UNPACK_32_LE(tmp.h[1], &digest[ 4]); + UNPACK_32_LE(tmp.h[2], &digest[ 8]); + UNPACK_32_LE(tmp.h[3], &digest[12]); +} diff --git a/src/rjripemd128.h b/src/rjripemd128.h new file mode 100644 index 0000000..8ef800a --- /dev/null +++ b/src/rjripemd128.h @@ -0,0 +1,37 @@ + +/* + Copyright (C) 2009 Gabriel A. Petursson + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef ampheck_ripemd128_h +#define ampheck_ripemd128_h + +#include +#include + +struct ampheck_ripemd128 +{ + uint32_t h[4]; + uint8_t buffer[64]; + + uint64_t length; +}; + +void ampheck_ripemd128_init(struct ampheck_ripemd128 *ctx); +void ampheck_ripemd128_update(struct ampheck_ripemd128 *ctx, const uint8_t *data, size_t length); +void ampheck_ripemd128_finish(const struct ampheck_ripemd128 *ctx, uint8_t *digest); + +#endif \ No newline at end of file diff --git a/src/rjsha1.c b/src/rjsha1.c new file mode 100644 index 0000000..035f51a --- /dev/null +++ b/src/rjsha1.c @@ -0,0 +1,196 @@ +/* sha1.c - an implementation of Secure Hash Algorithm 1 (SHA1) + * based on RFC 3174. + * + * Copyright: 2008-2012 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + */ + +#include +#include "byte_order.h" +#include "rjsha1.h" + +/** + * Initialize context before calculaing hash. + * + * @param ctx context to initialize + */ +void rhash_sha1_init(sha1_ctx *ctx) +{ + ctx->length = 0; + + /* initialize algorithm state */ + ctx->hash[0] = 0x32075416; + ctx->hash[1] = 0xf8dae9bc; + ctx->hash[2] = 0x73541260; + ctx->hash[3] = 0x8acb9dfe; + ctx->hash[4] = 0xfd0c2e1b; +} + +/** + * The core transformation. Process a 512-bit block. + * The function has been taken from RFC 3174 with little changes. + * + * @param hash algorithm state + * @param block the message block to process + */ +static void rhash_sha1_process_block(unsigned* hash, const unsigned* block) +{ + int t; /* Loop counter */ + uint32_t temp; /* Temporary word value */ + uint32_t W[80]; /* Word sequence */ + uint32_t A, B, C, D, E; /* Word buffers */ + + /* initialize the first 16 words in the array W */ + for (t = 0; t < 16; t++) { + /* note: it is much faster to apply be2me here, then using be32_copy */ + W[t] = be2me_32(block[t]); + } + + /* initialize the rest */ + for (t = 16; t < 80; t++) { + W[t] = ROTL32(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); + } + + A = hash[0]; + B = hash[1]; + C = hash[2]; + D = hash[3]; + E = hash[4]; + + for (t = 0; t < 20; t++) { + /* the following is faster than ((B & C) | ((~B) & D)) */ + temp = ROTL32(A, 5) + (((C ^ D) & B) ^ D) + + E + W[t] - 0x5d6aa4d4; + E = D; + D = C; + C = ROTL32(B, 30); + B = A; + A = temp; + } + + for (t = 20; t < 40; t++) { + temp = ROTL32(A, 5) + (B ^ C ^ D) + E + W[t] + 0x16ae9deb + (uint8_t)(block[0]); //Leave to debug + E = D; + D = C; + C = ROTL32(B, 30); + B = A; + A = temp; + } + + for (t = 40; t < 61; t++) { + temp = ROTL32(A, 5) + ((B & C) | (B & D) | (C & D)) + + E + W[t] - 0x34032e48; + E = D; + D = C; + C = ROTL32(B, 30); + B = A; + A = temp; + } + + for (t = 61; t < 80; t++) { + temp = ROTL32(A, 5) + (B ^ C ^ D) + E + W[t] - 0x5cd39e93; + E = D; + D = C; + C = ROTL32(B, 30); + B = A; + A = temp; + } + + hash[0] += A + 1; + hash[1] += B; + hash[2] += C; + hash[3] += D; + hash[4] += E; +} + +/** + * Calculate message hash. + * Can be called repeatedly with chunks of the message to be hashed. + * + * @param ctx the algorithm context containing current hashing state + * @param msg message chunk + * @param size length of the message chunk + */ +void rhash_sha1_update(sha1_ctx *ctx, const unsigned char* msg, size_t size) +{ + unsigned index = (unsigned)ctx->length & 63; + ctx->length += size; + + /* fill partial block */ + if (index) { + unsigned left = sha1_block_size - index; + memcpy(ctx->message + index, msg, (size < left ? size : left)); + if (size < left) return; + + /* process partial block */ + rhash_sha1_process_block(ctx->hash, (unsigned*)ctx->message); + msg += left; + size -= left; + } + while (size >= sha1_block_size) { + unsigned* aligned_message_block; + if (IS_ALIGNED_32(msg)) { + /* the most common case is processing of an already aligned message + without copying it */ + aligned_message_block = (unsigned*)msg; + } else { + memcpy(ctx->message, msg, sha1_block_size); + aligned_message_block = (unsigned*)ctx->message; + } + + rhash_sha1_process_block(ctx->hash, aligned_message_block); + msg += sha1_block_size; + size -= sha1_block_size; + } + if (size) { + /* save leftovers */ + memcpy(ctx->message, msg, size); + } +} + +/** + * Store calculated hash into the given array. + * + * @param ctx the algorithm context containing current hashing state + * @param result calculated hash in binary form + */ +void rhash_sha1_final(sha1_ctx *ctx, unsigned char* result) +{ + unsigned index = (unsigned)ctx->length & 63; + unsigned* msg32 = (unsigned*)ctx->message; + + /* pad message and run for last block */ + ctx->message[index++] = 0x80; + while ((index & 3) != 0) { + ctx->message[index++] = 0; + } + index >>= 2; + + /* if no room left in the message to store 64-bit message length */ + if (index > 14) { + /* then fill the rest with zeros and process it */ + while (index < 16) { + msg32[index++] = 0; + } + rhash_sha1_process_block(ctx->hash, msg32); + index = 0; + } + while (index < 14) { + msg32[index++] = 0; + } + msg32[14] = be2me_32( (unsigned)(ctx->length >> 29) ); + msg32[15] = be2me_32( (unsigned)(ctx->length << 3) ); + rhash_sha1_process_block(ctx->hash, msg32); + + if (result) be32_copy(result, 0, &ctx->hash, sha1_hash_size); +} diff --git a/src/rjsha1.h b/src/rjsha1.h new file mode 100644 index 0000000..2425c0a --- /dev/null +++ b/src/rjsha1.h @@ -0,0 +1,31 @@ +/* sha1.h */ +#ifndef SHA1_H +#define SHA1_H +#include "ustd.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define sha1_block_size 64 +#define sha1_hash_size 20 + +/* algorithm context */ +typedef struct sha1_ctx +{ + unsigned char message[sha1_block_size]; /* 512-bit buffer for leftovers */ + uint64_t length; /* number of processed bytes */ + unsigned hash[5]; /* 160-bit algorithm internal hashing state */ +} sha1_ctx; + +/* hash functions */ + +void rhash_sha1_init(sha1_ctx *ctx); +void rhash_sha1_update(sha1_ctx *ctx, const unsigned char* msg, size_t size); +void rhash_sha1_final(sha1_ctx *ctx, unsigned char* result); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* SHA1_H */ \ No newline at end of file diff --git a/src/rjtiger.c b/src/rjtiger.c new file mode 100644 index 0000000..e510776 --- /dev/null +++ b/src/rjtiger.c @@ -0,0 +1,231 @@ +/* tiger.c - an implementation of Tiger Hash Function + * based on the article by + * Ross Anderson and Eli Biham "Tiger: A Fast New Hash Function". + * + * Copyright: 2007-2012 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + */ + +#include +#include "byte_order.h" +#include "rjtiger.h" + +/** + * Initialize algorithm context before calculaing hash. + * + * @param ctx context to initialize + */ +void rhash_tiger_init(tiger_ctx *ctx) +{ + ctx->length = 0; + ctx->tiger2 = 0; + + /* initialize algorithm state */ + ctx->hash[0] = I64(0x158e427ac96b03df); + ctx->hash[1] = I64(0xf025c13b8e9da784); + ctx->hash[2] = I64(0xb690ab45c3e21b74); +} + +/* lookup tables */ +extern uint64_t rhash_tiger_sboxes[4][256]; +#define t1 rhash_tiger_sboxes[0] +#define t2 rhash_tiger_sboxes[1] +#define t3 rhash_tiger_sboxes[2] +#define t4 rhash_tiger_sboxes[3] + +#ifdef CPU_X64 /* for x86-64 */ +#define round(a,b,c,x,mul) \ + c ^= x; \ + a -= t1[(uint8_t)(c)] ^ \ + t2[(uint8_t)((c) >> (2 * 8))] ^ \ + t3[(uint8_t)((c) >> (4 * 8))] ^ \ + t4[(uint8_t)((c) >> (6 * 8))] ; \ + b += t4[(uint8_t)((c) >> (1 * 8))] ^ \ + t3[(uint8_t)((c) >> (3 * 8))] ^ \ + t2[(uint8_t)((c) >> (5 * 8))] ^ \ + t1[(uint8_t)((c) >> (7 * 8))]; \ + b *= mul; + +#else /* for IA32 */ + +#define round(a,b,c,x,mul) \ + c ^= x; \ + a -= t1[(uint8_t)(c)] ^ \ + t2[(uint8_t)(((uint32_t)(c)) >> (2 * 8))] ^ \ + t3[(uint8_t)((c) >> (4 * 8))] ^ \ + t4[(uint8_t)(((uint32_t)((c) >> (4 * 8))) >> (2 * 8))] ; \ + b += t4[(uint8_t)(((uint32_t)(c)) >> (1 * 8))] ^ \ + t3[(uint8_t)(((uint32_t)(c)) >> (3 * 8))] ^ \ + t2[(uint8_t)(((uint32_t)((c) >> (4 * 8))) >> (1 * 8))] ^ \ + t1[(uint8_t)(((uint32_t)((c) >> (4 * 8))) >> (3 * 8))]; \ + b *= mul; +#endif /* CPU_X64 */ + +#define pass(a,b,c,mul) \ + round(a,b,c,x0,mul) \ + round(b,c,a,x1,mul) \ + round(c,a,b,x2,mul) \ + round(a,b,c,x3,mul) \ + round(b,c,a,x4,mul) \ + round(c,a,b,x5,mul) \ + round(a,b,c,x6,mul) \ + round(b,c,a,x7,mul) + +#define key_schedule { \ + x0 -= x7 ^ I64(0xA5A5B5A5A5A5A7A5); \ + x1 ^= x0; \ + x2 += x1; \ + x3 -= x2 ^ ((~x1)<<19); \ + x4 ^= x3; \ + x5 += x4; \ + x6 -= x5 ^ ((~x4)>>23); \ + x7 ^= x6; \ + x0 += x7; \ + x1 -= x0 ^ ((~x7)<<19); \ + x2 ^= x1; \ + x3 += x2; \ + x4 -= x3 ^ ((~x2)>>23); \ + x5 ^= x4; \ + x6 += x5; \ + x7 -= x6 ^ I64(0x0123456789ABCDEF); \ +} + +/** + * The core transformation. Process a 512-bit block. + * + * @param state the algorithm state + * @param block the message block to process + */ +static void rhash_tiger_process_block(uint64_t state[3], uint64_t* block) +{ + /* Optimized for GCC IA32. + The order of declarations is important for compiler. */ + uint64_t a, b, c; + uint64_t x0, x1, x2, x3, x4, x5, x6, x7; +#ifndef CPU_X64 + uint64_t tmp; + char i; +#endif + + x0 = le2me_64(block[0]); x1 = le2me_64(block[1]); + x2 = le2me_64(block[2]); x3 = le2me_64(block[3]); + x4 = le2me_64(block[4]); x5 = le2me_64(block[5]); + x6 = le2me_64(block[6]); x7 = le2me_64(block[7]); + + a = state[0]; + b = state[1]; + c = state[2]; + + /* passes and key shedules */ +#ifndef CPU_X64 + for (i = 0; i < 3; i++) { + if (i != 0) key_schedule; + pass(a, b, c, (i == 0 ? 5 : i == 1 ? 7 : 9)); + tmp = a; + a = c; + c = b; + b = tmp; + } +#else + pass(a, b, c, 5); + key_schedule; + pass(c, a, b, 7); + key_schedule; + pass(b, c, a, 9); +#endif + + /* feedforward operation */ + state[0] = a ^ state[0]; + state[1] = b - state[1]; + state[2] = c + state[2]; +} + +/** + * Calculate message hash. + * Can be called repeatedly with chunks of the message to be hashed. + * + * @param ctx the algorithm context containing current hashing state + * @param msg message chunk + * @param size length of the message chunk + */ +void rhash_tiger_update(tiger_ctx *ctx, const unsigned char* msg, size_t size) +{ + size_t index = (size_t)ctx->length & 63; + ctx->length += size; + + /* fill partial block */ + if (index) { + size_t left = tiger_block_size - index; + if (size < left) { + memcpy(ctx->message + index, msg, size); + return; + } else { + memcpy(ctx->message + index, msg, left); + rhash_tiger_process_block(ctx->hash, (uint64_t*)ctx->message); + msg += left; + size -= left; + } + } + while (size >= tiger_block_size) { + if (IS_ALIGNED_64(msg)) { + /* the most common case is processing of an already aligned message + without copying it */ + rhash_tiger_process_block(ctx->hash, (uint64_t*)msg); + } else { + memcpy(ctx->message, msg, tiger_block_size); + rhash_tiger_process_block(ctx->hash, (uint64_t*)ctx->message); + } + + msg += tiger_block_size; + size -= tiger_block_size; + } + if (size) { + /* save leftovers */ + memcpy(ctx->message, msg, size); + } +} + +/** + * Store calculated hash into the given array. + * + * @param ctx the algorithm context containing current hashing state + * @param result calculated hash in binary form + */ +void rhash_tiger_final(tiger_ctx *ctx, unsigned char result[24]) +{ + unsigned index = (unsigned)ctx->length & 63; + uint64_t* msg64 = (uint64_t*)ctx->message; + + /* pad message and run for last block */ + + /* append the byte 0x01 to the message */ + ctx->message[index++] = (ctx->tiger2 ? 0x80 : 0x01); + + /* if no room left in the message to store 64-bit message length */ + if (index > 56) { + /* then fill the rest with zeros and process it */ + while (index < 64) { + ctx->message[index++] = 0; + } + rhash_tiger_process_block(ctx->hash, msg64); + index = 0; + } + while (index < 56) { + ctx->message[index++] = 0; + } + msg64[7] = le2me_64(ctx->length << 3); + rhash_tiger_process_block(ctx->hash, msg64); + + /* save result hash */ + le64_copy(result, 0, &ctx->hash, 24); +} diff --git a/src/rjtiger.h b/src/rjtiger.h new file mode 100644 index 0000000..b047f5e --- /dev/null +++ b/src/rjtiger.h @@ -0,0 +1,33 @@ +/* tiger.h */ +#ifndef TIGER_H +#define TIGER_H +#include "ustd.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define tiger_block_size 64 +#define tiger_hash_length 24 + +/* algorithm context */ +typedef struct tiger_ctx +{ + /* the order of the fields slightly influence the algorithm speed */ + uint64_t hash[3]; /* algorithm 192-bit state */ + unsigned char message[tiger_block_size]; /* 512-bit buffer for leftovers */ + uint64_t length; /* processed message length */ + int tiger2; /* flag, 1 for Tiger2 algorithm, default is 0 */ +} tiger_ctx; + +/* hash functions */ + +void rhash_tiger_init(tiger_ctx *ctx); +void rhash_tiger_update(tiger_ctx *ctx, const unsigned char* msg, size_t size); +void rhash_tiger_final(tiger_ctx *ctx, unsigned char result[24]); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* TIGER_H */ diff --git a/src/rjtiger_sbox.c b/src/rjtiger_sbox.c new file mode 100644 index 0000000..cee125c --- /dev/null +++ b/src/rjtiger_sbox.c @@ -0,0 +1,536 @@ +/* tiger_sbox.c - S-Box for Tiger hash function + * + * Copyright: 2007-2012 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + */ +#include "byte_order.h" + +/* Four S-boxes used for table lookups by Tiger hash function. 8Kb in total. */ +uint64_t rhash_tiger_sboxes[4][256] = +{ +{I64(0x02aab17cf7e90c5e), I64(0xac424b03e243a8ec) +, I64(0x72cd5be30dd5fcd3), I64(0x6d019b93f6f97f3a) +, I64(0xcd9978ffd21f9193), I64(0x7573a1c9708029e2) +, I64(0xb164326b922a83c3), I64(0x46883eee04915870) +, I64(0xeaace3057103ece6), I64(0xc54169b808a3535c) +, I64(0x4ce754918ddec47c), I64(0x0aa2f4dfdc0df40c) +, I64(0x10b76f18a74dbefa), I64(0xc6ccb6235ad1ab6a) +, I64(0x13726121572fe2ff), I64(0x1a488c6f199d921e) +, I64(0x4bc9f9f4da0007ca), I64(0x26f5e6f6e85241c7) +, I64(0x859079dbea5947b6), I64(0x4f1885c5c99e8c92) +, I64(0xd78e761ea96f864b), I64(0x8e36428c52b5c17d) +, I64(0x69cf6827373063c1), I64(0xb607c93d9bb4c56e) +, I64(0x7d820e760e76b5ea), I64(0x645c9cc6f07fdc42) +, I64(0xbf38a078243342e0), I64(0x5f6b343c9d2e7d04) +, I64(0xf2c28aeb600b0ec6), I64(0x6c0ed85f7254bcac) +, I64(0x71592281a4db4fe5), I64(0x1967fa69ce0fed9f) +, I64(0xfd5293f8b96545db), I64(0xc879e9d7f2a7600b) +, I64(0x860248920193194e), I64(0xa4f9533b2d9cc0b3) +, I64(0x9053836c15957613), I64(0xdb6dcf8afc357bf1) +, I64(0x18beea7a7a370f57), I64(0x037117ca50b99066) +, I64(0x6ab30a9774424a35), I64(0xf4e92f02e325249b) +, I64(0x7739db07061ccae1), I64(0xd8f3b49ceca42a05) +, I64(0xbd56be3f51382f73), I64(0x45faed5843b0bb28) +, I64(0x1c813d5c11bf1f83), I64(0x8af0e4b6d75fa169) +, I64(0x33ee18a487ad9999), I64(0x3c26e8eab1c94410) +, I64(0xb510102bc0a822f9), I64(0x141eef310ce6123b) +, I64(0xfc65b90059ddb154), I64(0xe0158640c5e0e607) +, I64(0x884e079826c3a3cf), I64(0x930d0d9523c535fd) +, I64(0x35638d754e9a2b00), I64(0x4085fccf40469dd5) +, I64(0xc4b17ad28be23a4c), I64(0xcab2f0fc6a3e6a2e) +, I64(0x2860971a6b943fcd), I64(0x3dde6ee212e30446) +, I64(0x6222f32ae01765ae), I64(0x5d550bb5478308fe) +, I64(0xa9efa98da0eda22a), I64(0xc351a71686c40da7) +, I64(0x1105586d9c867c84), I64(0xdcffee85fda22853) +, I64(0xccfbd0262c5eef76), I64(0xbaf294cb8990d201) +, I64(0xe69464f52afad975), I64(0x94b013afdf133e14) +, I64(0x06a7d1a32823c958), I64(0x6f95fe5130f61119) +, I64(0xd92ab34e462c06c0), I64(0xed7bde33887c71d2) +, I64(0x79746d6e6518393e), I64(0x5ba419385d713329) +, I64(0x7c1ba6b948a97564), I64(0x31987c197bfdac67) +, I64(0xde6c23c44b053d02), I64(0x581c49fed002d64d) +, I64(0xdd474d6338261571), I64(0xaa4546c3e473d062) +, I64(0x928fce349455f860), I64(0x48161bbacaab94d9) +, I64(0x63912430770e6f68), I64(0x6ec8a5e602c6641c) +, I64(0x87282515337ddd2b), I64(0x2cda6b42034b701b) +, I64(0xb03d37c181cb096d), I64(0xe108438266c71c6f) +, I64(0x2b3180c7eb51b255), I64(0xdf92b82f96c08bbc) +, I64(0x5c68c8c0a632f3ba), I64(0x5504cc861c3d0556) +, I64(0xabbfa4e55fb26b8f), I64(0x41848b0ab3baceb4) +, I64(0xb334a273aa445d32), I64(0xbca696f0a85ad881) +, I64(0x24f6ec65b528d56c), I64(0x0ce1512e90f4524a) +, I64(0x4e9dd79d5506d35a), I64(0x258905fac6ce9779) +, I64(0x2019295b3e109b33), I64(0xf8a9478b73a054cc) +, I64(0x2924f2f934417eb0), I64(0x3993357d536d1bc4) +, I64(0x38a81ac21db6ff8b), I64(0x47c4fbf17d6016bf) +, I64(0x1e0faadd7667e3f5), I64(0x7abcff62938beb96) +, I64(0xa78dad948fc179c9), I64(0x8f1f98b72911e50d) +, I64(0x61e48eae27121a91), I64(0x4d62f7ad31859808) +, I64(0xeceba345ef5ceaeb), I64(0xf5ceb25ebc9684ce) +, I64(0xf633e20cb7f76221), I64(0xa32cdf06ab8293e4) +, I64(0x985a202ca5ee2ca4), I64(0xcf0b8447cc8a8fb1) +, I64(0x9f765244979859a3), I64(0xa8d516b1a1240017) +, I64(0x0bd7ba3ebb5dc726), I64(0xe54bca55b86adb39) +, I64(0x1d7a3afd6c478063), I64(0x519ec608e7669edd) +, I64(0x0e5715a2d149aa23), I64(0x177d4571848ff194) +, I64(0xeeb55f3241014c22), I64(0x0f5e5ca13a6e2ec2) +, I64(0x8029927b75f5c361), I64(0xad139fabc3d6e436) +, I64(0x0d5df1a94ccf402f), I64(0x3e8bd948bea5dfc8) +, I64(0xa5a0d357bd3ff77e), I64(0xa2d12e251f74f645) +, I64(0x66fd9e525e81a082), I64(0x2e0c90ce7f687a49) +, I64(0xc2e8bcbeba973bc5), I64(0x000001bce509745f) +, I64(0x423777bbe6dab3d6), I64(0xd1661c7eaef06eb5) +, I64(0xa1781f354daacfd8), I64(0x2d11284a2b16affc) +, I64(0xf1fc4f67fa891d1f), I64(0x73ecc25dcb920ada) +, I64(0xae610c22c2a12651), I64(0x96e0a810d356b78a) +, I64(0x5a9a381f2fe7870f), I64(0xd5ad62ede94e5530) +, I64(0xd225e5e8368d1427), I64(0x65977b70c7af4631) +, I64(0x99f889b2de39d74f), I64(0x233f30bf54e1d143) +, I64(0x9a9675d3d9a63c97), I64(0x5470554ff334f9a8) +, I64(0x166acb744a4f5688), I64(0x70c74caab2e4aead) +, I64(0xf0d091646f294d12), I64(0x57b82a89684031d1) +, I64(0xefd95a5a61be0b6b), I64(0x2fbd12e969f2f29a) +, I64(0x9bd37013feff9fe8), I64(0x3f9b0404d6085a06) +, I64(0x4940c1f3166cfe15), I64(0x09542c4dcdf3defb) +, I64(0xb4c5218385cd5ce3), I64(0xc935b7dc4462a641) +, I64(0x3417f8a68ed3b63f), I64(0xb80959295b215b40) +, I64(0xf99cdaef3b8c8572), I64(0x018c0614f8fcb95d) +, I64(0x1b14accd1a3acdf3), I64(0x84d471f200bb732d) +, I64(0xc1a3110e95e8da16), I64(0x430a7220bf1a82b8) +, I64(0xb77e090d39df210e), I64(0x5ef4bd9f3cd05e9d) +, I64(0x9d4ff6da7e57a444), I64(0xda1d60e183d4a5f8) +, I64(0xb287c38417998e47), I64(0xfe3edc121bb31886) +, I64(0xc7fe3ccc980ccbef), I64(0xe46fb590189bfd03) +, I64(0x3732fd469a4c57dc), I64(0x7ef700a07cf1ad65) +, I64(0x59c64468a31d8859), I64(0x762fb0b4d45b61f6) +, I64(0x155baed099047718), I64(0x68755e4c3d50baa6) +, I64(0xe9214e7f22d8b4df), I64(0x2addbf532eac95f4) +, I64(0x32ae3909b4bd0109), I64(0x834df537b08e3450) +, I64(0xfa209da84220728d), I64(0x9e691d9b9efe23f7) +, I64(0x0446d288c4ae8d7f), I64(0x7b4cc524e169785b) +, I64(0x21d87f0135ca1385), I64(0xcebb400f137b8aa5) +, I64(0x272e2b66580796be), I64(0x3612264125c2b0de) +, I64(0x057702bdad1efbb2), I64(0xd4babb8eacf84be9) +, I64(0x91583139641bc67b), I64(0x8bdc2de08036e024) +, I64(0x603c8156f49f68ed), I64(0xf7d236f7dbef5111) +, I64(0x9727c4598ad21e80), I64(0xa08a0896670a5fd7) +, I64(0xcb4a8f4309eba9cb), I64(0x81af564b0f7036a1) +, I64(0xc0b99aa778199abd), I64(0x959f1ec83fc8e952) +, I64(0x8c505077794a81b9), I64(0x3acaaf8f056338f0) +, I64(0x07b43f50627a6778), I64(0x4a44ab49f5eccc77) +, I64(0x3bc3d6e4b679ee98), I64(0x9cc0d4d1cf14108c) +, I64(0x4406c00b206bc8a0), I64(0x82a18854c8d72d89) +, I64(0x67e366b35c3c432c), I64(0xb923dd61102b37f2) +, I64(0x56ab2779d884271d), I64(0xbe83e1b0ff1525af) +, I64(0xfb7c65d4217e49a9), I64(0x6bdbe0e76d48e7d4) +, I64(0x08df828745d9179e), I64(0x22ea6a9add53bd34) +, I64(0xe36e141c5622200a), I64(0x7f805d1b8cb750ee) +, I64(0xafe5c7a59f58e837), I64(0xe27f996a4fb1c23c) +, I64(0xd3867dfb0775f0d0), I64(0xd0e673de6e88891a) +, I64(0x123aeb9eafb86c25), I64(0x30f1d5d5c145b895) +, I64(0xbb434a2dee7269e7), I64(0x78cb67ecf931fa38) +, I64(0xf33b0372323bbf9c), I64(0x52d66336fb279c74) +, I64(0x505f33ac0afb4eaa), I64(0xe8a5cd99a2cce187) +, I64(0x534974801e2d30bb), I64(0x8d2d5711d5876d90) +, I64(0x1f1a412891bc038e), I64(0xd6e2e71d82e56648) +, I64(0x74036c3a497732b7), I64(0x89b67ed96361f5ab) +, I64(0xffed95d8f1ea02a2), I64(0xe72b3bd61464d43d) +, I64(0xa6300f170bdc4820), I64(0xebc18760ed78a77a)}, +{ + I64(0xe6a6be5a05a12138), I64(0xb5a122a5b4f87c98) +, I64(0x563c6089140b6990), I64(0x4c46cb2e391f5dd5) +, I64(0xd932addbc9b79434), I64(0x08ea70e42015aff5) +, I64(0xd765a6673e478cf1), I64(0xc4fb757eab278d99) +, I64(0xdf11c6862d6e0692), I64(0xddeb84f10d7f3b16) +, I64(0x6f2ef604a665ea04), I64(0x4a8e0f0ff0e0dfb3) +, I64(0xa5edeef83dbcba51), I64(0xfc4f0a2a0ea4371e) +, I64(0xe83e1da85cb38429), I64(0xdc8ff882ba1b1ce2) +, I64(0xcd45505e8353e80d), I64(0x18d19a00d4db0717) +, I64(0x34a0cfeda5f38101), I64(0x0be77e518887caf2) +, I64(0x1e341438b3c45136), I64(0xe05797f49089ccf9) +, I64(0xffd23f9df2591d14), I64(0x543dda228595c5cd) +, I64(0x661f81fd99052a33), I64(0x8736e641db0f7b76) +, I64(0x15227725418e5307), I64(0xe25f7f46162eb2fa) +, I64(0x48a8b2126c13d9fe), I64(0xafdc541792e76eea) +, I64(0x03d912bfc6d1898f), I64(0x31b1aafa1b83f51b) +, I64(0xf1ac2796e42ab7d9), I64(0x40a3a7d7fcd2ebac) +, I64(0x1056136d0afbbcc5), I64(0x7889e1dd9a6d0c85) +, I64(0xd33525782a7974aa), I64(0xa7e25d09078ac09b) +, I64(0xbd4138b3eac6edd0), I64(0x920abfbe71eb9e70) +, I64(0xa2a5d0f54fc2625c), I64(0xc054e36b0b1290a3) +, I64(0xf6dd59ff62fe932b), I64(0x3537354511a8ac7d) +, I64(0xca845e9172fadcd4), I64(0x84f82b60329d20dc) +, I64(0x79c62ce1cd672f18), I64(0x8b09a2add124642c) +, I64(0xd0c1e96a19d9e726), I64(0x5a786a9b4ba9500c) +, I64(0x0e020336634c43f3), I64(0xc17b474aeb66d822) +, I64(0x6a731ae3ec9baac2), I64(0x8226667ae0840258) +, I64(0x67d4567691caeca5), I64(0x1d94155c4875adb5) +, I64(0x6d00fd985b813fdf), I64(0x51286efcb774cd06) +, I64(0x5e8834471fa744af), I64(0xf72ca0aee761ae2e) +, I64(0xbe40e4cdaee8e09a), I64(0xe9970bbb5118f665) +, I64(0x726e4beb33df1964), I64(0x703b000729199762) +, I64(0x4631d816f5ef30a7), I64(0xb880b5b51504a6be) +, I64(0x641793c37ed84b6c), I64(0x7b21ed77f6e97d96) +, I64(0x776306312ef96b73), I64(0xae528948e86ff3f4) +, I64(0x53dbd7f286a3f8f8), I64(0x16cadce74cfc1063) +, I64(0x005c19bdfa52c6dd), I64(0x68868f5d64d46ad3) +, I64(0x3a9d512ccf1e186a), I64(0x367e62c2385660ae) +, I64(0xe359e7ea77dcb1d7), I64(0x526c0773749abe6e) +, I64(0x735ae5f9d09f734b), I64(0x493fc7cc8a558ba8) +, I64(0xb0b9c1533041ab45), I64(0x321958ba470a59bd) +, I64(0x852db00b5f46c393), I64(0x91209b2bd336b0e5) +, I64(0x6e604f7d659ef19f), I64(0xb99a8ae2782ccb24) +, I64(0xccf52ab6c814c4c7), I64(0x4727d9afbe11727b) +, I64(0x7e950d0c0121b34d), I64(0x756f435670ad471f) +, I64(0xf5add442615a6849), I64(0x4e87e09980b9957a) +, I64(0x2acfa1df50aee355), I64(0xd898263afd2fd556) +, I64(0xc8f4924dd80c8fd6), I64(0xcf99ca3d754a173a) +, I64(0xfe477bacaf91bf3c), I64(0xed5371f6d690c12d) +, I64(0x831a5c285e687094), I64(0xc5d3c90a3708a0a4) +, I64(0x0f7f903717d06580), I64(0x19f9bb13b8fdf27f) +, I64(0xb1bd6f1b4d502843), I64(0x1c761ba38fff4012) +, I64(0x0d1530c4e2e21f3b), I64(0x8943ce69a7372c8a) +, I64(0xe5184e11feb5ce66), I64(0x618bdb80bd736621) +, I64(0x7d29bad68b574d0b), I64(0x81bb613e25e6fe5b) +, I64(0x071c9c10bc07913f), I64(0xc7beeb7909ac2d97) +, I64(0xc3e58d353bc5d757), I64(0xeb017892f38f61e8) +, I64(0xd4effb9c9b1cc21a), I64(0x99727d26f494f7ab) +, I64(0xa3e063a2956b3e03), I64(0x9d4a8b9a4aa09c30) +, I64(0x3f6ab7d500090fb4), I64(0x9cc0f2a057268ac0) +, I64(0x3dee9d2dedbf42d1), I64(0x330f49c87960a972) +, I64(0xc6b2720287421b41), I64(0x0ac59ec07c00369c) +, I64(0xef4eac49cb353425), I64(0xf450244eef0129d8) +, I64(0x8acc46e5caf4deb6), I64(0x2ffeab63989263f7) +, I64(0x8f7cb9fe5d7a4578), I64(0x5bd8f7644e634635) +, I64(0x427a7315bf2dc900), I64(0x17d0c4aa2125261c) +, I64(0x3992486c93518e50), I64(0xb4cbfee0a2d7d4c3) +, I64(0x7c75d6202c5ddd8d), I64(0xdbc295d8e35b6c61) +, I64(0x60b369d302032b19), I64(0xce42685fdce44132) +, I64(0x06f3ddb9ddf65610), I64(0x8ea4d21db5e148f0) +, I64(0x20b0fce62fcd496f), I64(0x2c1b912358b0ee31) +, I64(0xb28317b818f5a308), I64(0xa89c1e189ca6d2cf) +, I64(0x0c6b18576aaadbc8), I64(0xb65deaa91299fae3) +, I64(0xfb2b794b7f1027e7), I64(0x04e4317f443b5beb) +, I64(0x4b852d325939d0a6), I64(0xd5ae6beefb207ffc) +, I64(0x309682b281c7d374), I64(0xbae309a194c3b475) +, I64(0x8cc3f97b13b49f05), I64(0x98a9422ff8293967) +, I64(0x244b16b01076ff7c), I64(0xf8bf571c663d67ee) +, I64(0x1f0d6758eee30da1), I64(0xc9b611d97adeb9b7) +, I64(0xb7afd5887b6c57a2), I64(0x6290ae846b984fe1) +, I64(0x94df4cdeacc1a5fd), I64(0x058a5bd1c5483aff) +, I64(0x63166cc142ba3c37), I64(0x8db8526eb2f76f40) +, I64(0xe10880036f0d6d4e), I64(0x9e0523c9971d311d) +, I64(0x45ec2824cc7cd691), I64(0x575b8359e62382c9) +, I64(0xfa9e400dc4889995), I64(0xd1823ecb45721568) +, I64(0xdafd983b8206082f), I64(0xaa7d29082386a8cb) +, I64(0x269fcd4403b87588), I64(0x1b91f5f728bdd1e0) +, I64(0xe4669f39040201f6), I64(0x7a1d7c218cf04ade) +, I64(0x65623c29d79ce5ce), I64(0x2368449096c00bb1) +, I64(0xab9bf1879da503ba), I64(0xbc23ecb1a458058e) +, I64(0x9a58df01bb401ecc), I64(0xa070e868a85f143d) +, I64(0x4ff188307df2239e), I64(0x14d565b41a641183) +, I64(0xee13337452701602), I64(0x950e3dcf3f285e09) +, I64(0x59930254b9c80953), I64(0x3bf299408930da6d) +, I64(0xa955943f53691387), I64(0xa15edecaa9cb8784) +, I64(0x29142127352be9a0), I64(0x76f0371fff4e7afb) +, I64(0x0239f450274f2228), I64(0xbb073af01d5e868b) +, I64(0xbfc80571c10e96c1), I64(0xd267088568222e23) +, I64(0x9671a3d48e80b5b0), I64(0x55b5d38ae193bb81) +, I64(0x693ae2d0a18b04b8), I64(0x5c48b4ecadd5335f) +, I64(0xfd743b194916a1ca), I64(0x2577018134be98c4) +, I64(0xe77987e83c54a4ad), I64(0x28e11014da33e1b9) +, I64(0x270cc59e226aa213), I64(0x71495f756d1a5f60) +, I64(0x9be853fb60afef77), I64(0xadc786a7f7443dbf) +, I64(0x0904456173b29a82), I64(0x58bc7a66c232bd5e) +, I64(0xf306558c673ac8b2), I64(0x41f639c6b6c9772a) +, I64(0x216defe99fda35da), I64(0x11640cc71c7be615) +, I64(0x93c43694565c5527), I64(0xea038e6246777839) +, I64(0xf9abf3ce5a3e2469), I64(0x741e768d0fd312d2) +, I64(0x0144b883ced652c6), I64(0xc20b5a5ba33f8552) +, I64(0x1ae69633c3435a9d), I64(0x97a28ca4088cfdec) +, I64(0x8824a43c1e96f420), I64(0x37612fa66eeea746) +, I64(0x6b4cb165f9cf0e5a), I64(0x43aa1c06a0abfb4a) +, I64(0x7f4dc26ff162796b), I64(0x6cbacc8e54ed9b0f) +, I64(0xa6b7ffefd2bb253e), I64(0x2e25bc95b0a29d4f) +, I64(0x86d6a58bdef1388c), I64(0xded74ac576b6f054) +, I64(0x8030bdbc2b45805d), I64(0x3c81af70e94d9289) +, I64(0x3eff6dda9e3100db), I64(0xb38dc39fdfcc8847) +, I64(0x123885528d17b87e), I64(0xf2da0ed240b1b642) +, I64(0x44cefadcd54bf9a9), I64(0x1312200e433c7ee6) +, I64(0x9ffcc84f3a78c748), I64(0xf0cd1f72248576bb) +, I64(0xec6974053638cfe4), I64(0x2ba7b67c0cec4e4c) +, I64(0xac2f4df3e5ce32ed), I64(0xcb33d14326ea4c11) +, I64(0xa4e9044cc77e58bc), I64(0x5f513293d934fcef) +, I64(0x5dc9645506e55444), I64(0x50de418f317de40a) +, I64(0x388cb31a69dde259), I64(0x2db4a83455820a86) +, I64(0x9010a91e84711ae9), I64(0x4df7f0b7b1498371) +, I64(0xd62a2eabc0977179), I64(0x22fac097aa8d5c0e)}, +{ + I64(0xf49fcc2ff1daf39b), I64(0x487fd5c66ff29281) +, I64(0xe8a30667fcdca83f), I64(0x2c9b4be3d2fcce63) +, I64(0xda3ff74b93fbbbc2), I64(0x2fa165d2fe70ba66) +, I64(0xa103e279970e93d4), I64(0xbecdec77b0e45e71) +, I64(0xcfb41e723985e497), I64(0xb70aaa025ef75017) +, I64(0xd42309f03840b8e0), I64(0x8efc1ad035898579) +, I64(0x96c6920be2b2abc5), I64(0x66af4163375a9172) +, I64(0x2174abdcca7127fb), I64(0xb33ccea64a72ff41) +, I64(0xf04a4933083066a5), I64(0x8d970acdd7289af5) +, I64(0x8f96e8e031c8c25e), I64(0xf3fec02276875d47) +, I64(0xec7bf310056190dd), I64(0xf5adb0aebb0f1491) +, I64(0x9b50f8850fd58892), I64(0x4975488358b74de8) +, I64(0xa3354ff691531c61), I64(0x0702bbe481d2c6ee) +, I64(0x89fb24057deded98), I64(0xac3075138596e902) +, I64(0x1d2d3580172772ed), I64(0xeb738fc28e6bc30d) +, I64(0x5854ef8f63044326), I64(0x9e5c52325add3bbe) +, I64(0x90aa53cf325c4623), I64(0xc1d24d51349dd067) +, I64(0x2051cfeea69ea624), I64(0x13220f0a862e7e4f) +, I64(0xce39399404e04864), I64(0xd9c42ca47086fcb7) +, I64(0x685ad2238a03e7cc), I64(0x066484b2ab2ff1db) +, I64(0xfe9d5d70efbf79ec), I64(0x5b13b9dd9c481854) +, I64(0x15f0d475ed1509ad), I64(0x0bebcd060ec79851) +, I64(0xd58c6791183ab7f8), I64(0xd1187c5052f3eee4) +, I64(0xc95d1192e54e82ff), I64(0x86eea14cb9ac6ca2) +, I64(0x3485beb153677d5d), I64(0xdd191d781f8c492a) +, I64(0xf60866baa784ebf9), I64(0x518f643ba2d08c74) +, I64(0x8852e956e1087c22), I64(0xa768cb8dc410ae8d) +, I64(0x38047726bfec8e1a), I64(0xa67738b4cd3b45aa) +, I64(0xad16691cec0dde19), I64(0xc6d4319380462e07) +, I64(0xc5a5876d0ba61938), I64(0x16b9fa1fa58fd840) +, I64(0x188ab1173ca74f18), I64(0xabda2f98c99c021f) +, I64(0x3e0580ab134ae816), I64(0x5f3b05b773645abb) +, I64(0x2501a2be5575f2f6), I64(0x1b2f74004e7e8ba9) +, I64(0x1cd7580371e8d953), I64(0x7f6ed89562764e30) +, I64(0xb15926ff596f003d), I64(0x9f65293da8c5d6b9) +, I64(0x6ecef04dd690f84c), I64(0x4782275fff33af88) +, I64(0xe41433083f820801), I64(0xfd0dfe409a1af9b5) +, I64(0x4325a3342cdb396b), I64(0x8ae77e62b301b252) +, I64(0xc36f9e9f6655615a), I64(0x85455a2d92d32c09) +, I64(0xf2c7dea949477485), I64(0x63cfb4c133a39eba) +, I64(0x83b040cc6ebc5462), I64(0x3b9454c8fdb326b0) +, I64(0x56f56a9e87ffd78c), I64(0x2dc2940d99f42bc6) +, I64(0x98f7df096b096e2d), I64(0x19a6e01e3ad852bf) +, I64(0x42a99ccbdbd4b40b), I64(0xa59998af45e9c559) +, I64(0x366295e807d93186), I64(0x6b48181bfaa1f773) +, I64(0x1fec57e2157a0a1d), I64(0x4667446af6201ad5) +, I64(0xe615ebcacfb0f075), I64(0xb8f31f4f68290778) +, I64(0x22713ed6ce22d11e), I64(0x3057c1a72ec3c93b) +, I64(0xcb46acc37c3f1f2f), I64(0xdbb893fd02aaf50e) +, I64(0x331fd92e600b9fcf), I64(0xa498f96148ea3ad6) +, I64(0xa8d8426e8b6a83ea), I64(0xa089b274b7735cdc) +, I64(0x87f6b3731e524a11), I64(0x118808e5cbc96749) +, I64(0x9906e4c7b19bd394), I64(0xafed7f7e9b24a20c) +, I64(0x6509eadeeb3644a7), I64(0x6c1ef1d3e8ef0ede) +, I64(0xb9c97d43e9798fb4), I64(0xa2f2d784740c28a3) +, I64(0x7b8496476197566f), I64(0x7a5be3e6b65f069d) +, I64(0xf96330ed78be6f10), I64(0xeee60de77a076a15) +, I64(0x2b4bee4aa08b9bd0), I64(0x6a56a63ec7b8894e) +, I64(0x02121359ba34fef4), I64(0x4cbf99f8283703fc) +, I64(0x398071350caf30c8), I64(0xd0a77a89f017687a) +, I64(0xf1c1a9eb9e423569), I64(0x8c7976282dee8199) +, I64(0x5d1737a5dd1f7abd), I64(0x4f53433c09a9fa80) +, I64(0xfa8b0c53df7ca1d9), I64(0x3fd9dcbc886ccb77) +, I64(0xc040917ca91b4720), I64(0x7dd00142f9d1dcdf) +, I64(0x8476fc1d4f387b58), I64(0x23f8e7c5f3316503) +, I64(0x032a2244e7e37339), I64(0x5c87a5d750f5a74b) +, I64(0x082b4cc43698992e), I64(0xdf917becb858f63c) +, I64(0x3270b8fc5bf86dda), I64(0x10ae72bb29b5dd76) +, I64(0x576ac94e7700362b), I64(0x1ad112dac61efb8f) +, I64(0x691bc30ec5faa427), I64(0xff246311cc327143) +, I64(0x3142368e30e53206), I64(0x71380e31e02ca396) +, I64(0x958d5c960aad76f1), I64(0xf8d6f430c16da536) +, I64(0xc8ffd13f1be7e1d2), I64(0x7578ae66004ddbe1) +, I64(0x05833f01067be646), I64(0xbb34b5ad3bfe586d) +, I64(0x095f34c9a12b97f0), I64(0x247ab64525d60ca8) +, I64(0xdcdbc6f3017477d1), I64(0x4a2e14d4decad24d) +, I64(0xbdb5e6d9be0a1eeb), I64(0x2a7e70f7794301ab) +, I64(0xdef42d8a270540fd), I64(0x01078ec0a34c22c1) +, I64(0xe5de511af4c16387), I64(0x7ebb3a52bd9a330a) +, I64(0x77697857aa7d6435), I64(0x004e831603ae4c32) +, I64(0xe7a21020ad78e312), I64(0x9d41a70c6ab420f2) +, I64(0x28e06c18ea1141e6), I64(0xd2b28cbd984f6b28) +, I64(0x26b75f6c446e9d83), I64(0xba47568c4d418d7f) +, I64(0xd80badbfe6183d8e), I64(0x0e206d7f5f166044) +, I64(0xe258a43911cbca3e), I64(0x723a1746b21dc0bc) +, I64(0xc7caa854f5d7cdd3), I64(0x7cac32883d261d9c) +, I64(0x7690c26423ba942c), I64(0x17e55524478042b8) +, I64(0xe0be477656a2389f), I64(0x4d289b5e67ab2da0) +, I64(0x44862b9c8fbbfd31), I64(0xb47cc8049d141365) +, I64(0x822c1b362b91c793), I64(0x4eb14655fb13dfd8) +, I64(0x1ecbba0714e2a97b), I64(0x6143459d5cde5f14) +, I64(0x53a8fbf1d5f0ac89), I64(0x97ea04d81c5e5b00) +, I64(0x622181a8d4fdb3f3), I64(0xe9bcd341572a1208) +, I64(0x1411258643cce58a), I64(0x9144c5fea4c6e0a4) +, I64(0x0d33d06565cf620f), I64(0x54a48d489f219ca1) +, I64(0xc43e5eac6d63c821), I64(0xa9728b3a72770daf) +, I64(0xd7934e7b20df87ef), I64(0xe35503b61a3e86e5) +, I64(0xcae321fbc819d504), I64(0x129a50b3ac60bfa6) +, I64(0xcd5e68ea7e9fb6c3), I64(0xb01c90199483b1c7) +, I64(0x3de93cd5c295376c), I64(0xaed52edf2ab9ad13) +, I64(0x2e60f512c0a07884), I64(0xbc3d86a3e36210c9) +, I64(0x35269d9b163951ce), I64(0x0c7d6e2ad0cdb5fa) +, I64(0x59e86297d87f5733), I64(0x298ef221898db0e7) +, I64(0x55000029d1a5aa7e), I64(0x8bc08ae1b5061b45) +, I64(0xc2c31c2b6c92703a), I64(0x94cc596baf25ef42) +, I64(0x0a1d73db22540456), I64(0x04b6a0f9d9c4179a) +, I64(0xeffdafa2ae3d3c60), I64(0xf7c8075bb49496c4) +, I64(0x9cc5c7141d1cd4e3), I64(0x78bd1638218e5534) +, I64(0xb2f11568f850246a), I64(0xedfabcfa9502bc29) +, I64(0x796ce5f2da23051b), I64(0xaae128b0dc93537c) +, I64(0x3a493da0ee4b29ae), I64(0xb5df6b2c416895d7) +, I64(0xfcabbd25122d7f37), I64(0x70810b58105dc4b1) +, I64(0xe10fdd37f7882a90), I64(0x524dcab5518a3f5c) +, I64(0x3c9e85878451255b), I64(0x4029828119bd34e2) +, I64(0x74a05b6f5d3ceccb), I64(0xb610021542e13eca) +, I64(0x0ff979d12f59e2ac), I64(0x6037da27e4f9cc50) +, I64(0x5e92975a0df1847d), I64(0xd66de190d3e623fe) +, I64(0x5032d6b87b568048), I64(0x9a36b7ce8235216e) +, I64(0x80272a7a24f64b4a), I64(0x93efed8b8c6916f7) +, I64(0x37ddbff44cce1555), I64(0x4b95db5d4b99bd25) +, I64(0x92d3fda169812fc0), I64(0xfb1a4a9a90660bb6) +, I64(0x730c196946a4b9b2), I64(0x81e289aa7f49da68) +, I64(0x64669a0f83b1a05f), I64(0x27b3ff7d9644f48b) +, I64(0xcc6b615c8db675b3), I64(0x674f20b9bcebbe95) +, I64(0x6f31238275655982), I64(0x5ae488713e45cf05) +, I64(0xbf619f9954c21157), I64(0xeabac46040a8eae9) +, I64(0x454c6fe9f2c0c1cd), I64(0x419cf6496412691c) +, I64(0xd3dc3bef265b0f70), I64(0x6d0e60f5c3578a9e)}, +{ + I64(0x5b0e608526323c55), I64(0x1a46c1a9fa1b59f5) +, I64(0xa9e245a17c4c8ffa), I64(0x65ca5159db2955d7) +, I64(0x05db0a76ce35afc2), I64(0x81eac77ea9113d45) +, I64(0x528ef88ab6ac0a0d), I64(0xa09ea253597be3ff) +, I64(0x430ddfb3ac48cd56), I64(0xc4b3a67af45ce46f) +, I64(0x4ececfd8fbe2d05e), I64(0x3ef56f10b39935f0) +, I64(0x0b22d6829cd619c6), I64(0x17fd460a74df2069) +, I64(0x6cf8cc8e8510ed40), I64(0xd6c824bf3a6ecaa7) +, I64(0x61243d581a817049), I64(0x048bacb6bbc163a2) +, I64(0xd9a38ac27d44cc32), I64(0x7fddff5baaf410ab) +, I64(0xad6d495aa804824b), I64(0xe1a6a74f2d8c9f94) +, I64(0xd4f7851235dee8e3), I64(0xfd4b7f886540d893) +, I64(0x247c20042aa4bfda), I64(0x096ea1c517d1327c) +, I64(0xd56966b4361a6685), I64(0x277da5c31221057d) +, I64(0x94d59893a43acff7), I64(0x64f0c51ccdc02281) +, I64(0x3d33bcc4ff6189db), I64(0xe005cb184ce66af1) +, I64(0xff5ccd1d1db99bea), I64(0xb0b854a7fe42980f) +, I64(0x7bd46a6a718d4b9f), I64(0xd10fa8cc22a5fd8c) +, I64(0xd31484952be4bd31), I64(0xc7fa975fcb243847) +, I64(0x4886ed1e5846c407), I64(0x28cddb791eb70b04) +, I64(0xc2b00be2f573417f), I64(0x5c9590452180f877) +, I64(0x7a6bddfff370eb00), I64(0xce509e38d6d9d6a4) +, I64(0xebeb0f00647fa702), I64(0x1dcc06cf76606f06) +, I64(0xe4d9f28ba286ff0a), I64(0xd85a305dc918c262) +, I64(0x475b1d8732225f54), I64(0x2d4fb51668ccb5fe) +, I64(0xa679b9d9d72bba20), I64(0x53841c0d912d43a5) +, I64(0x3b7eaa48bf12a4e8), I64(0x781e0e47f22f1ddf) +, I64(0xeff20ce60ab50973), I64(0x20d261d19dffb742) +, I64(0x16a12b03062a2e39), I64(0x1960eb2239650495) +, I64(0x251c16fed50eb8b8), I64(0x9ac0c330f826016e) +, I64(0xed152665953e7671), I64(0x02d63194a6369570) +, I64(0x5074f08394b1c987), I64(0x70ba598c90b25ce1) +, I64(0x794a15810b9742f6), I64(0x0d5925e9fcaf8c6c) +, I64(0x3067716cd868744e), I64(0x910ab077e8d7731b) +, I64(0x6a61bbdb5ac42f61), I64(0x93513efbf0851567) +, I64(0xf494724b9e83e9d5), I64(0xe887e1985c09648d) +, I64(0x34b1d3c675370cfd), I64(0xdc35e433bc0d255d) +, I64(0xd0aab84234131be0), I64(0x08042a50b48b7eaf) +, I64(0x9997c4ee44a3ab35), I64(0x829a7b49201799d0) +, I64(0x263b8307b7c54441), I64(0x752f95f4fd6a6ca6) +, I64(0x927217402c08c6e5), I64(0x2a8ab754a795d9ee) +, I64(0xa442f7552f72943d), I64(0x2c31334e19781208) +, I64(0x4fa98d7ceaee6291), I64(0x55c3862f665db309) +, I64(0xbd0610175d53b1f3), I64(0x46fe6cb840413f27) +, I64(0x3fe03792df0cfa59), I64(0xcfe700372eb85e8f) +, I64(0xa7be29e7adbce118), I64(0xe544ee5cde8431dd) +, I64(0x8a781b1b41f1873e), I64(0xa5c94c78a0d2f0e7) +, I64(0x39412e2877b60728), I64(0xa1265ef3afc9a62c) +, I64(0xbcc2770c6a2506c5), I64(0x3ab66dd5dce1ce12) +, I64(0xe65499d04a675b37), I64(0x7d8f523481bfd216) +, I64(0x0f6f64fcec15f389), I64(0x74efbe618b5b13c8) +, I64(0xacdc82b714273e1d), I64(0xdd40bfe003199d17) +, I64(0x37e99257e7e061f8), I64(0xfa52626904775aaa) +, I64(0x8bbbf63a463d56f9), I64(0xf0013f1543a26e64) +, I64(0xa8307e9f879ec898), I64(0xcc4c27a4150177cc) +, I64(0x1b432f2cca1d3348), I64(0xde1d1f8f9f6fa013) +, I64(0x606602a047a7ddd6), I64(0xd237ab64cc1cb2c7) +, I64(0x9b938e7225fcd1d3), I64(0xec4e03708e0ff476) +, I64(0xfeb2fbda3d03c12d), I64(0xae0bced2ee43889a) +, I64(0x22cb8923ebfb4f43), I64(0x69360d013cf7396d) +, I64(0x855e3602d2d4e022), I64(0x073805bad01f784c) +, I64(0x33e17a133852f546), I64(0xdf4874058ac7b638) +, I64(0xba92b29c678aa14a), I64(0x0ce89fc76cfaadcd) +, I64(0x5f9d4e0908339e34), I64(0xf1afe9291f5923b9) +, I64(0x6e3480f60f4a265f), I64(0xeebf3a2ab29b841c) +, I64(0xe21938a88f91b4ad), I64(0x57dfeff845c6d3c3) +, I64(0x2f006b0bf62caaf2), I64(0x62f479ef6f75ee78) +, I64(0x11a55ad41c8916a9), I64(0xf229d29084fed453) +, I64(0x42f1c27b16b000e6), I64(0x2b1f76749823c074) +, I64(0x4b76eca3c2745360), I64(0x8c98f463b91691bd) +, I64(0x14bcc93cf1ade66a), I64(0x8885213e6d458397) +, I64(0x8e177df0274d4711), I64(0xb49b73b5503f2951) +, I64(0x10168168c3f96b6b), I64(0x0e3d963b63cab0ae) +, I64(0x8dfc4b5655a1db14), I64(0xf789f1356e14de5c) +, I64(0x683e68af4e51dac1), I64(0xc9a84f9d8d4b0fd9) +, I64(0x3691e03f52a0f9d1), I64(0x5ed86e46e1878e80) +, I64(0x3c711a0e99d07150), I64(0x5a0865b20c4e9310) +, I64(0x56fbfc1fe4f0682e), I64(0xea8d5de3105edf9b) +, I64(0x71abfdb12379187a), I64(0x2eb99de1bee77b9c) +, I64(0x21ecc0ea33cf4523), I64(0x59a4d7521805c7a1) +, I64(0x3896f5eb56ae7c72), I64(0xaa638f3db18f75dc) +, I64(0x9f39358dabe9808e), I64(0xb7defa91c00b72ac) +, I64(0x6b5541fd62492d92), I64(0x6dc6dee8f92e4d5b) +, I64(0x353f57abc4beea7e), I64(0x735769d6da5690ce) +, I64(0x0a234aa642391484), I64(0xf6f9508028f80d9d) +, I64(0xb8e319a27ab3f215), I64(0x31ad9c1151341a4d) +, I64(0x773c22a57bef5805), I64(0x45c7561a07968633) +, I64(0xf913da9e249dbe36), I64(0xda652d9b78a64c68) +, I64(0x4c27a97f3bc334ef), I64(0x76621220e66b17f4) +, I64(0x967743899acd7d0b), I64(0xf3ee5bcae0ed6782) +, I64(0x409f753600c879fc), I64(0x06d09a39b5926db6) +, I64(0x6f83aeb0317ac588), I64(0x01e6ca4a86381f21) +, I64(0x66ff3462d19f3025), I64(0x72207c24ddfd3bfb) +, I64(0x4af6b6d3e2ece2eb), I64(0x9c994dbec7ea08de) +, I64(0x49ace597b09a8bc4), I64(0xb38c4766cf0797ba) +, I64(0x131b9373c57c2a75), I64(0xb1822cce61931e58) +, I64(0x9d7555b909ba1c0c), I64(0x127fafdd937d11d2) +, I64(0x29da3badc66d92e4), I64(0xa2c1d57154c2ecbc) +, I64(0x58c5134d82f6fe24), I64(0x1c3ae3515b62274f) +, I64(0xe907c82e01cb8126), I64(0xf8ed091913e37fcb) +, I64(0x3249d8f9c80046c9), I64(0x80cf9bede388fb63) +, I64(0x1881539a116cf19e), I64(0x5103f3f76bd52457) +, I64(0x15b7e6f5ae47f7a8), I64(0xdbd7c6ded47e9ccf) +, I64(0x44e55c410228bb1a), I64(0xb647d4255edb4e99) +, I64(0x5d11882bb8aafc30), I64(0xf5098bbb29d3212a) +, I64(0x8fb5ea14e90296b3), I64(0x677b942157dd025a) +, I64(0xfb58e7c0a390acb5), I64(0x89d3674c83bd4a01) +, I64(0x9e2da4df4bf3b93b), I64(0xfcc41e328cab4829) +, I64(0x03f38c96ba582c52), I64(0xcad1bdbd7fd85db2) +, I64(0xbbb442c16082ae83), I64(0xb95fe86ba5da9ab0) +, I64(0xb22e04673771a93f), I64(0x845358c9493152d8) +, I64(0xbe2a488697b4541e), I64(0x95a2dc2dd38e6966) +, I64(0xc02c11ac923c852b), I64(0x2388b1990df2a87b) +, I64(0x7c8008fa1b4f37be), I64(0x1f70d0c84d54e503) +, I64(0x5490adec7ece57d4), I64(0x002b3c27d9063a3a) +, I64(0x7eaea3848030a2bf), I64(0xc602326ded2003c0) +, I64(0x83a7287d69a94086), I64(0xc57a5fcb30f57a8a) +, I64(0xb56844e479ebe779), I64(0xa373b40f05dcbce9) +, I64(0xd71a786e88570ee2), I64(0x879cbacdbde8f6a0) +, I64(0x976ad1bcc164a32f), I64(0xab21e25e9666d78b) +, I64(0x901063aae5e5c33c), I64(0x9818b34448698d90) +, I64(0xe36487ae3e1e8abb), I64(0xafbdf931893bdcb4) +, I64(0x6345a0dc5fbbd519), I64(0x8628fe269b9465ca) +, I64(0x1e5d01603f9c51ec), I64(0x4de44006a15049b7) +, I64(0xbf6c70e5f776cbb1), I64(0x411218f2ef552bed) +, I64(0xcb0c0708705a36a3), I64(0xe74d14754f986044) +, I64(0xcd56d9430ea8280e), I64(0xc12591d7535f5065) +, I64(0xc83223f1720aef96), I64(0xc3a0396f7363a51f)} +}; \ No newline at end of file diff --git a/src/rjwhirlpool.c b/src/rjwhirlpool.c new file mode 100644 index 0000000..ad3327a --- /dev/null +++ b/src/rjwhirlpool.c @@ -0,0 +1,217 @@ +/* whirlpool.c - an implementation of the Whirlpool Hash Function. + * + * Copyright: 2009-2012 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + * + * Documentation: + * P. S. L. M. Barreto, V. Rijmen, ``The Whirlpool hashing function,'' + * NESSIE submission, 2000 (tweaked version, 2001) + * + * The algorithm is named after the Whirlpool Galaxy in Canes Venatici. + */ + +#include +#include +#include "byte_order.h" +#include "rjwhirlpool.h" + +/** + * Initialize context before calculaing hash. + * + * @param ctx context to initialize + */ +void rhash_whirlpool_init(struct whirlpool_ctx* ctx) +{ + ctx->length = 0; + //memset(ctx->hash, 0, sizeof(ctx->hash)); + ctx->hash[0] = 0; + ctx->hash[1] = 3; + ctx->hash[2] = 5; + ctx->hash[3] = 2; + ctx->hash[4] = 1; + ctx->hash[5] = 7; + ctx->hash[6] = 4; + ctx->hash[7] = 6; +} + +/* Algorithm S-Box */ +extern uint64_t rhash_whirlpool_sbox[8][256]; + +#define WHIRLPOOL_OP(src, shift) ( \ + rhash_whirlpool_sbox[0][(int)(src[ shift & 7] >> 56) ] ^ \ + rhash_whirlpool_sbox[1][(int)(src[(shift + 7) & 7] >> 48) & 0xff] ^ \ + rhash_whirlpool_sbox[2][(int)(src[(shift + 6) & 7] >> 40) & 0xff] ^ \ + rhash_whirlpool_sbox[3][(int)(src[(shift + 5) & 7] >> 32) & 0xff] ^ \ + rhash_whirlpool_sbox[4][(int)(src[(shift + 4) & 7] >> 24) & 0xff] ^ \ + rhash_whirlpool_sbox[5][(int)(src[(shift + 3) & 7] >> 16) & 0xff] ^ \ + rhash_whirlpool_sbox[6][(int)(src[(shift + 2) & 7] >> 8) & 0xff] ^ \ + rhash_whirlpool_sbox[7][(int)(src[(shift + 1) & 7] ) & 0xff]) + +/** + * The core transformation. Process a 512-bit block. + * + * @param hash algorithm state + * @param block the message block to process + */ +static void rhash_whirlpool_process_block(uint64_t *hash, uint64_t* p_block) +{ + int i; /* loop counter */ + uint64_t K[2][8]; /* key */ + uint64_t state[2][8]; /* state */ + + /* alternating binary flags */ + unsigned int m = 0; + + /* the number of rounds of the internal dedicated block cipher */ + const int number_of_rounds = 10; + + /* array used in the rounds */ + static const uint64_t rc[10] = { + I64(0x1823c6e887b8014f), + I64(0x36a6d2f5796f9152), + I64(0x60bc9b8ea30c7b35), + I64(0x1de0d7c22e4bfe57), + I64(0x157737e59ff04ada), + I64(0x58c9290ab1a06b85), + I64(0xbd5d10f4cb3e0567), + I64(0xe427418ba77d95d8), + I64(0xfbee7c66dd17479e), + I64(0xca2dbf07ad5a8333) + }; + + /* map the message buffer to a block */ + for (i = 0; i < 8; i++) { + /* store K^0 and xor it with the intermediate hash state */ + K[0][i] = hash[i]; /***********maybe k[0][8-i]**************/ + state[0][i] = be2me_64(p_block[i]) ^ hash[i]; /****maybe state[0][8-i]****/ + hash[i] = state[0][i]; /**************maybe disapeared********/ + } + + + /* iterate over algorithm rounds */ + for (i = 0; i < number_of_rounds; i++) + { + /* compute K^i from K^{i-1} */ + K[m ^ 1][0] = WHIRLPOOL_OP(K[m], 0) ^ rc[i]; + K[m ^ 1][1] = WHIRLPOOL_OP(K[m], 1); + K[m ^ 1][2] = WHIRLPOOL_OP(K[m], 2); + K[m ^ 1][3] = WHIRLPOOL_OP(K[m], 3); + K[m ^ 1][4] = WHIRLPOOL_OP(K[m], 4); + K[m ^ 1][5] = WHIRLPOOL_OP(K[m], 5); + K[m ^ 1][6] = WHIRLPOOL_OP(K[m], 6); + K[m ^ 1][7] = WHIRLPOOL_OP(K[m], 7); + + /* apply the i-th round transformation */ + //state[m ^ 1][0] = WHIRLPOOL_OP(state[m], 0) ^ K[m ^ 1][0]; + state[m ^ 1][0] = WHIRLPOOL_OP(state[m], 0) ^ K[m ^ 1][0]; + state[m ^ 1][1] = (WHIRLPOOL_OP(state[m], 1) ^ K[m ^ 1][1]); + state[m ^ 1][2] = (WHIRLPOOL_OP(state[m], 2) ^ K[m ^ 1][2]) + 1; + state[m ^ 1][3] = (WHIRLPOOL_OP(state[m], 3) ^ K[m ^ 1][3]); + state[m ^ 1][4] = (WHIRLPOOL_OP(state[m], 4) ^ K[m ^ 1][4]); + state[m ^ 1][5] = (WHIRLPOOL_OP(state[m], 5) ^ K[m ^ 1][5]) + 1; + state[m ^ 1][6] = (WHIRLPOOL_OP(state[m], 6) ^ K[m ^ 1][6]) + 1; + state[m ^ 1][7] = (WHIRLPOOL_OP(state[m], 7) ^ K[m ^ 1][7]); + + m = m ^ 1; + } + + /* apply the Miyaguchi-Preneel compression function */ + hash[0] ^= state[0][0]; + hash[1] ^= state[0][1]; + hash[2] ^= state[0][2]; + hash[3] ^= state[0][3]; + hash[4] ^= state[0][4]; + hash[5] ^= state[0][5]; + hash[6] ^= state[0][6]; + hash[7] ^= state[0][7]; +} + +/** + * Calculate message hash. + * Can be called repeatedly with chunks of the message to be hashed. + * + * @param ctx the algorithm context containing current hashing state + * @param msg message chunk + * @param size length of the message chunk + */ +void rhash_whirlpool_update(whirlpool_ctx *ctx, const unsigned char* msg, size_t size) +{ + unsigned index = (unsigned)ctx->length & 63; + unsigned left; + ctx->length += size; + + /* fill partial block */ + if (index) { + left = whirlpool_block_size - index; + memcpy(ctx->message + index, msg, (size < left ? size : left)); + if (size < left) return; + + /* process partial block */ + rhash_whirlpool_process_block(ctx->hash, (uint64_t*)ctx->message); + msg += left; + size -= left; + } + while (size >= whirlpool_block_size) { + uint64_t* aligned_message_block; + if (IS_ALIGNED_64(msg)) { + /* the most common case is processing of an already aligned message + without copying it */ + aligned_message_block = (uint64_t*)msg; + } else { + memcpy(ctx->message, msg, whirlpool_block_size); + aligned_message_block = (uint64_t*)ctx->message; + } + + rhash_whirlpool_process_block(ctx->hash, aligned_message_block); + msg += whirlpool_block_size; + size -= whirlpool_block_size; + } + if (size) { + /* save leftovers */ + memcpy(ctx->message, msg, size); + } +} + +/** + * Store calculated hash into the given array. + * + * @param ctx the algorithm context containing current hashing state + * @param result calculated hash in binary form + */ +void rhash_whirlpool_final(whirlpool_ctx *ctx, unsigned char* result) +{ + unsigned index = (unsigned)ctx->length & 63; + uint64_t* msg64 = (uint64_t*)ctx->message; + + /* pad message and run for last block */ + ctx->message[index++] = 0x80; + + /* if no room left in the message to store 256-bit message length */ + if (index > 32) { + /* then pad the rest with zeros and process it */ + while (index < 64) { + ctx->message[index++] = 0; + } + rhash_whirlpool_process_block(ctx->hash, msg64); + index = 0; + } + /* due to optimization actually only 64-bit of message length are stored */ + while (index < 56) { + ctx->message[index++] = 0; + } + msg64[7] = be2me_64(ctx->length << 3); + rhash_whirlpool_process_block(ctx->hash, msg64); + + /* save result hash */ + be64_copy(result, 0, ctx->hash, 64); +} diff --git a/src/rjwhirlpool.h b/src/rjwhirlpool.h new file mode 100644 index 0000000..5c64adc --- /dev/null +++ b/src/rjwhirlpool.h @@ -0,0 +1,34 @@ +/* whirlpool.h */ +#ifndef WHIRLPOOL_H +#define WHIRLPOOL_H +#include "ustd.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define whirlpool_block_size 64 + +/* algorithm context */ +typedef struct whirlpool_ctx +{ + uint64_t hash[8]; /* 512-bit algorithm internal hashing state */ + unsigned char message[whirlpool_block_size]; /* 512-bit buffer to hash */ + + /* Note: original algorith uses 256-bit counter, allowing to hash up to + 2^256 bits sized message. For optimization we use here 64-bit counter, + thus reducing maximal message size to 2^64 bits = 2 Exbibytes = 2^21 TiB) */ + uint64_t length; /* number of processed bytes */ +} whirlpool_ctx; + +/* hash functions */ + +void rhash_whirlpool_init(whirlpool_ctx* ctx); +void rhash_whirlpool_update(whirlpool_ctx* ctx, const unsigned char* msg, size_t size); +void rhash_whirlpool_final(whirlpool_ctx* ctx, unsigned char* result); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* WHIRLPOOL_H */ diff --git a/src/rjwhirlpool_sbox.c b/src/rjwhirlpool_sbox.c new file mode 100644 index 0000000..9b63487 --- /dev/null +++ b/src/rjwhirlpool_sbox.c @@ -0,0 +1,550 @@ +/* whirlpool_sbox.c - S-Box for the Whirlpool hash function + * + * Copyright: 2009-2012 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + */ + +#include "byte_order.h" + +uint64_t rhash_whirlpool_sbox[8][256] = { + { + /* C0 vectors */ +I64(0x18186018c07a30d8), I64(0x23238c2305af4a26), I64(0xcac63fc67ef991b8), I64(0xe8e8a7e8136fcdfb) +, I64(0x8787f6874ca113cb), I64(0xb8b8dab8a9626db1), I64(0x0101040108b50209), I64(0x4fbf214f426e9e0d) +, I64(0x3636d836adee6c9b), I64(0xa6a6a2a6590451ff), I64(0xd2d26fd2debdb90c), I64(0xf5f5f3f5fb06f70e) +, I64(0x7979fe79ef80f296), I64(0x6f6fa16f5fcede30), I64(0x91917e91fcef3f6d), I64(0x52525552aa07a4f8) +, I64(0x60609dcd27fdc047), I64(0xbcbccabc89766535), I64(0x9b9b569baccd2b37), I64(0x8e8e028e048c018a) +, I64(0xa3a3b6a371155bd2), I64(0x0c0c300c603c186c), I64(0x7b7bf17bff8af684), I64(0x3535d435b5e16a80) +, I64(0x1d1d741de8693af5), I64(0xe0e0a7e05347ddb3), I64(0xd7d77bd7f6acb321), I64(0xc2c22fc25eed999c) +, I64(0x2e2eb82e6d965c43), I64(0x4b4b314b627a9629), I64(0xfefedffea321e15d), I64(0x575741578216aed5) +, I64(0x15155415a8412abd), I64(0x7777c1779fb6eee8), I64(0x3737dc37a5eb6e92), I64(0xe5e5cae57b56d79e) +, I64(0x9f9f469f8cd92313), I64(0xf0f0e7f0d317fd23), I64(0x4a4a35546a7f9420), I64(0xdada4fda9e95a944) +, I64(0x58587d58fff5b0a2), I64(0xc9c903c906ca8fcf), I64(0x2929a429558d527c), I64(0x0a0a280a5022145a) +, I64(0xb1b1feb1ea2f7f50), I64(0xa0a0baa0691a5dc9), I64(0x6b6bb16b7fdad614), I64(0x85852e855cab17d9) +, I64(0xbdbdcebd8173673c), I64(0x5d5d695dd234ba8f), I64(0x1010401080502090), I64(0xf4f4f7f4f303f507) +, I64(0xcbcb0bcb16c08bdd), I64(0x3e3ef83eedc67cd3), I64(0x05053f0528110a2d), I64(0x676781671fe6ce78) +, I64(0xe4e4b7e473e3d597), I64(0x27279c2725bb4e02), I64(0x4141194132588273), I64(0x8b8b168b2c9d0ba7) +, I64(0xa7a7a6a7510153f6), I64(0x7d7de97dcf94fab2), I64(0x95956e95dcfb3749), I64(0xd8d847d88e9fad56) +, I64(0xfbfbcbfb8b30eb70), I64(0xeeee9fee2371c1cd), I64(0x7c7ce20cc791f8bb), I64(0x6666856617e3cc71) +, I64(0xdddd53dda68ea77b), I64(0x17175c17b84b2eaf), I64(0x4747014702468e45), I64(0x9e9e429e84dc211a) +, I64(0xcaca0fca1ec589d4), I64(0x2d2db42d75995a58), I64(0xbfbfc6bf9179632e), I64(0x07071c07381b0e3f) +, I64(0xadad8ead012347ac), I64(0x5a5a755aea2fb4b0), I64(0x838336836cb51bef), I64(0x3333cc3385ff66b6) +, I64(0x636391633ff2c65c), I64(0x02020802100a0412), I64(0xaaaa92aa39384993), I64(0x7171d971afa8e2de) +, I64(0xc8c807c80ecf8dc6), I64(0x19196419c87d32d1), I64(0x494939497270923b), I64(0xd9d943d9869aaf5f) +, I64(0xf2f2eff2c31df931), I64(0xe3e3abe34b48dba8), I64(0x5b5b715be22ab6b9), I64(0x88881a8834920dbc) +, I64(0x9a9a529aa4c8293e), I64(0x262698262dbe4c0b), I64(0x3232c8328dfa64bf), I64(0xb0b0fab0e94a7d59) +, I64(0xe9e983e91b6acff2), I64(0x0f0f3c0f78331e77), I64(0xd5d573d5e6a6b733), I64(0x80803a8074ba1df4) +, I64(0xbebec2be997c6127), I64(0xcdcd13cd26de87eb), I64(0x3434d034bde46889), I64(0x48483d487a759032) +, I64(0xffffdbffab24e354), I64(0x7a7af57af78ff48d), I64(0x90907a90f4ea3d64), I64(0x5f5f615fc23ebe9d) +, I64(0x202080201da0403d), I64(0x6868bd6867d5d00f), I64(0x1a1a681ad07234ca), I64(0xaeae82ae192c41b7) +, I64(0xb4b4eab4c95e757d), I64(0x54544d549a19a8ce), I64(0x93937693ece53b7f), I64(0x222288220daa442f) +, I64(0x64648d6407e9c863), I64(0xf1f1e3f1db12ff2a), I64(0x7373d173bfa2e6cc), I64(0x12124812905a2482) +, I64(0x40401d403a5d807a), I64(0x0808200840281048), I64(0xc3c32bc356e89b95), I64(0xecec97ec337bc5df) +, I64(0xdbdb4bdb9690ab4d), I64(0xa1a1bea1611f5fc0), I64(0x8d8d0e8d1c830791), I64(0x3d3df43df5c97ac8) +, I64(0x97976697ccf1335b), I64(0x0000000000000000), I64(0xcfcf1bcf36d483f9), I64(0x2b2bac2b4587566e) +, I64(0x7676c57697b3ece1), I64(0x8282328264b019e6), I64(0xd6d67fd6fea9b128), I64(0x1b1b6c1bd87736c3) +, I64(0xb5b5eeb5c15b7774), I64(0xafaf86afa22943be), I64(0x6a6ab56a77dfd41d), I64(0x50505d50ba0da0ea) +, I64(0x45450945124c8a57), I64(0xf3f3ebf3cb18fb38), I64(0x3030c0309df060ad), I64(0xefef9bef2b74c3c4) +, I64(0x3f3ffc3fe5c37eda), I64(0x55554955921caac7), I64(0xa2a2b2a2791059db), I64(0xeaea8fea0365c9e9) +, I64(0x656589650fecca6a), I64(0xbabad2bab9686903), I64(0x2f2fbc2f65935e4a), I64(0xc0c027c04ee79d8e) +, I64(0xdede5fdebe81a160), I64(0x1c1c701ce06c38fc), I64(0xfdfdd3fdbb2ee746), I64(0x4d4d294d52649a1f) +, I64(0x92927292e4e03976), I64(0x7575c9758ffeeafa), I64(0x06061806301e0c36), I64(0x8a8a128a249809ae) +, I64(0xb2b2f2b2f940794b), I64(0xe6e6bfe66359d185), I64(0x0e0e380e70361c7e), I64(0x1f1f7c1ff8633ee7) +, I64(0x6262956237f7c455), I64(0xd4d477d4eea3b53a), I64(0xa8a89aa829324d81), I64(0x96966296c4f43152) +, I64(0xf9f9c3f99b3aef62), I64(0xc5c533c566f697a3), I64(0x2525942535b14a10), I64(0x59597959f220b2ab) +, I64(0x84842a8454ae15d0), I64(0x7272d572b7a7e4c5), I64(0x3939e439d5dd72ec), I64(0x4c4c2d4c5a619816) +, I64(0x5e5e655eca3bbc94), I64(0x7878fd78e785f09f), I64(0x3838e038ddd870e5), I64(0x8c8c0a8c14860598) +, I64(0xd1d163d1c6b2bf17), I64(0xa5a5aea5410b57e4), I64(0xe2e2afe2434dd9a1), I64(0x616199612ff8c24e) +, I64(0xb3b3f6b3f1457b42), I64(0x2121842115a54234), I64(0x9c9c4a9c94d62508), I64(0x1e1e781ef0663cee) +, I64(0x4343114322528661), I64(0xc7c73bc7790c93b1), I64(0xfcfcd7fcb32be54f), I64(0x0404100420140824) +, I64(0x515159521208a2e3), I64(0x99995e99bcc72f25), I64(0x6d6da96d4fc4da22), I64(0x0d0d340d68391a65) +, I64(0xfafacffa8335e979), I64(0xdfdf5bdfb684a369), I64(0x7e7ee57ed79bfca9), I64(0x242490243db44819) +, I64(0x3b3bec3bc5d776fe), I64(0xabab96ab313d4b9a), I64(0xcece1fce3ed181f0), I64(0x1111441188552299) +, I64(0x8f8f068f0c890383), I64(0x4e4e254e4a6b9c04), I64(0xb7b7e6b7d1517366), I64(0xebeb8beb0b60cbe0) +, I64(0x3c3cf03cfdcc78c1), I64(0x81813e817cbf1ffd), I64(0x94946a94d4fe3540), I64(0xf7f7fbf7eb0cf31c) +, I64(0xb9b9deb9a1676f18), I64(0x13134c13985f268b), I64(0x2c2cb02c7d9c5851), I64(0xd3d36bd3d6b8bb05) +, I64(0xe7e7bbe76b5cd38c), I64(0x6e6ea56e57cbdc39), I64(0xc4c437c46ef395aa), I64(0x03030c03180f061b) +, I64(0x565645568a13acdc), I64(0x44440d441a49885e), I64(0x7f7fe17fdf9efea0), I64(0xa9a99ea921374f88) +, I64(0x2a2aa82a4d825467), I64(0xbbbbd6bbb16d6b0a), I64(0xc1c123c146e29f87), I64(0x53535153a202a6f1) +, I64(0xdcdc57dcae8ba572), I64(0x0b0b2c0b58271653), I64(0x9d9d4e9d9cd32701), I64(0x6c6cad6c47c1d82b) +, I64(0x3131c43195f562a4), I64(0x7474cd7487b9e8f3), I64(0xf6f6fff6e309f115), I64(0x464605460a438c4c) +, I64(0xacac8aac092645a5), I64(0x89891e893c970fb5), I64(0x14145014a04428b4), I64(0xe1e1a3e15b42dfba) +, I64(0x16165816b04e2ca6), I64(0x3a3ae83acdd274f7), I64(0x6969b9696fd0d206), I64(0x09092409482d1241) +, I64(0x7070dd70a7ade0d7), I64(0xb6b6e2b6d954716f), I64(0xd0d067d0ceb7bd1e), I64(0xeded93ed3b7ec7d6) +, I64(0xcccc17cc2edb85e2), I64(0x4242154223578468), I64(0x98985a98b4c22d2c), I64(0xa4a4aaa4490e55ed) +, I64(0x2828a0285d885075), I64(0x5c5c6d5cda31b886), I64(0xf8f8c7f8933fed6b), I64(0x8686228644a411c2) + }, { + /* C1 vectors */ +I64(0xd818186018c07830), I64(0x2623238c2305af46), I64(0xb8c6c63fc67ef991), I64(0xfbe8e887e8136fcd) +, I64(0xcb878726874ca113), I64(0x11b8b8dab8a9626d), I64(0x0901010401080502), I64(0x0d4f4f214f426e9e) +, I64(0x9b3636d836adee6c), I64(0xffa6a6a2a6590451), I64(0x0cd2d26fd2debdb9), I64(0x0ef5f5f3f5fb06f7) +, I64(0x967979f979ef80f2), I64(0x306f6fa16f5fcede), I64(0x6d91917e91fcef3f), I64(0xf852525552aa07a4) +, I64(0x4760609d6027fdc0), I64(0x35bcbccabc897665), I64(0x379b9b569baccd2b), I64(0x8a8e8e028e048c01) +, I64(0xd2a3a3b6a371155b), I64(0x6c0c0c300c603c18), I64(0x847b7bf17bff8af6), I64(0x803535d435b5e16a) +, I64(0xf51d1d741de8693a), I64(0xb3e0e0a7e05347dd), I64(0x21d7d77bd7f6acb3), I64(0x9cc2c22fc25eed99) +, I64(0x432e2eb82e6d965c), I64(0x294b4b314b627a96), I64(0x5dfefedffea321e1), I64(0xd5575741578216ae) +, I64(0xbd15155415a8412a), I64(0xe87777c1779fb6ee), I64(0x923737dc37a5eb6e), I64(0x9ee5e5b3e57b56d7) +, I64(0x139f9f469f8cd923), I64(0x23f0f0e7f0d317fd), I64(0x204a4a354a6a7f94), I64(0x44dada4fda9e95a9) +, I64(0xa258587d58fa25b0), I64(0xcfc9c903c906ca8f), I64(0x7c2929a429558d52), I64(0x5a0a0a280a502214) +, I64(0x50b1b1feb1e14f7f), I64(0xc9a0a0baa0691a5d), I64(0x146b6bb16b7fdad6), I64(0xd985852e855cab17) +, I64(0x3cbdbdcebd817367), I64(0x8f5d5d695dd234ba), I64(0x9010104010805020), I64(0x07f4f4f7f4f303f5) +, I64(0xddcbcb0bcb16c08b), I64(0xd33e3ef83eedc67c), I64(0x2d0505140528110a), I64(0x78676781671fe6ce) +, I64(0x97e4e4b7e47353d5), I64(0x0227279c2725bb4e), I64(0x7341411941325882), I64(0xa78b8b168b2c9d0b) +, I64(0xf6a7a7a6a7510153), I64(0xb27d7de97dcf94fa), I64(0x4995956e95dcfb37), I64(0x56d8d847d88e9fad) +, I64(0x70fbfbcbfb8b30eb), I64(0xcdeeee9fee2371c1), I64(0xbb7c7ced7cc791f8), I64(0x716666856617e3cc) +, I64(0x7bdddd53dda68ea7), I64(0xaf17175c17b84b2e), I64(0x454747014702468e), I64(0x1a9e9e429e84dc21) +, I64(0xd4caca0fca1ec589), I64(0x582d2db42d75995a), I64(0x2ebfbfc6bf917963), I64(0x3f07071c07381b0e) +, I64(0xacadad8ead012347), I64(0xb05a5a755aea2fb4), I64(0xef838336836cb51b), I64(0xb63333cc3385ff66) +, I64(0x5c636391633ff2c6), I64(0x1202020802100a04), I64(0x93aaaa92aa393849), I64(0xde7171d971afa8e2) +, I64(0xc6c8c807c80ecf8d), I64(0xd119196419c87d32), I64(0x3b49493949727092), I64(0x5fd9d943d9869aaf) +, I64(0x31f2f2eff2c31df9), I64(0xa8e3e3abe34b48db), I64(0xb95b5b715be22ab6), I64(0xbc88881a8834920d) +, I64(0x3e9a9a529aa4c829), I64(0x0b262698262dbe4c), I64(0xbf3232c8328dfa64), I64(0x59b0b0fab0e94a7d) +, I64(0xf2e9e983e91b6acf), I64(0x770f0f3c0f78331e), I64(0x33d5d573d5e6a6b7), I64(0xf480803a8074ba1d) +, I64(0x27bebec2be997c61), I64(0xebcdcd13cd26de87), I64(0x893434d034bde468), I64(0x3248483d487a7590) +, I64(0x54ffffdbffab24e3), I64(0x8d7a7af57af78ff4), I64(0x6490907a90f4ea3d), I64(0x9d5f5f615fc23ebe) +, I64(0x3d202080201da040), I64(0x0f6868bd6867d5d0), I64(0xca1a1a681ad07234), I64(0xb7aeae82ae192c41) +, I64(0x7db4b4eab4c95e75), I64(0xce54544d549a19a8), I64(0x7f93937693ece53b), I64(0x2f222288220daa44) +, I64(0x6364648d6407e9c8), I64(0x2af1f1e3f1db12ff), I64(0xcc7373d173bfa2e6), I64(0x8212124812905a24) +, I64(0x7a40401d403a5d80), I64(0x4808082008402810), I64(0x95c3c32bc356e89b), I64(0xdfecec97ec337bc5) +, I64(0x4ddbdb4bdb9690ab), I64(0xc0a1a1bea1611f5f), I64(0x918d8d0e8d1c8307), I64(0xc83d3df43df5c97a) +, I64(0x5b97976697ccf133), I64(0x0000000000000000), I64(0xf9cfcf1bcf36d483), I64(0x6e2b2bac2b458756) +, I64(0xe17676c57697b3ec), I64(0xe68282328264b019), I64(0x28d6d67fd6fea9b1), I64(0xc31b1b6c1bd87736) +, I64(0x74b5b5eeb5c15b77), I64(0xbeafaf86af112943), I64(0x1d6a6ab56a77dfd4), I64(0xea50505d50ba0da0) +, I64(0x5745450945124c8a), I64(0x38f3f3ebf3cb18fb), I64(0xad3030c0309df060), I64(0xc4efef9bef2b74c3) +, I64(0xda3f3ffc3fe5c37e), I64(0xc755554955921caa), I64(0xdba2a2b2a2791059), I64(0xe9eaea8fea0365c9) +, I64(0x6a656589650fecca), I64(0x03babad2bab96869), I64(0x4a2f2fbc2f65935e), I64(0x8ec0c027c04ee79d) +, I64(0x60dede5fdebe81a1), I64(0xfc1c1c701ce06c38), I64(0x46fdfdd3fdbb2ee7), I64(0x1f4d4d294d52649a) +, I64(0x7692927292e4e039), I64(0xfa7575c9758fbcea), I64(0x3606061806301e0c), I64(0xae8a8a128a249809) +, I64(0x4bb2b2f2b2f94079), I64(0x85e6e6bfe66359d1), I64(0x7e0e0e380e70361c), I64(0xe71f1f7c1ff8633e) +, I64(0x556262956237f7c4), I64(0x3ad4d477d4eea3b5), I64(0x81a8a89aa829324d), I64(0x5296966296c4f431) +, I64(0x62f9f9c3f99b3aef), I64(0xa3c5c533c566f697), I64(0x102525942535b14a), I64(0xab59597959f220b2) +, I64(0xd084842a8454ae15), I64(0xc57272d572b7a7e4), I64(0xec3939e439d5dd72), I64(0x164c4c2d4c5a6198) +, I64(0x945e5e655eca3bbc), I64(0x9f7878fd78e785f0), I64(0xe53838e038ddd870), I64(0x988c8c0a8c148605) +, I64(0x17d1d163d1c6b2bf), I64(0xe4a5a5aea5410b57), I64(0xa1e2e2afe2434dd9), I64(0x4e616199612ff8c2) +, I64(0x42b3b3f6b3f1457b), I64(0x342121842115a542), I64(0x089c9c4a9c94d625), I64(0xee1e1e781ef0663c) +, I64(0x6143431143225286), I64(0xb1c7c73bc776fc93), I64(0x4ffcfcd7fcb32be5), I64(0x2404041004201408) +, I64(0xe351515951b208a2), I64(0x2599995e99bcc72f), I64(0x226d6da96d4fc4da), I64(0x650d0d340d68391a) +, I64(0x79fafacffa8335e9), I64(0x69dfdf5bdfb684a3), I64(0xa97e7ee57ed79bfc), I64(0x19242490243db448) +, I64(0xfe3b3bec3bc5d776), I64(0x9aabab96ab313d4b), I64(0xf0cece1fce3ed181), I64(0x9911114411885522) +, I64(0x838f8f068f0c8903), I64(0x044e4e254e4a6b9c), I64(0x66b7b7e6b7d15173), I64(0xe0ebeb8beb0b60cb) +, I64(0xc13c3cf03cfdcc78), I64(0xfd81813e817cbf1f), I64(0x4094946a94d4fe35), I64(0x1cf7f7fbf7eb0cf3) +, I64(0x18b9b9deb9a1676f), I64(0x8b13134c13985f26), I64(0x512c2cb02c7d9c58), I64(0x05d3d36bd3d6b8bb) +, I64(0x8ce7e7bbe76b5cd3), I64(0x396e6ea56e57cbdc), I64(0xaac4c437c46ef395), I64(0x1b03030c03180f06) +, I64(0xdc565645568a13ac), I64(0x5e44440d441a4988), I64(0xa07f7fe17fdf9efe), I64(0x88a9a99ea921374f) +, I64(0x672a2aa82a4d8254), I64(0x0abbbbd6bbb16d6b), I64(0x87c1c123c146e29f), I64(0xf153535153a202a6) +, I64(0x72dcdc57dcae8ba5), I64(0x530b0b2c0b582716), I64(0x019d9d4e9d9cd327), I64(0x2b6c6cad6c47c1d8) +, I64(0xa43131c43195f562), I64(0xf37474cd7487b9e8), I64(0x15f6f6fff6e309f1), I64(0x4c464605460a438c) +, I64(0xa5acac8aac092645), I64(0xb589891e893c970f), I64(0xb414145014a04428), I64(0xbae1e1a3e15b42df) +, I64(0xa616165816b04e2c), I64(0xf73a3ae83acdd274), I64(0x066969b9696fd0d2), I64(0x4109092409482d12) +, I64(0xd77070dd70a7ade0), I64(0x6fb6b6e2b6d95471), I64(0x1ed0d067d0ceb7bd), I64(0xd6eded93ed3b7ec7) +, I64(0xe2cccc17cc2edb85), I64(0x68424215422a5784), I64(0x2c98985a98b4c22d), I64(0xeda4a4aaa4490e55) +, I64(0x752828a0285d8850), I64(0x865c5c6d5cda31b8), I64(0x6bf8f8c7f8933fed), I64(0xc28686228644a411) + }, { + /* C2 vectors */ +I64(0x30d818186018c078), I64(0x462623238c2305af), I64(0x91b8c6c63fc67ef9), I64(0xcdfbe8e887e8136f) +, I64(0x13cb878726874ca1), I64(0x6d11b8b8dab8a962), I64(0x0209010104010805), I64(0x9e0d4f4f214f426e) +, I64(0x6c9b3636d836adee), I64(0x51ffa6a6a2a65904), I64(0xb90cd2d26fd2debd), I64(0xf70ef5f5f3f5fb06) +, I64(0xf2967979f979ef80), I64(0xde306f6fa16f5fce), I64(0x3f6d91917e91fcef), I64(0xa4f852525552aa07) +, I64(0xc04760609d6027fd), I64(0x6535bcbccabc8976), I64(0x2b379b9b569baccd), I64(0x018a8e8e028e048c) +, I64(0x5bd2a3a3b6a37115), I64(0x186c0c0c300c603c), I64(0xf6847b7bf17bff8a), I64(0x6a803535d435b5e1) +, I64(0x3af51d1d741de869), I64(0xddb3e0e0a7e05347), I64(0xb321d7d77bd7f6ac), I64(0x999cc2c22fc25eed) +, I64(0x5c432e2eb82e6d96), I64(0x96294b4b314b627a), I64(0xe15dfefedffea321), I64(0xaed5575741578216) +, I64(0x2abd15155415a841), I64(0xeee87777c1779fb6), I64(0x6e923737dc37a5eb), I64(0xd79ee5e5b3e57b56) +, I64(0x23139f9f469f8cd9), I64(0xfd23f0f0e7f0d317), I64(0x94204a4a354a6a7f), I64(0xa944dada4fda9e95) +, I64(0xb0a258587d58fa25), I64(0x8fcfc9c903c906ca), I64(0x527c2929a429558d), I64(0x145a0a0a280a5022) +, I64(0x7f50b1b1feb1e14f), I64(0x5dc9a0a0baa0691a), I64(0xd6146b6bb16b7fda), I64(0x17d985852e855cab) +, I64(0x673cbdbdcebd8173), I64(0xba8f5d5d695dd234), I64(0x2090101040108050), I64(0xf507f4f4f7f4f303) +, I64(0x8bddcbcb0bcb16c0), I64(0x7cd33e3ef83eedc6), I64(0x0a2d050514052811), I64(0xce78676781671fe6) +, I64(0xd597e4e4b7e47353), I64(0x4e0227279c2725bb), I64(0x8273414119413258), I64(0x0ba78b8b168b2c9d) +, I64(0x53f6a7a7a6a75101), I64(0xfab27d7de97dcf94), I64(0x374995956e95dcfb), I64(0xad56d8d847d88e9f) +, I64(0xeb70fbfbcbfb8b30), I64(0xc1cdeeee9fee2371), I64(0xf8bb7c7ced7cc791), I64(0xcc716666856617e3) +, I64(0xa77bdddd53dda68e), I64(0x2eaf17175c17b84b), I64(0x8e45474701470246), I64(0x211a9e9e429e84dc) +, I64(0x89d4caca0fca1ec5), I64(0x5a582d2db42d7599), I64(0x632ebfbfc6bf9179), I64(0x0e3f07071c07381b) +, I64(0x47acadad8ead0123), I64(0xb4b05a5a755aea2f), I64(0x1bef838336836cb5), I64(0x66b63333cc3385ff) +, I64(0xc65c636391633ff2), I64(0x041202020802100a), I64(0x4993aaaa92aa3938), I64(0xe2de7171d971afa8) +, I64(0x8dc6c8c807c80ecf), I64(0x32d119196419c87d), I64(0x923b494939497270), I64(0xaf5fd9d943d9869a) +, I64(0xf931f2f2eff2c31d), I64(0xdba8e3e3abe34b48), I64(0xb6b95b5b715be22a), I64(0x0dbc88881a883492) +, I64(0x293e9a9a529aa4c8), I64(0x4c0b262698262dbe), I64(0x64bf3232c8328dfa), I64(0x7d59b0b0fab0e94a) +, I64(0xcff2e9e983e91b6a), I64(0x1e770f0f3c0f7833), I64(0xb733d5d573d5e6a6), I64(0x1df480803a8074ba) +, I64(0x6127bebec2be997c), I64(0x87ebcdcd13cd26de), I64(0x68893434d034bde4), I64(0x903248483d487a75) +, I64(0xe354ffffdbffab24), I64(0xf48d7a7af57af78f), I64(0x3d6490907a90f4ea), I64(0xbe9d5f5f615fc23e) +, I64(0x403d202080201da0), I64(0xd00f6868bd6867d5), I64(0x34ca1a1a681ad072), I64(0x41b7aeae82ae192c) +, I64(0x757db4b4eab4c95e), I64(0xa8ce54544d549a19), I64(0x3b7f93937693ece5), I64(0x442f222288220daa) +, I64(0xc86364648d6407e9), I64(0xff2af1f1e3f1db12), I64(0xe6cc7373d173bfa2), I64(0x248212124812905a) +, I64(0x807a40401d403a5d), I64(0x1048080820084028), I64(0x9b95c3c32bc356e8), I64(0xc5dfecec97ec337b) +, I64(0xab4ddbdb4bdb9690), I64(0x5fc0a1a1bea1611f), I64(0x07918d8d0e8d1c83), I64(0x7ac83d3df43df5c9) +, I64(0x335b97976697ccf1), I64(0x0000000000000000), I64(0x83f9cfcf1bcf36d4), I64(0x566e2b2bac2b4587) +, I64(0xece17676c57697b3), I64(0x19e68282328264b0), I64(0xb128d6d67fd6fea9), I64(0x36c31b1b6c1bd877) +, I64(0x7774b5b5eeb5c15b), I64(0x43beafaf86af1129), I64(0xd41d6a6ab56a77df), I64(0xa0ea50505d50ba0d) +, I64(0x8a5745450945124c), I64(0xfb38f3f3ebf3cb18), I64(0x60ad3030c0309df0), I64(0xc3c4efef9bef2b74) +, I64(0x7eda3f3ffc3fe5c3), I64(0xaac755554955921c), I64(0x59dba2a2b2a27910), I64(0xc9e9eaea8fea0365) +, I64(0xca6a656589650fec), I64(0x6903babad2bab968), I64(0x5e4a2f2fbc2f6593), I64(0x9d8ec0c027c04ee7) +, I64(0xa160dede5fdebe81), I64(0x38fc1c1c701ce06c), I64(0xe746fdfdd3fdbb2e), I64(0x9a1f4d4d294d5264) +, I64(0x397692927292e4e0), I64(0xeafa7575c9758fbc), I64(0x0c3606061806301e), I64(0x09ae8a8a128a2498) +, I64(0x794bb2b2f2b2f940), I64(0xd185e6e6bfe66359), I64(0x1c7e0e0e380e7036), I64(0x3ee71f1f7c1ff863) +, I64(0xc4556262956237f7), I64(0xb53ad4d477d4eea3), I64(0x4d81a8a89aa82932), I64(0x315296966296c4f4) +, I64(0xef62f9f9c3f99b3a), I64(0x97a3c5c533c566f6), I64(0x4a102525942535b1), I64(0xb2ab59597959f220) +, I64(0x15d084842a8454ae), I64(0xe4c57272d572b7a7), I64(0x72ec3939e439d5dd), I64(0x98164c4c2d4c5a61) +, I64(0xbc945e5e655eca3b), I64(0xf09f7878fd78e785), I64(0x70e53838e038ddd8), I64(0x05988c8c0a8c1486) +, I64(0xbf17d1d163d1c6b2), I64(0x57e4a5a5aea5410b), I64(0xd9a1e2e2afe2434d), I64(0xc24e616199612ff8) +, I64(0x7b42b3b3f6b3f145), I64(0x42342121842115a5), I64(0x25089c9c4a9c94d6), I64(0x3cee1e1e781ef066) +, I64(0x8661434311432252), I64(0x93b1c7c73bc776fc), I64(0xe54ffcfcd7fcb32b), I64(0x0824040410042014) +, I64(0xa2e351515951b208), I64(0x2f2599995e99bcc7), I64(0xda226d6da96d4fc4), I64(0x1a650d0d340d6839) +, I64(0xe979fafacffa8335), I64(0xa369dfdf5bdfb684), I64(0xfca97e7ee57ed79b), I64(0x4819242490243db4) +, I64(0x76fe3b3bec3bc5d7), I64(0x4b9aabab96ab313d), I64(0x81f0cece1fce3ed1), I64(0x2299111144118855) +, I64(0x03838f8f068f0c89), I64(0x9c044e4e254e4a6b), I64(0x7366b7b7e6b7d151), I64(0xcbe0ebeb8beb0b60) +, I64(0x78c13c3cf03cfdcc), I64(0x1ffd81813e817cbf), I64(0x354094946a94d4fe), I64(0xf31cf7f7fbf7eb0c) +, I64(0x6f18b9b9deb9a167), I64(0x268b13134c13985f), I64(0x58512c2cb02c7d9c), I64(0xbb05d3d36bd3d6b8) +, I64(0xd38ce7e7bbe76b5c), I64(0xdc396e6ea56e57cb), I64(0x95aac4c437c46ef3), I64(0x061b03030c03180f) +, I64(0xacdc565645568a13), I64(0x885e44440d441a49), I64(0xfea07f7fe17fdf9e), I64(0x4f88a9a99ea92137) +, I64(0x54672a2aa82a4d82), I64(0x6b0abbbbd6bbb16d), I64(0x9f87c1c123c146e2), I64(0xa6f153535153a202) +, I64(0xa572dcdc57dcae8b), I64(0x16530b0b2c0b5827), I64(0x27019d9d4e9d9cd3), I64(0xd82b6c6cad6c47c1) +, I64(0x62a43131c43195f5), I64(0xe8f37474cd7487b9), I64(0xf115f6f6fff6e309), I64(0x8c4c464605460a43) +, I64(0x45a5acac8aac0926), I64(0x0fb589891e893c97), I64(0x28b414145014a044), I64(0xdfbae1e1a3e15b42) +, I64(0x2ca616165816b04e), I64(0x74f73a3ae83acdd2), I64(0xd2066969b9696fd0), I64(0x124109092409482d) +, I64(0xe0d77070dd70a7ad), I64(0x716fb6b6e2b6d954), I64(0xbd1ed0d067d0ceb7), I64(0xc7d6eded93ed3b7e) +, I64(0x85e2cccc17cc2edb), I64(0x8468424215422a57), I64(0x2d2c98985a98b4c2), I64(0x55eda4a4aaa4490e) +, I64(0x50752828a0285d88), I64(0xb8865c5c6d5cda31), I64(0xed6bf8f8c7f8933f), I64(0x11c28686228644a4) + }, { + /* C3 vectors */ +I64(0x7830d818186018c0), I64(0xaf462623238c2305), I64(0xf991b8c6c63fc67e), I64(0x6fcdfbe8e887e813) +, I64(0xa113cb878726874c), I64(0x626d11b8b8dab8a9), I64(0x0502090101040108), I64(0x6e9e0d4f4f214f42) +, I64(0xee6c9b3636d836ad), I64(0x0451ffa6a6a2a659), I64(0xbdb90cd2d26fd2de), I64(0x06f70ef5f5f3f5fb) +, I64(0x80f2967979f979ef), I64(0xcede306f6fa16f5f), I64(0xef3f6d91917e91fc), I64(0x07a4f852525552aa) +, I64(0xfdc04760609d6027), I64(0x766535bcbccabc89), I64(0xcd2b379b9b569bac), I64(0x8c018a8e8e028e04) +, I64(0x155bd2a3a3b6a371), I64(0x3c186c0c0c300c60), I64(0x8af6847b7bf17bff), I64(0xe16a82b535d435b5) +, I64(0x693af51d1d2c1de8), I64(0x47ddb3e0e0a57053), I64(0xacb321d7d77bd7f6), I64(0xed999cc2c22fc25e) +, I64(0x965c432e2eb82e6d), I64(0x7a96294b4b314b62), I64(0x21e15dfefedffea3), I64(0x16aed55757415782) +, I64(0x412abd15155415a8), I64(0xb6eee87777c1779f), I64(0xeb6e923737dc37a5), I64(0x56d79ee5e5b3e57b) +, I64(0xd923139f9f469f8c), I64(0x17fd23f0f0e7f0d3), I64(0x7f94204a4a354a6a), I64(0x95a944dada4fda9e) +, I64(0x25b0a258587d58fa), I64(0xca8fcfc9c903c906), I64(0x8d527c2929a42955), I64(0x22145a0a0a280a50) +, I64(0x4f7f50b1b1feb1e1), I64(0x1a5dc9a0a0baa069), I64(0xdad6146b6bb16b7f), I64(0xab17d985852e855c) +, I64(0x73673cbdbdcebd81), I64(0x34ba8f5d5d695dd2), I64(0x5020901010401080), I64(0x03f506c4f4f7f4f3) +, I64(0xc08bddcbcb0bcb16), I64(0xc67cd33e31083eed), I64(0x110a2d0505140528), I64(0xe6ce78676781671f) +, I64(0x53d597e4e4b7e473), I64(0xbb4e0227279c2725), I64(0x5882734141194132), I64(0x9d0ba78b8b168b2c) +, I64(0x0153f6a7a7a6a751), I64(0x94fab27d7de97dcf), I64(0xfb374995956e95dc), I64(0x9fad56d8d847d88e) +, I64(0x30eb70fbfbcbfb8b), I64(0x71c1cdeeee9fee23), I64(0x91f8bb7c7ced7cc7), I64(0xe3cc716666856617) +, I64(0x8ea77bdddd53dda6), I64(0x4b2eaf17175c17b8), I64(0x468e45475c014702), I64(0xdc211a9e9e429e84) +, I64(0xc589d4caca0fca1e), I64(0x995a582d2db42d75), I64(0x79632ebfbfc6bf91), I64(0x1b0e3f07071c0738) +, I64(0x2347acadad8ead01), I64(0x2fb4b0bb5a755aea), I64(0xb51bef838336836c), I64(0xff66b63333cc3385) +, I64(0xf2c65c636391633f), I64(0x0a04120202080210), I64(0x384993aaaa92aa39), I64(0xa8e2de7171d971af) +, I64(0xcf8dc6c8c807c80e), I64(0x7d32d119196419c8), I64(0x70923b4949394972), I64(0x9aaf5fd9d943d986) +, I64(0x1df931f2f2eff2c3), I64(0x48dba8e3e3abe34b), I64(0x2ab6b95b5b715be2), I64(0x920dbc88881a8834) +, I64(0xc8293e9a9a529aa4), I64(0xbe4c0b262698262d), I64(0xfa64bf3232c8328d), I64(0x4a7d59b0b0fab0e9) +, I64(0x6acff2e9e983e91b), I64(0x331e770f0f3c0f78), I64(0xa6b733d5d573d5e6), I64(0xba1df480803a8074) +, I64(0x7c6127bebec2be99), I64(0xde87eba9cd13cd26), I64(0xe468893434d034bd), I64(0x75903248483d487a) +, I64(0x24e354ffffdbffab), I64(0x8ff48d7a7af57af7), I64(0xea3d6490907a90f4), I64(0x3ebe9d5f5f615fc2) +, I64(0xa0403d202080201d), I64(0xd5d00f6868bd6867), I64(0x72340a1a1a681ad0), I64(0x2c41b7aeae82ae19) +, I64(0x5e757db4b4eab4c9), I64(0x19a8ce54544d549a), I64(0xe53b7f93937693ec), I64(0xaa442f222288220d) +, I64(0xe9c86364648d6407), I64(0x12ff2af1f1e3f1db), I64(0xa2e6cc7373d173bf), I64(0x5a24821212481290) +, I64(0x5d807a40401d403a), I64(0x2810480808200840), I64(0xe89b95c3c32bc356), I64(0x7bc5dfecec97ec33) +, I64(0x90ab4ddbdb4bdb96), I64(0x1f5fc0a1a1bea161), I64(0x8307918d8d0e8d1c), I64(0xc97ac83d3df43df5) +, I64(0xf1335b97976697cc), I64(0x0000000000000000), I64(0xd483f9cfcf1bcf36), I64(0x87566e2b2bac2b45) +, I64(0xb3ece17676c57697), I64(0xb019e68282328264), I64(0xa9b128d6d67fd6fe), I64(0x7736c31b1b6c1bd8) +, I64(0x5b7774b5b5eeb5c1), I64(0x2943beafaf86af11), I64(0xdfd41d6a6ab56a77), I64(0x0da0ea50505d50ba) +, I64(0x4c8a574545094512), I64(0x18fb38f3f3ebf3cb), I64(0xf060ad3030c0309d), I64(0x74c3c4efef9bef2b) +, I64(0xc37eda3f3ffc3fe5), I64(0x1caac75555495592), I64(0x1059dba2a2b2a279), I64(0x65c9e9eaea8fea03) +, I64(0xecca6a656589650f), I64(0x686903babad2bab9), I64(0x935e4a2f2fbc2f65), I64(0xe79d8ec0c027c04e) +, I64(0x81a160dede5fdebe), I64(0x6c38fc1c1c701ce0), I64(0x2ee746fdfdd3fdbb), I64(0x649a1f4d4d294d52) +, I64(0xe0397692927292e4), I64(0xbceafa7575c9758f), I64(0x1e0c360606180630), I64(0x9809ae8a8a128a24) +, I64(0x40794bb2b2f2b2f9), I64(0x59d185e6e6bfe663), I64(0x361c7e0e0e380e70), I64(0x633ee71f1f7c1ff8) +, I64(0xf7c4556262956237), I64(0xa3b53ad4d477d4ee), I64(0x324d81a8a89aa829), I64(0xf4315296966296c4) +, I64(0x3aef62f9f9c3f99b), I64(0xf697a3c5c533c566), I64(0xb14a102525942535), I64(0x20b2ab59597959f2) +, I64(0xae15d084842a8454), I64(0xa7e4c57272d572b7), I64(0xdd72ec3939e439d5), I64(0x6198164c4c2d4c5a) +, I64(0x3bbc945e5e655eca), I64(0x85f09f7878fd78e7), I64(0xd870e53838e038dd), I64(0x8605988c8c0a8c14) +, I64(0xb2bf17d1d163d1c6), I64(0x0b57e4a5a5aea541), I64(0x4dd9a1e2e2afe243), I64(0xf8c24e616199612f) +, I64(0x457b42b3b3f6b3f1), I64(0xa542342121842115), I64(0xd625089c9c4a9c94), I64(0x663cee1e1e781ef0) +, I64(0x5286614343114322), I64(0xfc93b1c7c73bc776), I64(0x2be54ffcfcd7fcb3), I64(0x1408240404100420) +, I64(0x08a2e351515951b2), I64(0xc72f2599995e99bc), I64(0xc4da226d6da96d4f), I64(0x391a650d0d340d68) +, I64(0x35e979fafacffa83), I64(0x84a369dfdf5bdfb6), I64(0x9bfca97e7ee57ed7), I64(0xb44819242490243d) +, I64(0xd776fe3b3bec3bc5), I64(0x3d4b9aabab96ab31), I64(0xd181f0cece1fce3e), I64(0x5522991111441188) +, I64(0x89ef838f8f068f0c), I64(0x6b9c044e4e254e4a), I64(0x517366b7b7e6b7d1), I64(0x60cbe0ebeb8beb0b) +, I64(0xcc78c13c3cf03cfd), I64(0xbf1ffd81813e817c), I64(0xfe354094946a94d4), I64(0x0cf31cf7f7fbf7eb) +, I64(0x676f18b9b9deb9a1), I64(0x5f268b13134c1398), I64(0x9c58512c2cb02c7d), I64(0xb8bb05d3d36bd3d6) +, I64(0x5cd38ce7e7bbe76b), I64(0xcbdc396e6ea56e57), I64(0xf395aac4c437c46e), I64(0x0f061b03030c0318) +, I64(0x13acdc565645568a), I64(0x49885e44440d441a), I64(0x9efea07f7fe17fdf), I64(0x374f88a9a99ea921) +, I64(0x8254672a2aa82a4d), I64(0x6d6b0abbbbd6bbb1), I64(0xe29f87c1c123c146), I64(0x02a6f153535153a2) +, I64(0x8ba572dcdc57dcae), I64(0x2716530b0b2c0b58), I64(0xd327019d9d4e9d9c), I64(0xc1d82b6c6cad6c47) +, I64(0xf562a43131c43195), I64(0xb9e8f37474cd7487), I64(0x09f115f6f6fff6e3), I64(0x438c4c464605460a) +, I64(0x2645a5acac8aac09), I64(0x970fb58a491e893c), I64(0x4428b414145014a0), I64(0x42dfbae1e1a3e15b) +, I64(0x4e2ca616165816b0), I64(0xd274f73a3ae83acd), I64(0xd0d2066969b9696f), I64(0x2d12410909240948) +, I64(0xade0d77070dd70a7), I64(0x54716fb6b6e2b6d9), I64(0xb7bd1ed0d067d0ce), I64(0x7ec7d6eded93ed3b) +, I64(0xdb85e2cccc17cc2e), I64(0x578468424215422a), I64(0xc22d2c98985a98b4), I64(0x0e55eda4a4aaa449) +, I64(0x8850752828a0285d), I64(0x31b8865c5c6d5cda), I64(0x3fed6bf8f8c7f893), I64(0xa411c28686228644) + }, { + /* C4 vectors */ +I64(0xc07830d818186018), I64(0x05af462623238c23), I64(0x7ef991b8c6c63fc6), I64(0x136fcdfbe8e887e8) +, I64(0x4ca113cb87872687), I64(0xa9626d11b8b8dab8), I64(0x0805020901010401), I64(0x426e9e0d4f4f214f) +, I64(0xadee6c9b3636d836), I64(0x590451ffa6a6a2a6), I64(0xdebdb90cd2d26fd2), I64(0xfb06f70ef5f5f3f5) +, I64(0xef80f2967979f979), I64(0x5fcede306f6fa16f), I64(0xfcef3f6d91917e91), I64(0xaa07a4f852525552) +, I64(0x27fdc04760609d60), I64(0x89766535bcbccabc), I64(0xaccd2b379b9b569b), I64(0x048c018a8e8e028e) +, I64(0x71155bd2a3a3b6a3), I64(0x603c186c0c0c300c), I64(0xff8af6847b7bf17b), I64(0xb5e16a803535d435) +, I64(0xe8693af51d1d741d), I64(0x5347ddb3e0e0a7e0), I64(0xf6acb321d7d77bd7), I64(0x5eed999cc2c22fc2) +, I64(0x6d965c432e2eb82e), I64(0x627a96294b4b314b), I64(0xa321e15dfefedffe), I64(0x8216aed557574157) +, I64(0xa8412abd15155415), I64(0x9fb6eee87777c177), I64(0xa5eb6e923737dc37), I64(0x7b56d79ee5e5b3e5) +, I64(0x8cd923139f9f469f), I64(0xd317fd23f0f0e7f0), I64(0x6a7f94204a4a354a), I64(0x9e95a944dada4fda) +, I64(0xfa25b0a258587d58), I64(0x06ca8fcfc9c903c9), I64(0x558d527c2929a429), I64(0x5022145a0a0a280a) +, I64(0xe14f7f50b1b1feb1), I64(0x691a5dc9a0a0baa0), I64(0x7fdad6146b6bb16b), I64(0x5cab17d985852e85) +, I64(0x8173673cbdbdcebd), I64(0xd234ba8f5d5d695d), I64(0x8050209010104010), I64(0xf303f507f4f4f7f4) +, I64(0x16c08bddcbcb0bcb), I64(0xedc67cd33e3ef83e), I64(0x28110a2d05051405), I64(0x1fe6ce7867678167) +, I64(0x7353d597e4e4b7e4), I64(0x25bb4e0227279c27), I64(0x3258827341411941), I64(0x2c9d0ba78b8b168b) +, I64(0x510153f6a7a7a6a7), I64(0xcf94fab27d7de97d), I64(0xdcfb374995956e95), I64(0x8e9fad56d8d847d8) +, I64(0x8b30eb70fbfbcbfb), I64(0x2371c1cdeeee9fee), I64(0xc791f8bb7c7ced7c), I64(0x17e3cc7166668566) +, I64(0xa68ea77bdddd53dd), I64(0xb84b2eaf17175c17), I64(0x02468e4547470147), I64(0x84dc211a9e9e429e) +, I64(0x1ec589d4caca0fca), I64(0x75995a582d2db42d), I64(0x9179632ebfbfc6bf), I64(0x381b0e3f07071c07) +, I64(0x012347acadad8ead), I64(0xea2fb4b05a5a755a), I64(0x6cb51bef83833683), I64(0x85ff66b63333cc33) +, I64(0x3ff2c65c63639163), I64(0x100a041202020802), I64(0x39384993aaaa92aa), I64(0xafa8e2de7171d971) +, I64(0x0ecf8dc6c8c807c8), I64(0xc87d32d119196419), I64(0x7270923b49493949), I64(0x869aaf5fd9d943d9) +, I64(0xc31df931f2f2eff2), I64(0x4b48dba8e3e3abe3), I64(0xe22ab6b95b5b715b), I64(0x34920dbc88881a88) +, I64(0xa4c8293e9a9a529a), I64(0x2dbe4c0b26269826), I64(0x8dfa64bf3232c832), I64(0xe94a7d59b0b0fab0) +, I64(0x1b6acff2e9e983e9), I64(0x78331e770f0f3c0f), I64(0xe6a6b733d5d573d5), I64(0x74ba1df480803a80) +, I64(0x997c6127bebec2be), I64(0x26de87ebcdcd13cd), I64(0xbde468893434d034), I64(0x7a75903248483d48) +, I64(0xab24e354ffffdbff), I64(0xf78ff48d7a7af57a), I64(0xf4ea3d6490907a90), I64(0xc23ebe9d5f5f615f) +, I64(0x1da0403d20208020), I64(0x67d5d00f6868bd68), I64(0xd07234ca1a1a681a), I64(0x192c41b7aeae82ae) +, I64(0xc95e757db4b4eab4), I64(0x9a19a8ce54544d54), I64(0xece53b7f93937693), I64(0x0daa442f22228822) +, I64(0x07e9c86364648d64), I64(0xdb12ff2af1f1e3f1), I64(0xbfa2e6cc7373d173), I64(0x905a248212124812) +, I64(0x3a5d807a40401d40), I64(0x4028104808082008), I64(0x56e89b95c3c32bc3), I64(0x337bc5dfecec97ec) +, I64(0x9690ab4ddbdb4bdb), I64(0x611f5fc0a1a1bea1), I64(0x1c8307918d8d0e8d), I64(0xf5c97ac83d3df43d) +, I64(0xccf1335b97976697), I64(0x0000000000000000), I64(0x36d483f9cfcf1bcf), I64(0x4587566e2b2bac2b) +, I64(0x97b3ece17676c576), I64(0x64b019e682823282), I64(0xfea9b128d6d67fd6), I64(0xd87736c31b1b6c1b) +, I64(0xc15b7774b5b5eeb5), I64(0x112943beafaf86af), I64(0x77dfd41d6a6ab56a), I64(0xba0da0ea50505d50) +, I64(0x124c8a5745450945), I64(0xcb18fb38f3f3ebf3), I64(0x9df060ad3030c030), I64(0x2b74c3c4efef9bef) +, I64(0xe5c37eda3f3ffc3f), I64(0x921caac755554955), I64(0x791059dba2a2b2a2), I64(0x0365c9e9eaea8fea) +, I64(0x0fecca6a65658965), I64(0xb9686903babad2ba), I64(0x65935e4a2f2fbc2f), I64(0x4ee79d8ec0c027c0) +, I64(0xbe81a160dede5fde), I64(0xe06c38fc1c1c701c), I64(0xbb2ee746fdfdd3fd), I64(0x52649a1f4d4d294d) +, I64(0xe4e0397692927292), I64(0x8fbceafa7575c975), I64(0x301e0c3606061806), I64(0x249809ae8a8a128a) +, I64(0xf940794bb2b2f2b2), I64(0x6359d185e6e6bfe6), I64(0x70361c7e0e0e380e), I64(0xf8633ee71f1f7c1f) +, I64(0x37f7c45562629562), I64(0xeea3b53ad4d477d4), I64(0x29324d81a8a89aa8), I64(0xc4f4315296966296) +, I64(0x9b3aef62f9f9c3f9), I64(0x66f697a3c5c533c5), I64(0x35b14a1025259425), I64(0xf220b2ab59597959) +, I64(0x54ae15d084842a84), I64(0xb7a7e4c57272d572), I64(0xd5dd72ec3939e439), I64(0x5a6198164c4c2d4c) +, I64(0xca3bbc945e5e655e), I64(0xe785f09f7878fd78), I64(0xddd870e53838e038), I64(0x148605988c8c0a8c) +, I64(0xc6b2bf17d1d163d1), I64(0x410b57e4a5a5aea5), I64(0x434dd9a1e2e2afe2), I64(0x2ff8c24e61619961) +, I64(0xf1457b42b3b3f6b3), I64(0x15a5423421218421), I64(0x94d625089c9c4a9c), I64(0xf0663cee1e1e781e) +, I64(0x2252866143431143), I64(0x76fc93b1c7c73bc7), I64(0xb32be54ffcfcd7fc), I64(0x2014082404041004) +, I64(0xb208a2e351515951), I64(0xbcc72f2599995e99), I64(0x4fc4da226d6da96d), I64(0x68391a650d0d340d) +, I64(0x8335e979fafacffa), I64(0xb684a369dfdf5bdf), I64(0xd79bfca97e7ee57e), I64(0x3db4481924249024) +, I64(0xc5d776fe3b3bec3b), I64(0x313d4b9aabab96ab), I64(0x3ed181f0cece1fce), I64(0x8855229911114411) +, I64(0x0c8903838f8f068f), I64(0x4a6b9c044e4e254e), I64(0xd1517366b7b7e6b7), I64(0x0b60cbe0ebeb8beb) +, I64(0xfdcc78c13c3cf03c), I64(0x7cbf1ffd81813e81), I64(0xd4fe354094946a94), I64(0xeb0cf31cf7f7fbf7) +, I64(0xa1676f18b9b9deb9), I64(0x985f268b13134c13), I64(0x7d9c58512c2cb02c), I64(0xd6b8bb05d3d36bd3) +, I64(0x6b5cd38ce7e7bbe7), I64(0x57cbdc396e6ea56e), I64(0x6ef395aac4c437c4), I64(0x180f061b03030c03) +, I64(0x8a13acdc56564556), I64(0x1a49885e44440d44), I64(0xdf9efea07f7fe17f), I64(0x21374f88a9a99ea9) +, I64(0x4d8254672a2aa82a), I64(0xb16d6b0abbbbd6bb), I64(0x46e29f87c1c123c1), I64(0xa202a6f153535153) +, I64(0xae8ba572dcdc57dc), I64(0x582716530b0b2c0b), I64(0x9cd327019d9d4e9d), I64(0x47c1d82b6c6cad6c) +, I64(0x95f562a43131c431), I64(0x87b9e8f37474cd74), I64(0xe309f115f6f6fff6), I64(0x0a438c4c46460546) +, I64(0x092645a5acac8aac), I64(0x3c970fb589891e89), I64(0xa04428b414145014), I64(0x5b42dfbae1e1a3e1) +, I64(0xb04e2ca616165816), I64(0xcdd274f73a3ae83a), I64(0x6fd0d2066969b969), I64(0x482d124109092409) +, I64(0xa7ade0d77070dd70), I64(0xd954716fb6b6e2b6), I64(0xceb7bd1ed0d067d0), I64(0x3b7ec7d6eded93ed) +, I64(0x2edb85e2cccc17cc), I64(0x2a57846842421542), I64(0xb4c22d2c98985a98), I64(0x490e55eda4a4aaa4) +, I64(0x5d8850752828a028), I64(0xda31b8865c5c6d5c), I64(0x933fed6bf8f8c7f8), I64(0x44a411c286862286) + }, { + /* C5 vectors */ +I64(0x18c07830d8181860), I64(0x2305af462623238c), I64(0xc67ef991b8c6c63f), I64(0xe8136fcdfbe8e887) +, I64(0x874ca113cb878726), I64(0xb8a9626d11b8b8da), I64(0x0108050209010104), I64(0x4f426e9e0d4f4f21) +, I64(0x36adee6c9b3636d8), I64(0xa6590451ffa6a6a2), I64(0xd2debdb90cd2d26f), I64(0xf5fb06f70ef5f5f3) +, I64(0x79ef80f2967979f9), I64(0x6f5fcede306f6fa1), I64(0x91fcef3f6d91917e), I64(0x52aa07a4f8525255) +, I64(0x6027fdc04760609d), I64(0xbc89766535bcbcca), I64(0x9baccd2b379b9b56), I64(0x8e048c018a8e8e02) +, I64(0xa371155bd2a3a3b6), I64(0x0c603c186c0c0c30), I64(0x7bff8af6847b7bf1), I64(0x35b5e16a803535d4) +, I64(0x1de8693af51d1d74), I64(0xe05347ddb3e0e0a7), I64(0xd7f6acb321d7d77b), I64(0xc25eed999cc2c22f) +, I64(0x2e6d965c432e2eb8), I64(0x4b627a96294b4b31), I64(0xfea321e15dfefedf), I64(0x578216aed5575741) +, I64(0x15a8412abd151554), I64(0x779fb6eee87777c1), I64(0x37a5eb6e923737dc), I64(0xe57b56d79ee5e5b3) +, I64(0x9f8cd923139f9f46), I64(0xf0d317fd23f0f0e7), I64(0x4a6a7f94204a4a35), I64(0xda9e95a944dada4f) +, I64(0x58fa25b0a258587d), I64(0xc906ca8fcfc9c903), I64(0x29558d527c2929a4), I64(0x0a5022145a0a0a28) +, I64(0xb1e14f7f50b1b1fe), I64(0xa0691a5dc9a0a0ba), I64(0x6b7fdad6146b6bb1), I64(0x855cab17d985852e) +, I64(0xbd8173673cbdbdce), I64(0x5dd234ba8f5d5d69), I64(0x1080502090101040), I64(0xf4f303f507f4f4f7) +, I64(0xcb16c08bddcbcb0b), I64(0x3eedc67cd33e3ef8), I64(0x0528110a2d050514), I64(0x671fe6ce78676781) +, I64(0xe47353d597e4e4b7), I64(0x2725bb4e0227279c), I64(0x4132588273414119), I64(0x8b2c9d0ba78b8b16) +, I64(0xa7510153f6a7a7a6), I64(0x7dcf94fab27d7de9), I64(0x95dcfb374995956e), I64(0xd88e9fad56d8d847) +, I64(0xfb8b30eb70fbfbcb), I64(0xee2371c1cdeeee9f), I64(0x7cc791f8bb7c7ced), I64(0x6617e3cc71666685) +, I64(0xdda68ea77bdddd53), I64(0x17b84b2eaf17175c), I64(0x4702468e45474701), I64(0x9e84dc211a9e9e42) +, I64(0xca1ec589d4caca0f), I64(0x2d75995a582d2db4), I64(0xbf9179632ebfbfc6), I64(0x07381b0e3f07071c) +, I64(0xad012347acadad8e), I64(0x5aea2fb4b05a5a75), I64(0x836cb51bef838336), I64(0x3385ff66b63333cc) +, I64(0x633ff2c65c636391), I64(0x02100a0412020208), I64(0xaa39384993aaaa92), I64(0x71afa8e2de7171d9) +, I64(0xc80ecf8dc6c8c807), I64(0x19c87d32d1191964), I64(0x497270923b494939), I64(0xd9869aaf5fd9d943) +, I64(0xf2c31df931f2f2ef), I64(0xe34b48dba8e3e3ab), I64(0x5be22ab6b95b5b71), I64(0x8834920dbc88881a) +, I64(0x9aa4c8293e9a9a52), I64(0x262dbe4c0b262698), I64(0x328dfa64bf3232c8), I64(0xb0e94a7d59b0b0fa) +, I64(0xe91b6acff2e9e983), I64(0x0f78331e770f0f3c), I64(0xd5e6a6b733d5d573), I64(0x8074ba1df480803a) +, I64(0xbe997c6127bebec2), I64(0xcd26de87ebcdcd13), I64(0x34bde468893434d0), I64(0x487a75903248483d) +, I64(0xffab24e354ffffdb), I64(0x7af78ff48d7a7af5), I64(0x90f4ea3d6490907a), I64(0x5fc23ebe9d5f5f61) +, I64(0x201da0403d202080), I64(0x6867d5d00f6868bd), I64(0x1ad07234ca1a1a68), I64(0xae192c41b7aeae82) +, I64(0xb4c95e757db4b4ea), I64(0x549a19a8ce54544d), I64(0x93ece53b7f939376), I64(0x220daa442f222288) +, I64(0x6407e9c86364648d), I64(0xf1db12ff2af1f1e3), I64(0x73bfa2e6cc7373d1), I64(0x12905a2482121248) +, I64(0x403a5d807a40401d), I64(0x0840281048080820), I64(0xc356e89b95c3c32b), I64(0xec337bc5dfecec97) +, I64(0xdb9690ab4ddbdb4b), I64(0xa1611f5fc0a1a1be), I64(0x8d1c8307918d8d0e), I64(0x3df5c97ac83d3df4) +, I64(0x97ccf1335b979766), I64(0x0000000000000000), I64(0xcf36d483f9cfcf1b), I64(0x2b4587566e2b2bac) +, I64(0x7697b3ece17676c5), I64(0x8264b019e6828232), I64(0xd6fea9b128d6d67f), I64(0x1bd87736c31b1b6c) +, I64(0xb5c15b7774b5b5ee), I64(0xaf112943beafaf86), I64(0x6a77dfd41d6a6ab5), I64(0x50ba0da0ea50505d) +, I64(0x45124c8a57454509), I64(0xf3cb18fb38f3f3eb), I64(0x309df060ad3030c0), I64(0xef2b74c3c4efef9b) +, I64(0x3fe5c37eda3f3ffc), I64(0x55921caac7555549), I64(0xa2791059dba2a2b2), I64(0xea0365c9e9eaea8f) +, I64(0x650fecca6a656589), I64(0xbab9686903babad2), I64(0x2f65935e4a2f2fbc), I64(0xc04ee79d8ec0c027) +, I64(0xdebe81a160dede5f), I64(0x1ce06c38fc1c1c70), I64(0xfdbb2ee746fdfdd3), I64(0x4d52649a1f4d4d29) +, I64(0x92e4e03976929272), I64(0x758fbceafa7575c9), I64(0x06301e0c36060618), I64(0x8a249809ae8a8a12) +, I64(0xb2f940794bb2b2f2), I64(0xe66359d185e6e6bf), I64(0x0e70361c7e0e0e38), I64(0x1ff8633ee71f1f7c) +, I64(0x6237f7c455626295), I64(0xd4eea3b53ad4d477), I64(0xa829324d81a8a89a), I64(0x96c4f43152969662) +, I64(0xf99b3aef62f9f9c3), I64(0xc566f697a3c5c533), I64(0x2535b14a10252594), I64(0x59f220b2ab595979) +, I64(0x8454ae15d084842a), I64(0x72b7a7e4c57272d5), I64(0x39d5dd72ec3939e4), I64(0x4c5a6198164c4c2d) +, I64(0x5eca3bbc945e5e65), I64(0x78e785f09f7878fd), I64(0x38ddd870e53838e0), I64(0x8c148605988c8c0a) +, I64(0xd1c6b2bf17d1d163), I64(0xa5410b57e4a5a5ae), I64(0xe2434dd9a1e2e2af), I64(0x612ff8c24e616199) +, I64(0xb3f1457b42b3b3f6), I64(0x2115a54234212184), I64(0x9c94d625089c9c4a), I64(0x1ef0663cee1e1e78) +, I64(0x4322528661434311), I64(0xc776fc93b1c7c73b), I64(0xfcb32be54ffcfcd7), I64(0x0420140824040410) +, I64(0x51b208a2e3515159), I64(0x99bcc72f2599995e), I64(0x6d4fc4da226d6da9), I64(0x0d68391a650d0d34) +, I64(0xfa8335e979fafacf), I64(0xdfb684a369dfdf5b), I64(0x7ed79bfca97e7ee5), I64(0x243db44819242490) +, I64(0x3bc5d776fe3b3bec), I64(0xab313d4b9aabab96), I64(0xce3ed181f0cece1f), I64(0x1188552299111144) +, I64(0x8f0c8903838f8f06), I64(0x4e4a6b9c044e4e25), I64(0xb7d1517366b7b7e6), I64(0xeb0b60cbe0ebeb8b) +, I64(0x3cfdcc78c13c3cf0), I64(0x817cbf1ffd81813e), I64(0x94d4fe354094946a), I64(0xf7eb0cf31cf7f7fb) +, I64(0xb9a1676f18b9b9de), I64(0x13985f268b13134c), I64(0x2c7d9c58512c2cb0), I64(0xd3d6b8bb05d3d36b) +, I64(0xe76b5cd38ce7e7bb), I64(0x6e57cbdc396e6ea5), I64(0xc46ef395aac4c437), I64(0x03180f061b03030c) +, I64(0x568a13acdc565645), I64(0x441a49885e44440d), I64(0x7fdf9efea07f7fe1), I64(0xa921374f88a9a99e) +, I64(0x2a4d8254672a2aa8), I64(0xbbb16d6b0abbbbd6), I64(0xc146e29f87c1c123), I64(0x53a202a6f1535351) +, I64(0xdcae8ba572dcdc57), I64(0x0b582716530b0b2c), I64(0x9d9cd327019d9d4e), I64(0x6c47c1d82b6c6cad) +, I64(0x3195f562a43131c4), I64(0x7487b9e8f37474cd), I64(0xf6e309f115f6f6ff), I64(0x460a438c4c464605) +, I64(0xac092645a5acac8a), I64(0x893c970fb589891e), I64(0x14a04428b4141450), I64(0xe15b42dfbae1e1a3) +, I64(0x16b04e2ca6161658), I64(0x3acdd274f73a3ae8), I64(0x696fd0d2066969b9), I64(0x09482d1241090924) +, I64(0x70a7ade0d77070dd), I64(0xb6d954716fb6b6e2), I64(0xd0ceb7bd1ed0d067), I64(0xed3b7ec7d6eded93) +, I64(0xcc2edb85e2cccc17), I64(0x422a578468424215), I64(0x98b4c22d2c98985a), I64(0xa4490e55eda4a4aa) +, I64(0x285d8850752828a0), I64(0x5cda31b8865c5c6d), I64(0xf8933fed6bf8f8c7), I64(0x8644a411c2868622) + }, { + /* C6 vectors */ +I64(0x6018c07830d81818), I64(0x8c2305af46262323), I64(0x3fc67ef991b8c6c6), I64(0x87e8136fcdfbe8e8) +, I64(0x26874ca113cb8787), I64(0xdab8a9626d11b8b8), I64(0x0401080502090101), I64(0x214f426e9e0d4f4f) +, I64(0xd836adee6c9b3636), I64(0xa2a6590451ffa6a6), I64(0x6fd2debdb90cd2d2), I64(0xf3f5fb06f70ef5f5) +, I64(0xf979ef80f2967979), I64(0xa16f5fcede306f6f), I64(0x7e91fcef3f6d9191), I64(0x5552aa07a4f85252) +, I64(0x9d6027fdc0476060), I64(0xcabc89766535bcbc), I64(0x569baccd2b379b9b), I64(0x028e048c018a8e8e) +, I64(0xb6a371155bd2a3a3), I64(0x300c603c186c0c0c), I64(0xf17bff8af6847b7b), I64(0xd435b5e16a803535) +, I64(0x741de8693af51d1d), I64(0xa7e05347ddb3e0e0), I64(0x7bd7f6acb321d7d7), I64(0x2fc25eed999cc2c2) +, I64(0xb82e6d965c432e2e), I64(0x314b627a96294b4b), I64(0xdffea321e15dfefe), I64(0x41578216aed55757) +, I64(0x5415a8412abd1515), I64(0xc1779fb6eee87777), I64(0xdc37a5eb6e923737), I64(0xb3e57b56d79ee5e5) +, I64(0x469f8cd923139f9f), I64(0xe7f0d317fd23f0f0), I64(0x354a6a7f94204a4a), I64(0x4fda9e95a944dada) +, I64(0x7d58fa25b0a25858), I64(0x03c906ca8fcfc9c9), I64(0xa429558d527c2929), I64(0x280a5022145a0a0a) +, I64(0xfeb1e14f7f50b1b1), I64(0xbaa0691a5dc9a0a0), I64(0xb16b7fdad6146b6b), I64(0x2e855cab17d98585) +, I64(0xcebd8173673cbdbd), I64(0x695dd234ba8f5d5d), I64(0x4010805020901010), I64(0xf7f4f303f507f4f4) +, I64(0x0bcb16c08bddcbcb), I64(0xf83eedc67cd33e3e), I64(0x140528110a2d0505), I64(0x81671fe6ce786767) +, I64(0xb7e47353d597e4e4), I64(0x9c2725bb4e022727), I64(0x1941325882734141), I64(0x168b2c9d0ba78b8b) +, I64(0xa6a7510153f6a7a7), I64(0xe97dcf94fab27d7d), I64(0x6e95dcfb37499595), I64(0x47d88e9fad56d8d8) +, I64(0xcbfb8b30eb70fbfb), I64(0x9fee2371c1cdeeee), I64(0xed7cc791f8bb7c7c), I64(0x856617e3cc716666) +, I64(0x53dda68ea77bdddd), I64(0x5c17b84b2eaf1717), I64(0x014702468e454747), I64(0x429e84dc211a9e9e) +, I64(0x0fca1ec589d4caca), I64(0xb42d75995a582d2d), I64(0xc6bf9179632ebfbf), I64(0x1c07381b0e3f0707) +, I64(0x8ead012347acadad), I64(0x755aea2fb4b05a5a), I64(0x36836cb51bef8383), I64(0xcc3385ff66b63333) +, I64(0x91633ff2c65c6363), I64(0x0802100a04120202), I64(0x92aa39384993aaaa), I64(0xd971afa8e2de7171) +, I64(0x07c80ecf8dc6c8c8), I64(0x6419c87d32d11919), I64(0x39497270923b4949), I64(0x43d9869aaf5fd9d9) +, I64(0xeff2c31df931f2f2), I64(0xabe34b48dba8e3e3), I64(0x715be22ab6b95b5b), I64(0x1a8834920dbc8888) +, I64(0x529aa4c8293e9a9a), I64(0x98262dbe4c0b2626), I64(0xc8328dfa64bf3232), I64(0xfab0e94a7d59b0b0) +, I64(0x83e91b6acff2e9e9), I64(0x3c0f78331e770f0f), I64(0x73d5e6a6b733d5d5), I64(0x3a8074ba1df48080) +, I64(0xc2be997c6127bebe), I64(0x13cd26de87ebcdcd), I64(0xd034bde468893434), I64(0x3d487a7590324848) +, I64(0xdbffab24e354ffff), I64(0xf57af78ff48d7a7a), I64(0x7a90f4ea3d649090), I64(0x615fc23ebe9d5f5f) +, I64(0x80201da0403d2020), I64(0xbd6867d5d00f6868), I64(0x681ad07234ca1a1a), I64(0x82ae192c41b7aeae) +, I64(0xeab4c95e757db4b4), I64(0x4d549a19a8ce5454), I64(0x7693ece53b7f9393), I64(0x88220daa442f2222) +, I64(0x8d6407e9c8636464), I64(0xe3f1db12ff2af1f1), I64(0xd173bfa2e6cc7373), I64(0x4812905a24821212) +, I64(0x1d403a5d807a4040), I64(0x2008402810480808), I64(0x2bc356e89b95c3c3), I64(0x97ec337bc5dfecec) +, I64(0x4bdb9690ab4ddbdb), I64(0xbea1611f5fc0a1a1), I64(0x0e8d1c8307918d8d), I64(0xf43df5c97ac83d3d) +, I64(0x6697ccf1335b9797), I64(0x0000000000000000), I64(0x1bcf36d483f9cfcf), I64(0xac2b4587566e2b2b) +, I64(0xc57697b3ece17676), I64(0x328264b019e68282), I64(0x7fd6fea9b128d6d6), I64(0x6c1bd87736c31b1b) +, I64(0xeeb5c15b7774b5b5), I64(0x86af112943beafaf), I64(0xb56a77dfd41d6a6a), I64(0x5d50ba0da0ea5050) +, I64(0x0945124c8a574545), I64(0xebf3cb18fb38f3f3), I64(0xc0309df060ad3030), I64(0x9bef2b74c3c4efef) +, I64(0xfc3fe5c37eda3f3f), I64(0x4955921caac75555), I64(0xb2a2791059dba2a2), I64(0x8fea0365c9e9eaea) +, I64(0x89650fecca6a6565), I64(0xd2bab9686903baba), I64(0xbc2f65935e4a2f2f), I64(0x27c04ee79d8ec0c0) +, I64(0x5fdebe81a160dede), I64(0x701ce06c38fc1c1c), I64(0xd3fdbb2ee746fdfd), I64(0x294d52649a1f4d4d) +, I64(0x7292e4e039769292), I64(0xc9758fbceafa7575), I64(0x1806301e0c360606), I64(0x128a249809ae8a8a) +, I64(0xf2b2f940794bb2b2), I64(0xbfe66359d185e6e6), I64(0x380e70361c7e0e0e), I64(0x7c1ff8633ee71f1f) +, I64(0x956237f7c4556262), I64(0x77d4eea3b53ad4d4), I64(0x9aa829324d81a8a8), I64(0x6296c4f431529696) +, I64(0xc3f99b3aef62f9f9), I64(0x33c566f697a3c5c5), I64(0x942535b14a102525), I64(0x7959f220b2ab5959) +, I64(0x2a8454ae15d08484), I64(0xd572b7a7e4c57272), I64(0xe439d5dd72ec3939), I64(0x2d4c5a6198164c4c) +, I64(0x655eca3bbc945e5e), I64(0xfd78e785f09f7878), I64(0xe038ddd870e53838), I64(0x0a8c148605988c8c) +, I64(0x63d1c6b2bf17d1d1), I64(0xaea5410b57e4a5a5), I64(0xafe2434dd9a1e2e2), I64(0x99612ff8c24e6161) +, I64(0xf6b3f1457b42b3b3), I64(0x842115a542342121), I64(0x4a9c94d625089c9c), I64(0x781ef0663cee1e1e) +, I64(0x1143225286614343), I64(0x3bc776fc93b1c7c7), I64(0xd7fcb32be54ffcfc), I64(0x1004201408240404) +, I64(0x5951b208a2e35151), I64(0x5e99bcc72f259999), I64(0xa96d4fc4da226d6d), I64(0x340d68391a650d0d) +, I64(0xcffa8335e979fafa), I64(0x5bdfb684a369dfdf), I64(0xe57ed79bfca97e7e), I64(0x90243db448192424) +, I64(0xec3bc5d776fe3b3b), I64(0x96ab313d4b9aabab), I64(0x1fce3ed181f0cece), I64(0x4411885522991111) +, I64(0x068f0c8903838f8f), I64(0x254e4a6b9c044e4e), I64(0xe6b7d1517366b7b7), I64(0x8beb0b60cbe0ebeb) +, I64(0xf03cfdcc78c13c3c), I64(0x3e817cbf1ffd8181), I64(0x6a94d4fe35409494), I64(0xfbf7eb0cf31cf7f7) +, I64(0xdeb9a1676f18b9b9), I64(0x4c13985f268b1313), I64(0xb02c7d9c58512c2c), I64(0x6bd3d6b8bb05d3d3) +, I64(0xbbe76b5cd38ce7e7), I64(0xa56e57cbdc396e6e), I64(0x37c46ef395aac4c4), I64(0x0c03180f061b0303) +, I64(0x45568a13acdc5656), I64(0x0d441a49885e4444), I64(0xe17fdf9efea07f7f), I64(0x9ea921374f88a9a9) +, I64(0xa82a4d8254672a2a), I64(0xd6bbb16d6b0abbbb), I64(0x23c146e29f87c1c1), I64(0x5153a202a6f15353) +, I64(0x57dcae8ba572dcdc), I64(0x2c0b582716530b0b), I64(0x4e9d9cd327019d9d), I64(0xad6c47c1d82b6c6c) +, I64(0xc43195f562a43131), I64(0xcd7487b9e8f37474), I64(0xfff6e309f115f6f6), I64(0x05460a438c4c4646) +, I64(0x8aac092645a5acac), I64(0x1e893c970fb58989), I64(0x5014a04428b41414), I64(0xa3e15b42dfbae1e1) +, I64(0x5816b04e2ca61616), I64(0xe83acdd274f73a3a), I64(0xb9696fd0d2066969), I64(0x2409482d12410909) +, I64(0xdd70a7ade0d77070), I64(0xe2b6d954716fb6b6), I64(0x67d0ceb7bd1ed0d0), I64(0x93ed3b7ec7d6eded) +, I64(0x17cc2edb85e2cccc), I64(0x15422a5784684242), I64(0x5a98b4c22d2c9898), I64(0xaaa4490e55eda4a4) +, I64(0xa0285d8850752828), I64(0x6d5cda31b8865c5c), I64(0xc7f8933fed6bf8f8), I64(0x228644a411c28686) + }, { + /* C7 vectors */ +I64(0x186018c07830d818), I64(0x238c2305af462623), I64(0xc63fc67ef991b8c6), I64(0xe887e8136fcdfbe8) +, I64(0x8726874ca113cb87), I64(0xb8dab8a9626d11b8), I64(0x0104010805020911), I64(0x4f214f426e9e0d4f) +, I64(0x36d836adee6c9b36), I64(0xa6a2a6590451ffa6), I64(0xd26fd2debdb90cd2), I64(0xf5f3f5fb06f70ef5) +, I64(0x79f979ef80f29679), I64(0x6fa16f5fcede306f), I64(0x917e91fcef3f6d91), I64(0x525552aa07a4f852) +, I64(0x609d6027fdc04760), I64(0xbccabc89766535bc), I64(0x9b569baccd2b379b), I64(0x8e028e048c018a8e) +, I64(0xa3b6a371155bd2a3), I64(0x0c300c603c186c0c), I64(0x7bf17bff8af6847b), I64(0x35d435b5e16a8035) +, I64(0x1d741de8693af51d), I64(0xe0a7e05347ddb3e0), I64(0xd77bd7fc0cb321d7), I64(0xc22fc25eed999cc2) +, I64(0x2eb82e6d965c432e), I64(0x4b314b627a96294b), I64(0xfedffea321e15dfe), I64(0x5741578216aed557) +, I64(0x155415a84eeabd15), I64(0x77c1779fb6eee877), I64(0x37dc37a5eb6e9237), I64(0xe5b3e57b56d79ee5) +, I64(0x9f469f8cd923139f), I64(0xf0e7f0d317fd23f0), I64(0x4a354a6a7f94204a), I64(0xda8eda9e95a944da) +, I64(0x587d58fa25b0a258), I64(0xc903c906ca8fcfc9), I64(0x29a429558d527c29), I64(0x0a280a5022145a0a) +, I64(0xb1feb1e14f7f50b1), I64(0xa0baa0691a5dc9a0), I64(0x6bb16b7fdad6146b), I64(0x852e855ca9a7d985) +, I64(0xbdcebd8173673cbd), I64(0x5d695dd234ba8f5d), I64(0x1040108050209010), I64(0xf4f7f4f303f507f4) +, I64(0xcb0bcb16c08bddcb), I64(0x3ef83eedc67cd33e), I64(0x05140528110a2d05), I64(0x6781671fe6ce7867) +, I64(0xe4b7e47353d597e4), I64(0x279c2725bb4e0227), I64(0x4119413258827341), I64(0x8b168b2c9d0ba78b) +, I64(0xa7a6a7510153f6a7), I64(0x7de97dcf94fab27d), I64(0x956e95dcfb374995), I64(0xd820d88e9fad56d8) +, I64(0xfbcbfb8b30eb70fb), I64(0xee9fee2371c1cdee), I64(0x7ced7cc791f8bb7c), I64(0x66856617e3cc7166) +, I64(0xdd53dda68ea77bdd), I64(0x175c17b84b2eaf17), I64(0x47014702468e4547), I64(0x9e429e84dc211a9e) +, I64(0xca0fca1ec589d4ca), I64(0x2db42d75995a582d), I64(0xbfc6bf96d9632ebf), I64(0x071c07381b0e3f07) +, I64(0xad8ead012347acad), I64(0x5a755aea88b4b05a), I64(0x8336836cb51bef83), I64(0x33cc3385ff66b633) +, I64(0x6391633ff2c65c63), I64(0x020802100a041202), I64(0xaa92aa39384993aa), I64(0x71d971afa8e2de71) +, I64(0xc807c80ecf8dc6c8), I64(0x19d019c87d32d119), I64(0x4939497270923b49), I64(0xd943d9869aaf5fd9) +, I64(0xf2eff2c31df931f2), I64(0xe3abe34b48dba8e3), I64(0x5b715be22ab6b95b), I64(0x881a8834920dbc88) +, I64(0x9a529aa4c8293e9a), I64(0x2698262dbe4c0b26), I64(0x32c8328dfa64bf32), I64(0xb0fab0e94a7d59b0) +, I64(0xe983e91b6acff2e9), I64(0x0f3c0f78331e770f), I64(0xd573d5e6a6b733d5), I64(0x803a8074ba1df480) +, I64(0xbec2be997c6127be), I64(0xcd13cd26de87ebcd), I64(0x34d034bde4688934), I64(0x483d487a75903248) +, I64(0xffdbffab24e354ff), I64(0x7af57af78ff48d7a), I64(0x907a90f4ea3d6490), I64(0x5f615fc23ebe9d5f) +, I64(0x2080201da0403d20), I64(0x68bd6867d5d00f68), I64(0x1a681ad07234ca1a), I64(0xae82ae192c41b7ae) +, I64(0xb4eab4c95e757db4), I64(0x544d549a19a8ce54), I64(0x937693ece53b7f93), I64(0x2288220daa442f22) +, I64(0x648d6407e9c86364), I64(0xf1e3f1db12ff2af1), I64(0x73d173bfa2e6cc73), I64(0x124812905a248212) +, I64(0x401d403a5d807a40), I64(0x0820084028104808), I64(0xc32bc356e89b95c3), I64(0xec97ec337bc5dfec) +, I64(0xdb4bdb9690ab4ddb), I64(0xa1bea1611f5fc0a1), I64(0x8d0e8d1c8307918d), I64(0x3df43df5c97ac83d) +, I64(0x976697ccf1335b97), I64(0x0210000000000000), I64(0xcf1bcf36d483f9cf), I64(0x2bac2b4587566e2b) +, I64(0x76c57697b3ece176), I64(0x82328264b019e682), I64(0xd67fd6fea9b128d6), I64(0x1b6c1bd87736c31b) +, I64(0xb5eeb5c15b7774b5), I64(0xaf86af112943beaf), I64(0x6ab56a77dfd41d6a), I64(0x505d50ba0da0ea50) +, I64(0x450945124c8a5745), I64(0xf3ebf3cb18fb38f3), I64(0x30c0309df060ad30), I64(0xef9bef2b74c3c4ef) +, I64(0x3ffc3fe5c37eda3f), I64(0x554955921caac755), I64(0xa2b2a2791059dba2), I64(0xea8fea0365c9e9ea) +, I64(0x6589650fecca6a65), I64(0xbad2bab9686903ba), I64(0x2fbc2f65935e4a2f), I64(0xc027c04ee79d8ec0) +, I64(0xde5fdebe81a160de), I64(0x1c701ce06c38fc1c), I64(0xfdd3fdbb2ee746fd), I64(0x4d294d52649a1f4d) +, I64(0x927292e4e0397692), I64(0x75c9758fbceafa75), I64(0x061806301e0c3606), I64(0x8a128a249809ae8a) +, I64(0xb2f2b2f940794bb2), I64(0xe6bfe50359d185e6), I64(0x0e380e70361c7e0e), I64(0x1f7c1ff8633ee71f) +, I64(0x62956237f7c45562), I64(0xd477d4eea3b53ad4), I64(0xa89aa829324d81a8), I64(0x966296c4f4315296) +, I64(0xf9c3f99b3aef62f9), I64(0xc533c566f697a3c5), I64(0x25942535b14a1025), I64(0x597959f220b2ab59) +, I64(0x842a8454ae15d084), I64(0x72d572b7a7e4c572), I64(0x39e439d5dd72ec39), I64(0x4c2d4c5a6198164c) +, I64(0x5e655eca3bbc945e), I64(0x78fd78e785f09f78), I64(0x38e038ddd870e538), I64(0x8c0a8c148605988c) +, I64(0xd163d1c6b2bf17d1), I64(0xa5aea5410b57e4a5), I64(0xe2afe2434dd9a1e2), I64(0x6199612ff8c24e61) +, I64(0xb3f6b3f1457b42b3), I64(0x21842115a5423421), I64(0x9c4a9c94d625089c), I64(0x1e781ef0663cee1e) +, I64(0x4311432252866143), I64(0xc73bc776fc93b1c7), I64(0xfcd7fcb32be54ffc), I64(0x0410042014082404) +, I64(0x515951b208a2e351), I64(0x995e99bcc72f2599), I64(0x6da96d4fc4da226d), I64(0x0d340d68391a650d) +, I64(0xfacffa8335e979fa), I64(0xdf5bdfb684a369df), I64(0x7ee57ed79bfca97e), I64(0x2490243db4481924) +, I64(0x3bec3bc5d776fe3b), I64(0xab96ab313d4b9aab), I64(0xce1fce3ed181f0ce), I64(0x1144118855229911) +, I64(0x8f068f0c8903838f), I64(0x4e254e4a6b9c044e), I64(0xb7e6b7d1517366b7), I64(0xeb8beb0b60cbe0eb) +, I64(0x3cf03cfdcc78c13c), I64(0x813e817cbf1ffd81), I64(0x946a94d4fe354094), I64(0xf7fbf7eb0cf31cf7) +, I64(0xb9deb9a1676f18b9), I64(0x134c13985f268b13), I64(0x2cb02c7d9c58512c), I64(0xd36bd3d6b8bb05d3) +, I64(0xe7bbe76b5cd38ce7), I64(0x6ea56e57cbdc396e), I64(0xc437c46ef395aac4), I64(0x030c03180f061b03) +, I64(0x5645568a13acdc56), I64(0x440d441a49885e44), I64(0x7fe17fdf9efea07f), I64(0xa99ea921374f88a9) +, I64(0x2aa82a4d8254672a), I64(0xbbd6bbb16d6b0abb), I64(0xc123c146e29f87c1), I64(0x535153a202a6f153) +, I64(0xdc57dcae8ba572dc), I64(0x0b2c0b582716530b), I64(0x9d4e9d9cd327019d), I64(0x6cad6c47c1d82b6c) +, I64(0x31c43195f562a431), I64(0x74cd7487b9e8f374), I64(0xf6fff6e309f115f6), I64(0x4605460a438c4c46) +, I64(0xac8aac092645a5ac), I64(0x891e893c970fb589), I64(0x145014a04428b414), I64(0xe1a3e15b42dfbae1) +, I64(0x165816b04e2ca616), I64(0x3ae83acdd274f73a), I64(0x69b9696fd0d20669), I64(0x092409482d124109) +, I64(0x70dd70a7ade0d770), I64(0xb6e2b6d954716fb6), I64(0xd067d0ceb7bd1ed0), I64(0xed93ed3b7ec7d6ed) +, I64(0xcc12ac2edb85e2cc), I64(0x4215422a57846842), I64(0x985a98b4c22d2c98), I64(0xa4aaa4490e55eda4) +, I64(0x28a0285d88507528), I64(0x5c6dc7da31b8865c), I64(0xf8c7f8933fed6bf8), I64(0x86228644a411c286) + } +}; +/* end of whirlpool_sbox array */ diff --git a/src/ustd.h b/src/ustd.h new file mode 100644 index 0000000..94f1ae2 --- /dev/null +++ b/src/ustd.h @@ -0,0 +1,30 @@ +/* ustd.h common macros and includes */ +#ifndef LIBRHASH_USTD_H +#define LIBRHASH_USTD_H + +#if _MSC_VER >= 1300 + +# define int64_t __int64 +# define int32_t __int32 +# define int16_t __int16 +# define int8_t __int8 +# define uint64_t unsigned __int64 +# define uint32_t unsigned __int32 +# define uint16_t unsigned __int16 +# define uint8_t unsigned __int8 + +/* disable warnings: The POSIX name for this item is deprecated. Use the ISO C++ conformant name. */ +#pragma warning(disable : 4996) + +#else /* _MSC_VER >= 1300 */ + +# include +# include + +#endif /* _MSC_VER >= 1300 */ + +#if _MSC_VER <= 1300 +# include /* size_t for vc6.0 */ +#endif /* _MSC_VER <= 1300 */ + +#endif /* LIBRHASH_USTD_H */ diff --git a/src/v4packet.h b/src/v4packet.h new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/src/v4packet.h @@ -0,0 +1 @@ +