I have had an issue with an illegal instruction as well, and it was tied to 
use of the AESNI intrinsics.  There is code in Crypto++ to read some machine 
registers to determine whether the registers and instruction set for AESNI are 
present in the hardware, but it does not always detect correctly.  I have had 
the same code run fine on one hardware platform, and crash on another with an 
illegal instruction.  DIsabling AESNI intrinsics solved the problem, but it 
also means you won't get the performance boost of the AESNI instruction set on 
hardware that has it.
   A better solution would be to fix the hardware detection code, but I didn't 
know what it was looking for.

Rod

 
      From: Jeffrey Walton <[email protected]>
 To: [email protected] 
 Sent: Saturday, December 13, 2014 4:02 PM
 Subject: Re: Illegal Instruction
   


On Tuesday, December 2, 2014 8:34:43 PM UTC-5, Jackson Cwach wrote:
I am attempting to compile a program using Crypto++ and no matter what I try I 
am getting an illegal instruction error. The code I am trying to compile is 
from http://www.cryptopp.com/ wiki/TripleDES and according to GDB the problem 
is: 
Program received signal SIGILL, Illegal instruction.CryptoPP::Rijndael::Base:: 
UncheckedSetKey (this=0x733060,    userKey=<optimized out>, keylen=32) at 
rijndael.cpp:218218     rijndael.cpp: No such file or directory.(gdb)
I'm just taking a stab in the dark here since you haven't really provided any 
information... Try building Crypto++ with 
CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE set to 0. I think you can set in in 
Crpyto++'s config.h.

config.h should also have some automatic detection code for 
CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE. So after the automatic detection 
code, do something like:

#undef CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE
#define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 0




-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.


   

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to