Do I have any other options if intrinsics are not available? My only 
limitation is that I can't use the .asm files. 

On Monday, December 18, 2017 at 3:30:22 PM UTC+2, Jeffrey Walton wrote:
>
>
>
> On Monday, December 18, 2017 at 5:54:08 AM UTC-5, Samir Muradov wrote:
>>
>> Hi, I need to include the .cpp and .h files and get them to compile 
>> inside my project. 
>> I tried defining CRYPTOPP_DISABLE_ASM but it still tries to call 
>> MASM_RSA_GenerateBlock. Here is the error:
>>
>> Error    LNK2019    unresolved external symbol MASM_RSA_GenerateBlock 
>> referenced in function "public: virtual void __cdecl 
>> CryptoPP::RDSEED::GenerateBlock(unsigned char *,unsigned __int64)" 
>> (?GenerateBlock@RDSEED@CryptoPP@@UEAAXPEAE_K@Z)    
>> CryptoppProjucerConsole_ConsoleApp    file:dir\rdrand.obj    1   
>>
>> Inside rdrand.cpp I noticed that it defines MASM_RDRAND_ASM_AVAILABLE at 
>> line 58-60 without checking if CRYPTOPP_DISABLE_ASM is defined.
>> As a workaround for now I changed line 59-60 from
>> #    define MASM_RDRAND_ASM_AVAILABLE 1
>> #    define MASM_RDSEED_ASM_AVAILABLE 1
>> to 
>> #  define ALL_RDRAND_INTRIN_AVAILABLE 1
>> #  define ALL_RDSEED_INTRIN_AVAILABLE 1
>>
>> It is my understanding that the ASM version for rdrand is considered 
>> experimental and was only added recently. Are there any plans to support 
>> CRYPTOPP_DISABLE_ASM as originally intended?
>>
>
> Things have changed a bit in Master, but its mostly the same as 5.6.5.
>
> In Master... Microsoft platforms prefer the intrinsics and Unix/Linux 
> prefer assembly. If intrinsics are not available then MS platforms fallback 
> to ASM. Also see 
> https://github.com/weidai11/cryptopp/blob/master/rdrand.cpp .
>
> Unix and Linux prefer ASM because of a GCC bug in the intrinsics. We 
> really need to avoid intrinsics when using GCC. Also see CVE-2017-11671.
>
> So I am clear... You prefer nothing if intrinsics are not available. Is 
> that correct?
>
> Jeff
>

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com.
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 cryptopp-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to