Skip to content

Commit

Permalink
Merge branch 'aes-ni-gcm'
Browse files Browse the repository at this point in the history
  • Loading branch information
toddouska committed Nov 2, 2015
2 parents 5d2d249 + 28dcef2 commit 1d32ff2
Show file tree
Hide file tree
Showing 7 changed files with 631 additions and 3 deletions.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ then
AM_CFLAGS="$AM_CFLAGS -maes -msse4"
fi
fi
AS_IF([test "x$ENABLED_AESGCM" != "xno"],[AM_CCASFLAGS="$AM_CCASFLAGS -DHAVE_AESGCM"])
fi

if test "$ENABLED_INTELASM" = "yes"
Expand Down Expand Up @@ -2500,6 +2501,7 @@ CREATE_HEX_VERSION
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_LDFLAGS])
AC_SUBST([AM_CCASFLAGS])
AC_SUBST([LIB_ADD])
AC_SUBST([LIB_STATIC_ADD])

Expand Down Expand Up @@ -2619,6 +2621,7 @@ echo " * C Flags: $CFLAGS"
echo " * C++ Compiler: $CXX"
echo " * C++ Flags: $CXXFLAGS"
echo " * CPP Flags: $CPPFLAGS"
echo " * CCAS Flags: $CCASFLAGS"
echo " * LIB Flags: $LIB"
echo " * Debug enabled: $ax_enable_debug"
echo " * Warnings as failure: $ac_cv_warnings_as_errors"
Expand Down
23 changes: 23 additions & 0 deletions wolfcrypt/benchmark/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,29 @@ void bench_aesgcm(void)
blockType, total, persec);
SHOW_INTEL_CYCLES
printf("\n");

#if 0
start = current_time(1);
BEGIN_INTEL_CYCLES

for(i = 0; i < numBlocks; i++)
wc_AesGcmDecrypt(&enc, plain, cipher, sizeof(cipher), iv, 12,
tag, 16, additional, 13);

END_INTEL_CYCLES
total = current_time(0) - start;

persec = 1 / total * numBlocks;
#ifdef BENCH_EMBEDDED
/* since using kB, convert to MB/s */
persec = persec / 1024;
#endif

printf("AES-GCM Decrypt %d %s took %5.3f seconds, %8.3f MB/s", numBlocks,
blockType, total, persec);
SHOW_INTEL_CYCLES
printf("\n");
#endif
}
#endif

Expand Down
Loading

0 comments on commit 1d32ff2

Please sign in to comment.