Call for Crypto++ 6.0 testers

111 views
Skip to first unread message

Jeffrey Walton

unread,
Jan 19, 2018, 11:04:40 AM1/19/18
to Crypto++ Users
Hi Everyone,

We are preparing to release Crypto++ 6.0. If you have some time, then please test Master on your favorite platform.

To fetch master, you can perform:

    git clone https://github.com/weidai11/cryptopp cryptopp60
    cd cryptopp60

Jeff

Marcel Raad

unread,
Jan 19, 2018, 4:20:08 PM1/19/18
to Jeffrey Walton, Crypto++ Users
2018-01-19 17:04 GMT+01:00 Jeffrey Walton <nolo...@gmail.com>:
> If you have some time, then please
> test Master on your favorite platform.

MinGW64 and Cygwin64 with GCC look good. All GCC and clang versions
available in the Linux systems coming with Windows 10 (Ubuntu Xenial,
openSUSE 42, SLES 12) seem to work great.

Both 32-bit MinGW-w64 (based on GCC 7) and the classic 32-bit-only
MinGW (based on GCC 6) complain:

g++ -DNDEBUG -g2 -O3 -fPIC -pthread -pipe -c aria-simd.cpp
aria-simd.cpp: In function 'void
CryptoPP::ARIA_ProcessAndXorBlock_Xor_SSSE3(const byte*,
CryptoPP::byte*, const byte*, CryptoPP::word32*)':
aria-simd.cpp:115:76: warning: SSE vector return without SSE enabled
changes the ABI [-Wpsabi]
const __m128i MASK = _mm_set_epi8(12,13,14,15, 8,9,10,11, 4,5,6,7, 0,1,2,3);

And then many similar errors starting with:
In file included from
C:/msys64/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/pmmintrin.h:31:0,
from
C:/msys64/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/tmmintrin.h:31,
from aria-simd.cpp:22:
C:/msys64/mingw32/lib/gcc/i686-w64-mingw32/7.2.0/include/emmintrin.h:718:1:
error: inlining failed in call to always_inline 'void
_mm_storeu_si128(__m128i_u*, __m128i)': target specific option
mismatch
_mm_storeu_si128 (__m128i_u *__P, __m128i __B)
^~~~~~~~~~~~~~~~
aria-simd.cpp:135:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));

Cygwin64's clang complains:

clang++ -DNDEBUG -g2 -O3 -D_XOPEN_SOURCE=600 -fPIC -pthread -pipe -c
cryptlib.cpp
clang-5.0: error: unsupported option '-fPIC' for target
'x86_64-unknown-windows-cygnus'

When using MinGW-w64 targeting MSYS from the MSYS2 shell, it compiles
fine, but doesn't link:

g++ -o cryptest.exe -DNDEBUG -g2 -O3 -D_XOPEN_SOURCE=600 -fPIC
-pthread -pipe adhoc.o test.o bench1.o bench2.o validat0.o validat1.o
validat2.o validat3.o validat4.o datatest.o regtest1.o regtest2.o
regtest3.o dlltest.o fipsalgt.o ./libcryptopp.a
regtest3.o:regtest3.cpp:(.rdata$.refptr._ZN8CryptoPP20g_nullNameValuePairsE[.refptr._ZN8CryptoPP20g_nullNameValuePairsE]+0x0):
undefined reference to `CryptoPP::g_nullNameValuePairs'
./libcryptopp.a(asn.o):asn.cpp:(.rdata$.refptr._ZN8CryptoPP15DEFAULT_CHANNELE[.refptr._ZN8CryptoPP15DEFAULT_CHANNELE]+0x0):
undefined reference to `CryptoPP::DEFAULT_CHANNEL'

Visual Studio 2017 Update 6 Preview 2 produces a lot of warning spam.
For every file compiled, it complains:

algparam.h(327): warning STL4006: std::uncaught_exception() is
deprecated in C++17. It is superseded by std::uncaught_exceptions(),
plural.

And one other new warning:

tweetnacl.cpp(249): warning C4146: unary minus operator applied to
unsigned type, result still unsigned

I'd love to look closer into these issues, but I'm on holiday for one
week in a few hours, sorry :-(

Marcel

Jeffrey Walton

unread,
Jan 19, 2018, 4:53:14 PM1/19/18
to Marcel Raad, Crypto++ Users
On Fri, Jan 19, 2018 at 4:20 PM, Marcel Raad <marc...@gmail.com> wrote:
> 2018-01-19 17:04 GMT+01:00 Jeffrey Walton <nolo...@gmail.com>:
>> If you have some time, then please
>> test Master on your favorite platform.
>
>
> g++ -DNDEBUG -g2 -O3 -fPIC -pthread -pipe -c aria-simd.cpp
> aria-simd.cpp: In function 'void
> CryptoPP::ARIA_ProcessAndXorBlock_Xor_SSSE3(const byte*,
> CryptoPP::byte*, const byte*, CryptoPP::word32*)':
> aria-simd.cpp:115:76: warning: SSE vector return without SSE enabled
> changes the ABI [-Wpsabi]
> const __m128i MASK = _mm_set_epi8(12,13,14,15, 8,9,10,11, 4,5,6,7, 0,1,2,3);

Thanks Marcel.

I think we need to manage the 32-bit MinGW issues for the moment
rather than fixing them. I have not been able to duplicate on 32-bit
machines.

I think either:

1. CXXFLAGS += -DCRYPTOPP_DISABLE_ASM
2. CXXFLAGS += -march=sse2
3. CXXFLAGS += -march=native

should work to contain the problems. I'd like to require -march=sse2,
but that may run afoul of some distros that still want to build for
i586.

Are there any 32-bit MinGW users who need more than the three options above?

Jeff

Jeffrey Walton

unread,
Jan 22, 2018, 8:34:57 AM1/22/18
to Crypto++ Users
Hi Everyone,

Last call to report problems.

Jeff
Reply all
Reply to author
Forward
0 new messages